Search

Search your data, by text, filter or distance

Search any entity with typo-tolerant full-text queries, filters, facets and geo radius, backed by Meilisearch and indexed as your records change.

The same task, three ways

Every task works three ways, and all of them change the same project. Here's one: make a listings entity searchable, then search it by place and bedrooms.

The Anythink dashboard

Choose which fields are searchable. Indexing follows.

The Anythink CLI

Every search option is a flag on one command.

$ anythink fields update listings title --searchable$ anythink fields update listings bedrooms --searchable# garden flats within 5 km, two bedrooms or more, nearest first$ anythink search query "garden flat" --entities listings \--filter "_geoRadius(51.5072, -0.1276, 5000) AND bedrooms >= 2" \--sort "_geoPoint(51.5072, -0.1276):asc" \--facet bedrooms --highlight$ anythink search similar listings 42
  • ✓Matching listings, with the search terms highlighted
  • ✓Counts for each bedroom number
  • ✓Listings similar to listing 42

Claude, through MCP

Describe the search. It builds the filter and runs it.

you › “Search listings for garden flats with at least two bedrooms within 5 km of central London, nearest first, and tell me how many results there are for each bedroom count.”

  • ✓Searched listings for garden flat
  • ✓Filtered to two or more bedrooms within 5 km
  • ✓Sorted nearest first
  • ✓Counted results for each bedroom number

Search you don't have to run

Kept in sync

The index follows your data

Creates, updates and deletes reach the index through a queue. If an index ever drifts, an admin can rehydrate it from the CLI or the API.

Safe to expose

Public search shows only what you choose

Only publicly searchable fields reach the public endpoint, and the audit command flags any difference between your settings and what it returns.

Location

Geo search on any entity with a geo field

Add a geo field in the data model and radius, bounding-box and nearest-first search work straight away. The same field plots records on the dashboard's map view.

Recommendations

More like this, from the same index

The similar-items endpoint ranks records by meaning rather than shared words, for related products, articles or listings, on the authenticated and public endpoints.

Search built into the backend, not bolted on beside it

Full-text, filters, facets, geo and similar items on one endpoint, indexed from the same entities your API serves.

Typo-tolerant full-text search

Mark fields searchable and records are indexed in Meilisearch as they're created, updated or deleted. Results rank by word matches, typos, proximity and field, with name fields weighted first.

In practice

One endpoint, a few query parameters

full-text.ts
GET https://api.my.anythink.cloud/org/{org_id}/search?q=garden+flat&e=listings&hl=true
Authorization: Bearer <access token>

How it works

From a data model to a search box

01

Choose searchable fields

Tick Searchable on the fields people should find records by. Searchable fields can also be filtered and faceted.

02

Records index themselves

Each create, update and delete is queued and applied to that entity's Meilisearch index. There's no search cluster for you to run.

03

Query one endpoint

Call /search with a query, the entities to search, and any filters, facets, sorting or highlighting you need.

04

Open it to the public, carefully

Tick Publicly Searchable on the fields visitors may see, then call /search/public from your website. Run the audit command before launch.

05

Add related items

Call /search/similar with a record's ID to show more like it.

Follow the guide

Searchable fields, filters and facets

Choose which fields are searchable, then query, filter and sort them over the API.

Read the search guide →

Frequently Asked Questions

How does search work in Anythink?

Mark fields as searchable and Anythink indexes those entities in Meilisearch, updating the index through a queue as records change. Query one entity, several or all of them with GET /search, adding filters, facets, sorting and highlighting as query parameters.

Each entity's index pages through up to 1,000 hits per query, so narrow broad searches with filters.

Can I add search to a public website without an API key?

Yes. Mark the entity public and tick Publicly Searchable on the fields visitors should see. GET /search/public then searches those fields with no credentials and returns nothing else. Run anythink search audit <entity> to check what public search returns.

Can I search across multiple entities at once?

Yes. Pass a comma-separated list of entities, or leave it out to search every indexed entity. Each hit includes __entity so you can tell which entity it came from.

Does Anythink support geo search?

Yes. Add a geo field to the entity, then filter with _geoRadius(lat, lng, metres) or _geoBoundingBox([lat, lng], [lat, lng]) and sort with _geoPoint(lat, lng):asc to put the nearest results first.

Still have questions?

Get in Touch

More in the same project

Every feature reads from the same data model, so each one you add works with the rest.

Documentation

Guides and reference at docs.anythink.cloud.

Search built into every project

Full-text, faceted and geo search across your entities, with results that respect each signed-in user's permissions.