Dismax Filtering Hyphens? Why is this not working? How do I debug Dismax?
Wow, this is probably the most annoying Solr issue I've *ever* dealt
with. First question: How do I debug Dismax, and its query handling?
Issue: When I query against this StrField, I am attempting to do an
*exact* match... Albeit one that is case-insensitive :). So, 90%
exact. It works in a majority of cases. Indeed, I am teling Solr
that this field is my uniqueField and it enforces uniqueness
perfectly. The issue comes about when I try to query a document,
based on a key in this field, and the key I'm using has hyphens
(dashes) in it. Then I get zero results. Very frustrating.
Yes, the PatternTokenizerFactory is inefficient for doing what I
wanted above. It was a quick hack, while I sought something to do
exactly what I'm doing above. IE, exact / WHOLE string... but lower
Re: Dismax Filtering Hyphens? Why is this not working? How do I debug Dismax?
Wow, that's pretty infuriating. Thank you for the suggestion. I
added it to the Wiki, with the hope that if it contains misinformation
then someone will correct it and, consequently, save me from another
one of these experiences :) (...and to also document that, hey, there
is a tokenizer which treats the entire field as an exact value.)
Will go this route and re-index everything back into Solr...again...sigh.
>> name="idstr" class="solr.StrField">
>> class="solr.PatternTokenizerFactory" pattern="(.*)"
> This definition is invalid. You cannot use charfilter/tokenizer/tokenfilter with solr.StrField.
> But it is interesting that (i just tested) analysis.jsp (1.4.1) displays as if its working. But if you observe at /schema.jsp you will see that real indexed values are not lowercased.
> You can use this definition instead:
> <fieldType name="idstr" class="solr.TextField" positionIncrementGap="100">
> <tokenizer class="solr.KeywordTokenizerFactory"/>
> <filter class="solr.TrimFilterFactory"/>
> <filter class="solr.LowerCaseFilterFactory"/>