lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aman Deep Singh <amandeep.coo...@gmail.com>
Subject Solr shingles is not working in solr 6.4.0
Date Thu, 16 Mar 2017 12:30:07 GMT
Hi,

Recently I migrated from solr 4 to 6
IN solr 4 shinglefilterfactory is working correctly
my configration  i

    <fieldType name="text_shingle" class="solr.TextField"
positionIncrementGap="100">
        <analyzer type="index">
         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
         <filter class="solr.ShingleFilterFactory" minShingleSize="2"
maxShingleSize="5"
                 outputUnigrams="false" outputUnigramsIfNoShingles="false" />
          <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
        <analyzer type="query">
          <tokenizer class="solr.WhitespaceTokenizerFactory"/>
         <filter class="solr.ShingleFilterFactory" minShingleSize="2"
maxShingleSize="5"
                 outputUnigrams="false" outputUnigramsIfNoShingles="false" />
          <filter class="solr.LowerCaseFilterFactory"/>
          <filter class="solr.PositionFilterFactory"/>
        </analyzer>
      </fieldType>



But after updating to solr 6 shingles is not working ,schema is as below,

        <fieldType name="text_shingle" class="solr.TextField"
positionIncrementGap="100">
        <analyzer type="index">
         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
         <filter class="solr.ShingleFilterFactory" minShingleSize="2"
maxShingleSize="5"
                 outputUnigrams="false" outputUnigramsIfNoShingles="false" />
          <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
        <analyzer type="query">
          <tokenizer class="solr.WhitespaceTokenizerFactory"/>
         <filter class="solr.ShingleFilterFactory" minShingleSize="2"
maxShingleSize="5"
                 outputUnigrams="false" outputUnigramsIfNoShingles="false" />
          <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
      </fieldType>

Although in the Analysis tab is was showing proper shingle result but when
using in the queryParser it was not giving proper results

my sample hit is

http://localhost:8983/solr/shingel_test/select?q=one%20plus%20one&wt=xml&debugQuery=true&defType=edismax&qf=cust_shingle

it create the parsed query as

<str name="rawquerystring">one plus one</str>
<str name="querystring">one plus one</str>
<str name="parsedquery">(+())/no_coord</str>
<str name="parsedquery_toString">+()</str>
<lst name="explain"/>
<str name="QParser">ExtendedDismaxQParser</str>

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