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 jo...@aol.com on 2010/01/19 05:04:20 UTC

Tokenization and wild card search

Hi,
 
I have an issue and I'm not sure how to address it, so I hope someone can help me.
 
I have the following text in one of my fields: "ABC_Expedition_ERROR".   When I search on it like: "MyField:SDD_Expedition_PCB" (without quotes) it will fail to find me only this word “ABC_Expedition_ERROR” which I think is due to tokenization because of the underscore.
 
My solution is: "MyField:"SDD_Expedition_PCB"" (without the outer quotes, but quotes around the word “ABC_Expedition_ERROR”).  This works fine.  But then, how do I search on "SDD_Expedition_PCB" with wild card?  For example: "MyField:SDD_Expedition*" will not work.
 
Any help is greatly appreciated.
 
Thanks.
 
-- JM
 
=

Re: Tokenization and wild card search

Posted by Ahmet Arslan <io...@yahoo.com>.
> I have an issue and I'm not sure how to address it, so I
> hope someone can help me.
>  
> I have the following text in one of my fields:
> "ABC_Expedition_ERROR".   When I search on it
> like: "MyField:SDD_Expedition_PCB" (without quotes) it will
> fail to find me only this word “ABC_Expedition_ERROR”
> which I think is due to tokenization because of the
> underscore.

Do you want or do not want your query MyField:SDD_Expedition_PCB to return documents containing ABC_Expedition_ERROR?

> My solution is: "MyField:"SDD_Expedition_PCB"" (without the
> outer quotes, but quotes around the word
> “ABC_Expedition_ERROR”).  This works fine. 
> But then, how do I search on "SDD_Expedition_PCB" with wild
> card?  For example: "MyField:SDD_Expedition*" will not
> work.

Can you paste your field type of MyField? And give some examples what queries should return what documents.