Search

Full-text search

Create a fulltext index on a string attribute, then use the search query operator. With an index present, matching uses proper text search; otherwise it falls back to a substring match.

curl
curl -G "https://base.finiteskills.com/v1/databases/main/collections/articles/documents" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" \
  --data-urlencode 'queries[]=search("title","climate")'

Vector / similarity search

Declare a vector attribute with a fixed dimension, store embeddings on your documents, then query nearest neighbours:

Setup + query
# 1) attribute
POST /databases/main/collections/docs/attributes/vector  { "key":"embedding","dimensions":768 }

# 2) store a document with an embedding array of that length
POST /databases/main/collections/docs/documents  { "documentId":"unique()","data":{"embedding":[...] } }

# 3) nearest-neighbour search
curl -X POST "https://base.finiteskills.com/v1/databases/main/collections/docs/vector-search" \
  -H "X-Appwrite-Project: <YOUR_PROJECT_ID>" -H "Content-Type: application/json" \
  -d '{"attribute":"embedding","vector":[...],"limit":10}'

Results come back nearest-first with a $similarity score in [0,1]. Where the pgvector extension is available it is used for speed; otherwise an exact scan is performed.