lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elisabeth benoit <>
Subject matching with whole field
Date Thu, 02 Aug 2012 07:56:33 GMT

I am using Solr 3.4.

I'm trying to define a type that it is possible to match with only if
request contains exactly the same words.

Let's say I have two different values for ONLY_EXACT_MATCH_FIELD

ONLY_EXACT_MATCH_FIELD: salon de coiffure
ONLY_EXACT_MATCH_FIELD: salon de coiffure pour femmes

I would like to match only with the first ont when requesting Solr with
fq=ONLY_EXACT_MATCH_FIELD:(salon de coiffure)

As far has I understood, the solution is to do not tokenize on white
spaces, and use instead solr.KeywordTokenizerFactory

My actual type is defined as followed in schema.xml

    <fieldType name="ONLY_EXACT_MATCH_FIELD" class="solr.TextField"
omitNorms="true" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <charFilter class="solr.MappingCharFilterFactory"
        <filter class="solr.ISOLatin1AccentFilterFactory"/>
        <filter class="solr.StandardFilterFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.LengthFilterFactory" min="1" max="100" />

But matching with fields with more then one word doesn't work. Does someone
have a clue what I am doing wrong?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message