> I have one problem with querying solr. I indexed person
> with 2 fields:
>  
>  * firstname - Hans
>  * lastname - Mustermann
>  
> and I have copy field 'text' where these fields are copied.
> 'text' field is
> used during query.
>  
> Now, when I search:
>  
> han*
>  
> I do have Hans Mustermann in the query results. But if I
> will search:
>  
> hans*
>  
> I recieve no results! However query without wildcard will
> return correct
> results.
>  
> How can I configure solr to return Hans Mustermann for
> query: hans* ?
>  
> I add this wildcard dynamically (during query), so I want
> to have it in
> every query.

Easiest solution is to remove stemfilter from your analysis chain.
Or write "hans" no protword.txt file, so stemmer wont touch it.

Another solution requires writing custom code: integrate Lucene's 
AnalyzingQueryParser so that your wildcard queries are analyzed. 

http://lucene.apache.org/java/3_0_2/api/contrib-misc/org/apache/lucene/queryParser/analyzing/AnalyzingQueryParser.html

By the way why are you inserting * at the end of your queries?




      

Reply via email to