Skip to content
Back

Searching by attribute "name" requires a fulltext index.

  • 0
  • 3
  • Databases
  • Web
  • Cloud
Dan6erbond
1 Mar, 2026, 19:28

I have a table "products" with a few columns I'm trying to search by, but I get this error:

TypeScript
{
    "message": "Searching by attribute \"name\" requires a fulltext index.",
    "code": 400,
    "type": "general_query_invalid",
    "version": "1.8.1"
}```
My table does have fulltext indexes configured, so I'm not sure why I'm still getting this error - do they take some time to get setup? And how can I see the status? Are they available in the Free plan?
My code:```ts
const res = await tables.listRows<Products>({
  databaseId: process.env.NEXT_PUBLIC_DATABASE_ID!,
  tableId: process.env.NEXT_PUBLIC_PRODUCTS_TABLE_ID!,
  queries: [
    Query.equal("userId", user.$id),
    ...(search
      ? [
          Query.or([
            Query.search("name", search),
            Query.search("brand", search),
            Query.search("category", search),
          ]),
        ]
      : []),
    Query.select(["*", "units.*"]),
    ...orderQueries,
    Query.orderAsc("$updatedAt"),
    Query.orderAsc("$createdAt"),
    Query.offset((page - 1) * perPage),
    Query.limit(perPage),
  ],
});```
TL;DR
Index for attribute 'name' got stuck during creation, causing a search issue. Solution - delete the index and recreate it. Another issue emerged when searching by 'brand.name', indicating a bug in the system that needs to be resolved.
eldad
1 Mar, 2026, 19:29

please share your table structure and list of indexes

Dan6erbond
1 Mar, 2026, 19:31
Dan6erbond
1 Mar, 2026, 19:31

Sorry! Meant to share this screenshot.

Dan6erbond
1 Mar, 2026, 19:31
eldad
1 Mar, 2026, 19:32

no worries

eldad
1 Mar, 2026, 19:32

It seems a bit off to have the index length set to 0, but not sure if this is the issue. I would recommend trying to set it to a higher value, but I'll share this with the team

Dan6erbond
1 Mar, 2026, 19:33

Is there a recommended length (depending on the expected content I suppose?) for FTS indexes?

eldad
1 Mar, 2026, 19:33

yes, it's really up to your use case.

eldad
1 Mar, 2026, 19:34

Nothing Appwrite specific

Dan6erbond
1 Mar, 2026, 19:34

Hmm, when I select Fulltext the length input disappears?

Dan6erbond
1 Mar, 2026, 19:34

Only available for "Key".

eldad
1 Mar, 2026, 19:35

Got it, it might be it really is not relevant and we shouldn't even show it, but I'm checking with our databases team to be sure. They will have more insights.

2 Mar, 2026, 06:49

Will check what is the issue. Can you share details about projectId/databaseId/tableId please 🙏

2 Mar, 2026, 08:04

Sure, the projectId/databaseId are skincare-buddy, the tableId is products.

2 Mar, 2026, 09:03

Thank you. Did you delete the indexes? Can not see them besides an issue with this index

TypeScript
name_fts_index

Cleared it since it was stuck

Please try to delete the indexes if you see them and recreate. Should be ok now.

2 Mar, 2026, 09:34

It works now! Cool! What was the fix?

2 Mar, 2026, 09:37

The index got stuck for some reason during the creation, might be a cache issue. Should be ok now.. Please feel free to contact as for any issues you are facing 🙏

2 Mar, 2026, 09:38

Interesting! Good to know! Curious - in self-hosted deployments how would I have fixed that? I'm still deciding between self-hosting/AppWrite Cloud for this project, for future projects that are more serious I'll probably go with Cloud but this is a toy app so it would be good to know how I can force recreation of an index.

2 Mar, 2026, 09:41

In self hosted I would check If the index was created in the table. Drop if exist. Delete the index using the console and recreate.

1
2 Mar, 2026, 09:43

Gotcha! Thanks so much for your help! Glad to see it's working now!

1
11 Mar, 2026, 17:58

Hey! Is it possible that my project has an error again with the index creation? I'm getting:json { "message": "Searching by attribute \"brand.name\" requires a fulltext index.", "code": 400, "type": "general_query_invalid", "version": "1.8.1" } Even though I have the indexes:

11 Mar, 2026, 17:58

Although this time I'm wondering if it's because I'm trying to do FTS on a relationship:ts Query.or([ Query.search("name", search), Query.search("brand.name", search), ])

11 Mar, 2026, 20:34

Can you check please , are you able to search same attribute using full text , not using relationship? Is you can that means we have a bug to fix

11 Mar, 2026, 20:44

I am. I have that field as searchable in other screens.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more