Hi,
In one of our use-case we're using a wildcard query on a field("cmpy") with searchQuery(val). Let's say values on different documents for "cmpy" field is "val", "1 val", "a value". Ask is, is there a way to order the results such as exactly matched text("val") should be on top & then followed by other documents? Tried "rewrite" as well but couldn't able to get "val" on top of the results.
You could use ngram or edge ngram based analyzers to index your field in addition to the default analyzer.
Then you can query both fields and boost if neede the field with exact match.
Some examples at:
Es_version: 6.4
It's urgent that you upgrade to at the very least 6.8 or better 7.15.0.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.