How to reverse the results on EdgeNGramFilterFactory?

97 views Asked by At
<analyzer type="query">
    <tokenizer class="solr.StandardTokenizerFactory"/>
    <filter class="solr.StandardFilterFactory"/>
    <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
    <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="15"/>
</analyzer>

Above is my query ^

Search ==> Saree

Results of EdgeNGramFilterFactory ==> [sar, sare, saree]

then the searching happens ..but products title (boost field) having value sar appears first in the list...but I want results of saree first and then remaining word

what I want ==> [saree, sare, sar]

Can anyone suggest how can I get above results. Thanks.

edit1

rawquerystring": "saree", "querystring": "saree",

"parsedquery": "(+DisjunctionMaxQuery(((category_name_textv:sar category_name_textv:sare category_name_textv:saree) | ((title_textv:sar title_textv:sare title_textv:saree)^0.24) | (product_id_text:sar product_id_text:sare product_id_text:saree) | ((specification_textv:sar specification_textv:sare specification_textv:saree)^0.5) | ((description_textv:sar description_textv:sare description_textv:saree)^0.5)))

I printed values of deubg=all as pointed by @MatsLindh

how can I change patter of highlighted part

(category_name_textv:sar category_name_textv:sare category_name_textv:saree)

to

(category_name_textv:saree category_name_textv:sare category_name_textv:sar)

Please suggest to achieve the above pattern. Thanks in advance.

0

There are 0 answers