Using different analyzers for different fields in same query in arangosearch views

Viewed 121

I have a use case where given a user input I want to search across different fields. So I am able to do a query like

for v in myview
    search analyzer(v.host_name == tokens(SOME_INPUT, 'text_en')[0] OR 
                    v.ip_address == tokens(%input%, 'text_en')[0], "text_en")
    return v

and it works.

But now some of the fields have different analyzer so I in the above query, I would like to use e.g. ngram for ip_address but then the above query will not work as the second argument to analyzer(....) is text_en.

Reading the docs at https://www.arangodb.com/docs/stable/aql/operations-search.html, it does not seem like I can have multiple SEARCH stanza in the same query.

What would be the way to do a query like that?

0 Answers
Related