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 Niklas Langvig <ni...@globesoft.com> on 2013/03/20 16:47:23 UTC

how to search for special charcters

Hi
How can in solr serach for all documents that containing parts of the word e-mail in it?

This seems to work localhost:8080/document/select?q="e\-mail"
But I don't want to have an exact match but instead do localhost:8080/document/select?q=*e\-mail*
But that doesn't work
How should I search for this text?
Say I would like to search for "it-manager" but I would like to get a hit for just "it-man" for example

Thanks
Niklas

Re: how to search for special charcters

Posted by Upayavira <uv...@odoko.co.uk>.
Use an EdgeNGramFilterFactory in your analysis time query parser. But
note this will significantly increase the number of terms you are
searching for, which will hit performance.

Upayavira

On Wed, Mar 20, 2013, at 03:47 PM, Niklas Langvig wrote:
> Hi
> How can in solr serach for all documents that containing parts of the
> word e-mail in it?
> 
> This seems to work localhost:8080/document/select?q="e\-mail"
> But I don't want to have an exact match but instead do
> localhost:8080/document/select?q=*e\-mail*
> But that doesn't work
> How should I search for this text?
> Say I would like to search for "it-manager" but I would like to get a hit
> for just "it-man" for example
> 
> Thanks
> Niklas