Is it possible to use omitTermFreqAndPositions="true" in a <fieldType> 
declaration that uses class="solr.TextField"? I've tried doing this and it does 
not seem to work (i.e., the prx file size does not change). Using it in a 
<field> declaration does work, but I'd rather set it in the <fieldType> so I 
don't have to repeat it multiple times in my schema.

>From my schema.xml file:
<fieldType name="foobar" class="solr.TextField" sortMissingLast="true"
    omitNorms="true" omitTermFreqAndPositions="true" indexed="true"
    stored="true" positionIncrementGap="100">
  <analyzer>
    <tokenizer class="solr.KeywordTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
  </analyzer>
</fieldType>

In the TextField class I found that it disables OMIT_TF_POSITIONS, which I'm 
assuming is the cause of my problem:
if (schema.getVersion()> 1.1f) properties &= ~OMIT_TF_POSITIONS;

Does it even make sense to use omitTermFreqAndPositions for a TextField, or am 
I perhaps doing something I shouldn't be?

-Michael

Reply via email to