I’ve got a field type that uses the Keyword Tokenizer (whole term is a token), with lower case and edge n-gram filters, so e.g. “Robert Longo” is stored as “r”, “ro”, …, “robert l”, “robert lo”, etc. This all seems to work as expected on the analysis admin page.
But when I search for “robert long” (with quotes), I get no results even though that is an exact match for a token. When I search without quotes my terms get pre-tokenized and it matches all the “robert”s and all the “l”s and not just the “robert l”s. Do I need to specify a wildcard somehow to tell it there is more to the term?
From the schema:
<fieldType name="edge_text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="25" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
My goal is to have something that returns phrase matches from our stored terms that start with exactly what was given, hence exact matching and order of terms are critical.
Any ideas?
It should work fine and I could get the result.
Can you test with specific to field ? if the field name is edge_text and it is indexed you can try
q=edge_text:"robert long"