You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Luke Shannon <ls...@futurebrand.com> on 2005/02/17 16:40:35 UTC

Searches Contain Special Characters

Hi All;

How could I handle doing a wildcard search on the input *mario?

Basically I would be interested in finding all the Documents containing
<anything>*mario<anything>

Here is an example of such a Query generated:

+(type:138) +(name:**mario*)

How can I let Lucene know that the star closest to Mario on the left is to
be treated as a string, not a matching character?

Thanks,

Luke



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Searches Contain Special Characters

Posted by Volodymyr Bychkoviak <vb...@i-hypergrid.com>.
Use \ to escape special symbols.

http://jakarta.apache.org/lucene/docs/queryparsersyntax.html

Regards,
Volodymyr Bychkoviak

Luke Shannon wrote:

>Hi All;
>
>How could I handle doing a wildcard search on the input *mario?
>
>Basically I would be interested in finding all the Documents containing
><anything>*mario<anything>
>
>Here is an example of such a Query generated:
>
>+(type:138) +(name:**mario*)
>
>How can I let Lucene know that the star closest to Mario on the left is to
>be treated as a string, not a matching character?
>
>Thanks,
>
>Luke
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org