Hi.
I'd like to know if there's a way to use analyzed text when querying.
The specific requirement is to search for a matched string in 'term' field && the document's 'term_length' field should be less than equal to the length of the string which is analyzed when searching(by search_analyzer) .
It would be like this :
GET api_test/_search
{
"query": {
"bool" : {
"must" : [
{
"match": {
"term": ${a string that user typed}
}
},
{
"range" : {
"term_length": {
"lte": ${analyzed string 's length}
}
}
}]
}
}
}
This query works fine for not-analyzed string. Still, I couldn't find how to access analyzed query's length when querying or in script. (also searched for script API)
If there's any idea let me know how to do that, or if my explanation is not enough, please tell me.