lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Chillrud <>
Subject RE: Solr Exact match boost Reduce the results
Date Fri, 12 Jun 2015 17:35:43 GMT
If I understand you correctly you want to boost the score of documents where the contents of
the product_name field match exactly (other than case) the query string.

I think what you need is for the dummy_name field to be non-tokenized (indexed as a single
string rather than parsed into individual words). The name of the field type you have configured
the dummy_name field  to use (string_ci) would seem to indicate this is your intent. However
the definition of string_ci doesn't match the name. It is configured to use the WhitespaceTokenizerFactory
tokenizer, which will break the contents of the field up into multiple tokens where ever white
space occurs.

Try defining string_ci using the (somewhat cryptically named) KeywordTokenizerFactory, which
will index the entire contents of the field as a single token. Something like:

    <fieldType name="string_ci" class="solr.TextField" positionIncrementGap="100" omitNorms="true">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr. LowerCaseFilterFactory"/>

- Andy -

-----Original Message-----
From: JACK [] 
Sent: Friday, June 12, 2015 12:54 PM
Subject: Re: Solr Exact match boost Reduce the results

As explained above, actually I have around 10 lack data not 5 row. It's not about synonyms
. When I checked in the FAQ page of Solr wiki, it is found that if we need to get exact match
results first, use a copy field with different configuration. That's why I followed this way.

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message