Olivier
02/26/2026, 10:55 AM{
"name": "eventsdata",
"type": "object[]",
"facet": false,
"index": true,
"optional": true
},
{
"name": "eventsdata.referencenumber",
"type": "string[]",
"facet": false,
"index": true,
"infix": true,
"optional": true
}
When I try to filter on these objects, this will return results:
"filter_by": "(eventsdata.eventtypecode:=APPDT && eventsdata.referencenumber:Ref-APPDN*)"
But not this:
"filter_by": "(eventsdata.eventtypecode:=APPDT && eventsdata.referencenumber:Ref-APPD*)"
This doesn't make sense IMHO and I'm trying to understand what could affect this behavior.Olivier
02/26/2026, 10:59 AMAlan Martini
02/26/2026, 1:22 PMtoken_separators, or symbols_toindex, the hyphen is silently dropped. So both indexed values are indexed as a single token (e.g., refappdn)
When you use wildcard in filter_by Typesense expands against it internal token index, but this is capped by max_filter_by_candidates , which defaults to 4. Ref-APPD* (tokenized as refappd*) matches many more tokens than Ref-APPDN* (refappdn*). With only 4 candidates considered, the matching documents may be missed entirely.
Could you try setting max_filter_by_candidates=100?Olivier
02/26/2026, 1:44 PMOlivier
02/26/2026, 1:44 PMAlan Martini
02/26/2026, 2:03 PMtoken_separators, either at field level or collection level.
2. If you want the hyphen to be kept as part of the token (so Ref-APPDN stays ref-appdn), add "-" to symbols_to_index.
Since you mentioned you want to index these characters, symbols_to_index: ["-"] is the way to go.