You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jörg Agatz <jo...@googlemail.com> on 2009/09/29 15:12:41 UTC

Problem with Wildcard...

Hi Users...

i have a Problem....

I have a lot of fields, (type=text) for search in all fields i copy all
fields in the default text field and use this for default search.

Now i will search...

This is into a Field....

"RI-MC500034-1"
when i search "RI-MC500034-1" i found it...
if i seacht "RI-MC5000*" i dosen´t

when i search "500034" i found it...
if i seacht "5000*" i dosen´t

what can i do to use the Wildcards?

KingArtus

Re: Problem with Wildcard...

Posted by Christian Zambrano <cz...@gmail.com>.
Another thing to remember about wildcard and fuzzy searches is that none 
of the token filters will be applied.

If you are using the LowerCaseFilterFactory at index time, then 
"RI-MC50034-1" gets converted to "ri-mc50034-1" which is never going to 
match "RI-MC5000*"

Also, I would probably use the analyze page of your solr admin site to 
see what tokens are produced from "RI-MC500034-1" and "500034" based on 
your schema

On 10/01/2009 02:42 AM, Shalin Shekhar Mangar wrote:
> On Tue, Sep 29, 2009 at 6:42 PM, Jörg Agatz<jo...@googlemail.com>wrote:
>
>    
>> Hi Users...
>>
>> i have a Problem....
>>
>> I have a lot of fields, (type=text) for search in all fields i copy all
>> fields in the default text field and use this for default search.
>>
>> Now i will search...
>>
>> This is into a Field....
>>
>> "RI-MC500034-1"
>> when i search "RI-MC500034-1" i found it...
>> if i seacht "RI-MC5000*" i dosen´t
>>
>> when i search "500034" i found it...
>> if i seacht "5000*" i dosen´t
>>
>> what can i do to use the Wildcards?
>>
>>      
> I guess one thing you need to do is to add preserveOriginal="true" in the
> WordDelimiterFactory section in your field type. That would help match
> things like "RI-MC5000*". Make sure you re-index all documents after this
> change.
>
> As for the others, add debugQuery=on as a request parameter and see how the
> query is being parsed. If you have a doubt, paste it on the list and we can
> help you.
>
>    

Re: Problem with Wildcard...

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Tue, Sep 29, 2009 at 6:42 PM, Jörg Agatz <jo...@googlemail.com>wrote:

> Hi Users...
>
> i have a Problem....
>
> I have a lot of fields, (type=text) for search in all fields i copy all
> fields in the default text field and use this for default search.
>
> Now i will search...
>
> This is into a Field....
>
> "RI-MC500034-1"
> when i search "RI-MC500034-1" i found it...
> if i seacht "RI-MC5000*" i dosen´t
>
> when i search "500034" i found it...
> if i seacht "5000*" i dosen´t
>
> what can i do to use the Wildcards?
>

I guess one thing you need to do is to add preserveOriginal="true" in the
WordDelimiterFactory section in your field type. That would help match
things like "RI-MC5000*". Make sure you re-index all documents after this
change.

As for the others, add debugQuery=on as a request parameter and see how the
query is being parsed. If you have a doubt, paste it on the list and we can
help you.

-- 
Regards,
Shalin Shekhar Mangar.