Text Filter Query


#1

Hi I have an app with react and i need to apply a textfilter to the interaction manager programatically for that reason i’m using the text search with this query: .textfilter('company_code:1145798*') and it doesn’t work, butwhen i delete the * wildcard it works but just for complete numbers, am i doing somethig wrong or is a bad query?.


#2

It looks like a normal text search, it’s probably your entire AQL, pls share a little more code to be more clear :thinking::thinking::thinking:


#3

Of course this is my complete code:

cf.provider('Elasticsearch')
    .source('my_companies')
    .rows('comp_type')
    .fields()
    .textfilter(`company_code:1145798*`)
    .limit(10)
    .set('sort', [{ company_code: 'desc' }])
    .execute();

#4

Ok, your code is looking good, maybe your problem is in your document structure, in the elasticsearch side, if your filed company_code is a LONG there is no math to do on that field, please make sure company_code is also indexed as keyword instead of long