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 Jie Gao <j....@sheffield.ac.uk> on 2015/09/17 14:12:42 UTC

Strange behaviour of ttf function query

Hi,

I've found a very strange behaviour for ttf function query.

I can understand that ttf should be based on full-text query.

My query analyser is configured as follows:
                     <analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="false"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true" />
<filter class="solr.ASCIIFoldingFilterFactory"/>
</analyzer>

When i query a term "D blooms" via
http://localhost:8983/solr/myCore/select?q=*:*&fl=ttf(content,%27D
blooms%27)&rows=1
<http://localhost:8983/solr/tatasteel/select?q=*:*&fl=ttf(content,%27surface%20defects%27),ttf(text,Andrew),ttf(text,UK)&rows=1>
I got the result 0. However, in my text, there is 1 occurrence.

Then, i changed the term to lower case, i can got 10632 occurrences which
is exactly the same as the occurrences of "blooms".

Next, when i comment out solr.StopFilterFactory, I can get the result 1
occurrence for "d blooms", which is correct as expected.

So, my question is that if the query analyser apply to ttf function query,
why lowercase filter  (or the whole pipeline) don't apply so as to allow me
to query with upper case?

Notes, full-text query for this field don't have this problem.

any idea ?

Thanks,