Hi

I have a problem with the following context. 

I have a field with a custom type of "shingledcontent", defined as follows in 
the schema.xml

   <field name="shingledContent" 
                        type="shingledcontent" 
                        compressed="true" 
                        omitNorms="false" 
                        termVectors="true" 
                        termOffsets="true" 
                        termPositions="true" 
                        indexed="true" 
                        stored="false" 
                        multiValued="false"
                        required="true" /> 

where

<fieldType name="shingledcontent" class="solr.TextField" sortMissingLast="true">
      <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StandardFilterFactory"/>
                <filter class="solr.LowerCaseFilterFactory" />
        <filter class="solr.ShingleFilterFactory" outputUnigrams="true" 
maxShingleSize="2"/>
      </analyzer>
      
      <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StandardFilterFactory"/>
                <filter class="solr.LowerCaseFilterFactory" />
        <filter class="solr.ShingleFilterFactory" outputUnigrams="false" 
maxShingleSize="2"/>
      </analyzer> 
     </fieldType>

I then define a request handler as follows

<requestHandler name="/test" class="solr.SearchHandler">
    <lst name="defaults">
       <str name="defType">dismax</str>
       <str name="q.alt">" "</str> 
       <str name="fl">"title,score"</str> 
       <int name="start">0</int>
       <int name="rows">2000</int>
       <str name="echoParams">all</str>
       <str name="qf">titleAnalyzed^2.0 shingledContent^1.0 content^1.0</str>
    </lst>
     <lst name="appends">
       <str name="fq">someTest:false</str> 
       <str name="fq">anotherTest:false</str> 
     </lst>
     <arr name="last-components">
         <str>Test</str>
     </arr>
     </requestHandler>
     <searchComponent name="Test" class="com.a.b.c"/>
 
the problem I am seeing is that the shingledContent field query never shows up 
in the query - what I see is:

Q: +(content:dog | titleAnalyzed:dog^2.0) ()

("content" and "titleAnalyzed" are both of type "text_general", found in the 
default schema.xml). If I change "shingedContent" field to be of type 
"text_general" it is correctly included in the query field. 

Is this a correct behavior or am i making an error somewhere?

thank you





Reply via email to