Hi,

I have some fields that are only used for faceting, so they're only
queried by facet results. No modification is needed, no lowercase,
nothing. So the KeywordTokenizerFactory seems to be perfect for them.

Alas, when the value contains spaces, I'm still getting too many
results. I have a field defined like this:

    <fieldType name="text_unchanged" class="solr.StrField"
positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.KeywordTokenizerFactory"/>
      </analyzer>
    </fieldType>

(Using solr.TextField didn't change anything)

When quering for:
....&fq=label:Aces+of+London

I get the result:
.... "facet_fields":{
        "label":[
         "Aces of London",31,
         "Feud London",2,
         "Fly London",2],
....},

I get the same result when taking "Feud London" as the facet value.

When inspecting the index with the schema browser, I can see that all
labels are tokenized correctly in complete, i.e. there's no token
"London", but a token "Aces of London". So the KeywordTokenizer seems to
work as expected, at least for indexing. It's only that the facet query
is not narrow enough.

Even the superb Solr book didn't help me here. Does anybody have a clue
what I'm doing wrong here?

Greetings,
Michael

Reply via email to