--- On Fri, 8/10/12, Lochschmied, Alexander <alexander.lochschm...@vishay.com> 
wrote:

> From: Lochschmied, Alexander <alexander.lochschm...@vishay.com>
> Subject: Indexing wildcard patterns
> To: "solr-user@lucene.apache.org" <solr-user@lucene.apache.org>
> Date: Friday, August 10, 2012, 11:07 AM
> Coming from a SQL database based
> search system, we already have a set of defined patterns
> associated with our searchable documents.
> 
> % matches no or any number of characters
> _ matches one character
> 
> Example:
> Doc 1: 'AB%CD', 'AB%CD%'
> Doc 2: 'AB_CD'
> ...
> 
> Thus Doc 1 matches
> ABXYZCD
> ABCD
> ABCDXYZ
> ...
> 
> Whereas Doc 2 matches only
> ABXCD
> ABYCD
> ABZCD
> ...
> 
> This can be achieved in SQL WHERE statements using the LIKE
> operator.
> 
> Is there a (similar) way to this in Solr?

Yes, wildcard search in solr

* matches no or any number of characters
? matches one character

 http://lucene.apache.org/core/3_6_0/queryparsersyntax.html#Wildcard%20Searches

Reply via email to