Reputation: 448
I have an issue where I have an index on a set of staff records. The full text index is based on the person's name and position.
I can search for a name like "john" without an issue, and part of a name like "anthon" and that works.
However, some names won't search correctly such as "anthony" returns no results, but "anth" returns all anthony's. Like wise searching for "carly" returns nothing, but "car" does.
Upvotes: 3
Views: 1272
Reputation: 52769
As Maurico commented, Stemming is not recommended for Person names.
Stemming would cause a lot of unexpected results atleast for person names.
Also, it would be interesting to check your schema.xml and the field analysis applied.
This issue can occur if your are using different analysis at index and query time.
From http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#Analyzers
Analyzers are components that pre-process input text at index time and/or at search time. It's important to use the same or similar analyzers that process text in a compatible manner at index and query time. For example, if an indexing analyzer lowercases words, then the query analyzer should do the same to enable finding the indexed words.
From the example you mentioned, you seem to have Stemmer on the field at index time however the same does not seem to exist at query time analysis.
Upvotes: 2