Sorting with wildcards. occurrences of term. amount of “*searchstring*”

hi all
i have nasty problem with elastic result sorting combined with boolean type of query (a kind of wildcard).

lets say we have blog post with field "content". each post contains some info about dragons. with all combination of that words "dragonians.. drago. minidragon.". alot of text.

and we need to searching it, by string "*rago*" .

idealy that means that we need to match all documents, that contains all that combination for *rago*

im using simple_query before

"query_string": { "default_field": "content", "query": "*rago*" }

im satisfied with result. but sorting... is not taking into account amount of occurrences. sorting are ignoring how many times that "*rago*" was occured in content field of each document.

how to solve that?

i spent few days on googling... term vectors.. field data. scripts etc. but anyway nothing seems related to the problem. sorting works with match query for example, but then i need to search for "dragon" not for "*rago*"

but for suggestion search i using > i need to be able to search by any part of input string.

will really appreciate any kind of help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.