Hi Pawel,
If you are searching on any field of type "text_general" as defined in your
schema, you are stuck with the porter stemmer. In fact in your setting solr
is not aware of a term like "cats", but "cat". Thus no way to do exact
match  with "cats" in this case.
What you can do is creating a new type of field and with the copyField
facility save a verbatim version of your data in that field while the field
of type "text-general" still performs stemming. Finally, do add the new
field to the list of searcheable field with a higher boost so that exact
match receives highest score.
Hope this helps.
regards,

Maj


On 25 April 2013 14:43, vsl <ociepa.pa...@gmail.com> wrote:

> Exact matching is just one of my cases.  Currently I perform search on
> field
> with given definition:
>
>     <fieldType name="text_general" class="solr.TextField"
> positionIncrementGap="100">
>       <analyzer type="index">
>         <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="1" generateNumberParts="1"
>           catenateWords="1" catenateNumbers="1" catenateAll="0"
> splitOnCaseChange="1" preserveOriginal="1" types="characters.txt"/>
>         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>         <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true"/>
>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <filter class="solr.SnowballPorterFilterFactory"
> language="English"/>
>       </analyzer>
>       <analyzer type="query">
>         <filter class="solr.WordDelimiterFilterFactory"
> generateWordParts="1" generateNumberParts="1"
>           catenateWords="1" catenateNumbers="1" catenateAll="0"
> splitOnCaseChange="1" preserveOriginal="1" types="characters.txt"/>
>         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
>         <filter class="solr.StopFilterFactory" ignoreCase="true"
> words="stopwords.txt" enablePositionIncrements="true"/>
>         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>         <filter class="solr.SnowballPorterFilterFactory"
> language="English"/>
>
>       </analyzer>
>     </fieldType>
>
> This field definition fullfils all other requirments.
> Examples:
> - special characters
> - passengers<-> passenger
>
> The case with exact matching is the last one I have to complete.
>
> The problem with cats <-> cat is caused by SnowballPorterFilterFactory.
> This
> is what I know.
>
> The question is whether it is possible to handle exact matching (edismax)
> with only one result like described in the previous post without
> influencing
> existing functionalities?
>
> BR
> Pawel
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Exact-matching-in-Solr-3-6-1-tp4058865p4058907.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to