I use solr to make a short query with brand. I want the equal match, but understand that it is impossible in the Lucene. I tried some hardcoded query just for tests
myBrand:2\+2 and myBrand:\+
I get 2:2, seems and condition not working or not so how I am expect?
Also, i try fq
myBrand:2\+2 with a fq of myBrand:\+
Now, no results at all.
I use Solr 5 and make all tests in the Solr web interface. Is there some method to get the best matching of some short brands, nicknames and etc, when I no need too much eristics and want strong equal matching? Or anyway I have to filter results in my own code after solr query executed?
UPDATED
Changes in a schema resolved my issues.
Now it is working for the queries 2+2
like a charm.
<fieldType name="text_general" class="solr.TextField" multiValued="true" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.PatternTokenizerFactory" pattern="\s*"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.PatternTokenizerFactory" pattern="\s*"/>
</analyzer>
</fieldType>
2:2
, its not what i want(first screen short), but when i can try to filter it by+
symbol, there is no results at all(second one)-( What am i doing wrong? – fedorshishi