Search code examples
arangodbaql

why text_en doesn't work on type : "vegetable" in arangosearch example


i was doing the example provided in the first page of arangosearch in manual of arangodb which is we have a set of documents about foods with two fields : name and type in the aql query when i set search analyzer(doc.type == "fruit" , "text_en") it just works fine , but when i change the value from "fruit" to be "vegetable" it just returns an empty array , text_en is set in indexing time and it is showing it in the configuration of the view , it only works if i change the value back to fruit or use "identity" instead of "text_en" why is that ? any solutions ? link to the manual : https://www.arangodb.com/docs/stable/arangosearch.html#search-expressions-with-arangosearch-functions


Solution

  • so apparently "text_en" turns "vegetable" to "veget" (stems it) and stores it like that in the view , if "text_en" is also applied to the entry value , it works , for example : search analyzer(doc.type in tokens("vegetable" , "text_en") , "text_en")