Hi,
I’m having trouble with what seems like a simple FTS
Given the data:
{ “id”: “sim_current-anthropology_1989-02_30_1” }
{ “id”: “sim_current-anthropology_1989-03_30_1” }
{ “id”: “sim_current-anthropology_1989-04_30_1” }
etc…
This FTS works (many results):
{“size”: 10, “explain”: false, “fields”: [“id”], “query”:{“wildcard”: “sim_current*”}}
This does not (0 results):
{“size”: 10, “explain”: false, “fields”: [“id”], “query”:{“wildcard”: “sim_current-*”}}
The difference is a “-” at the end of “current”.
I tried with “prefix” instead of “wildcard”.
I tried escaping the hyphen with a backslash but it errors with “invalid character ‘-’ in string escape code”.
Tried regexp:
{“size”: 10, “explain”: false, “fields”: [“id”], “query”:{“regexp”: “sim_current[-].+”}}
Tried a non-FTS with "LIKE = “sim_current-anthropology%” but it is slow even when indexed (16m records of which 1.5M begin with “sim_”)
Is there something I am missing? Thanks.