You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "damian.pawski" <dp...@gmail.com> on 2018/03/01 13:26:18 UTC
ShingleFilterFactory - multiple fields with an OR operator
Hi
I have two fields on which I have applied *ShingleFilterFactory*, when I am
searching against each field separately everything is working fine, but when
I try to combine two searches with an *OR* statement then I am getting wrong
results.
For an example
/FieldOne:(business analysts) I am getting 10 results
FieldTwo:(business analysts) I am getting 20 results /
checked them and those are unique, so all together I have 30 results.
I want to send 1 single Solr query similar to this one:
/ FieldOne:(business analysts) *OR *FieldTwo:(business analysts)/ - I am
getting 200 results;
In combined search I am getting much more results than I am expecting, what
I am doing wrong?
This is the field type
<fieldType name="customField" class="solr.TextField"
positionIncrementGap="100" >
<analyzer type="index">
<charFilter class="solr.HTMLStripCharFilterFactory"/>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.ShingleFilterFactory" tokenSeparator=""
maxShingleSize="7" outputUnigrams="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.ShingleFilterFactory" tokenSeparator=""
maxShingleSize="7" outputUnigrams="true"/>
<filter class="solr.LowerCaseFilterFactory" />
</analyzer>
</fieldType>
Thank you
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html