lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ensdorf Ken <Ensd...@zoominfo.com>
Subject RE: Solr failing on "y" charakter in string?
Date Mon, 03 Aug 2009 14:47:39 GMT
> Ok still not working with new field "text_two":
> "<str name="q">text:"Har*" text_two:"Har*"</str>"
> ==> result 0
>
> Schema Updates:
> "
> <fieldType name="text_two" class="solr.TextField"
> positionIncrementGap="100">
>       <analyzer type="index">
>       <tokenizer class="solr.LowerCaseTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
>       </analyzer>
>           <analyzer type="query">
>           <tokenizer class="solr.LowerCaseTokenizerFactory"/>
>           <filter class="solr.LowerCaseFilterFactory"/>
>           </analyzer>
>     </fieldType>
>
>
> <field name="text_two" type="text_two" indexed="true" stored="false"
> multiValued="true"/>
>
> <copyField source="text" dest="text_two"/>
> "

I'm pretty sure the query string needs to be lower-case, since a wildcard query is not analyzed.

I think what Avlesh was suggesting was more like this:

"<str name="q">text:"Har" text_two:"har*"</str>"

So the original field would be for a regular query containing whatever the user entered and
would undergo the usual analysis for searching, and the secondary field would be used to construct
a wildcard query which would strictly serve the "begins-with" case.

-Ken
Mime
View raw message