Permutation of words in elasticsearch -
in elasticsearch treat documents identical in case values of specific text field differ order of terms.
how can accomplish in elasticsearch?
update, more detailed formulation of goal:
- given have 5 documents phrases 1) "iphone white", 2) "white iphone", 3) "white iphones", 4) "black iphone" , 5) "white android" (where first 3 phrases consist of 2 basic terms "white" , "iphone")
- when search "iphone",
- then 2 results, example "iphone white" , "black iphone" (such avoid duplications due permutations of words).
- the result want each distinct combination of basic terms distinct phrase has highest score in elasticsearch query. in example there 2 distinct combinations of basic terms matches query: a) "iphone"+"white" , b) "iphone"+"black". phrases 1,2,3 match , b phrase 4 matches. phrase 1 phrase highest score...
Comments
Post a Comment