Hi Riz,

You likely have some form of stemming in your indexing analysis chain - this 
may cause "panasonic", e.g., to be indexed as "panason".  (The remainder of 
this email assumes that this is true.)

When you search for "panasonic", presumably with the same stemming filter in 
your query analysis chain, "panasonic" is transformed to "panason", and there 
will be a match.

However, prefix queries do not invoke any analysis, so your prefix query 
"panasonic*" will search for any term beginning with "panasonic", but since all 
"panasonic" terms have been indexed as "panason", there will be no match.

How to fix it?  Well, is stemming important?  If not, simply turning it off 
would fix the prefix query issue. 

In response to someone with similar issues, Mark Miller wrote 
<http://www.lucidimagination.com/search/document/a9de1bb7ab3f25f/query_with_stemming_prefix_and_fuzzy#e6d177dd8e076cf1>:

> Truncation queries and stemming are difficult partners. You likely have 
> to accept compromise. You can try using multiple fields like you are, 
> you can try indexing the full term at the same position as the stemmed 
> term, or you can accept the weirdness that comes from matching on a 
> stemmed form (potentially very confusing for a user).

Steve

> -----Original Message-----
> From: M.Rizwan [mailto:griz...@gmail.com]
> Sent: Saturday, November 13, 2010 12:13 AM
> To: solr-user@lucene.apache.org
> Subject: Searching problem
> 
> Hi All,
> 
> Do you have any idea that why solr search for "panasonic*" ( without
> quotes ) does not match "panasonic" ?
> If we search "panasonic" it matches a result but if we search with
> "panasonic*" it does not find it.
> 
> What needs to be done here ?
> 
> Thanks
> 
> Riz

Reply via email to