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 "Amdebirhan, Samson, VF-Group" <Sa...@vodafone.com> on 2011/01/06 16:41:35 UTC

search terms as substring of query

Hi all,

 

I'm configuring  solr to index some documents.

 

I index these fields:

aaa/1.0/sample-1

 

When I  search for  'aaa/1.0/sample-1word' or 'wordaaa/1.0/sample-1'
solr doesn't  find any document.

 

If I search  for 'aaa/1.0/sample-1' or a substring of 'aaa/1.0/sample-1'
I obviously get results.

 

Is there  any configuration or search methods to have the
'aaa/1.0/sample-1word' or 'wordaaa/1.0/sample-1' return a valid document
results?

 

 

Thanks

Sam


Re: search terms as substring of query

Posted by Ahmet Arslan <io...@yahoo.com>.
--- On Thu, 1/6/11, Amdebirhan, Samson, VF-Group <Sa...@vodafone.com> wrote:

> From: Amdebirhan, Samson, VF-Group <Sa...@vodafone.com>
> Subject: search terms as substring of query
> To: solr-user@lucene.apache.org
> Date: Thursday, January 6, 2011, 5:41 PM
> Hi all,
> 
>  
> 
> I'm configuring  solr to index some documents.
> 
>  
> 
> I index these fields:
> 
> aaa/1.0/sample-1
> 
>  
> 
> When I  search for  'aaa/1.0/sample-1word' or
> 'wordaaa/1.0/sample-1'
> solr doesn't  find any document.
> 
>  
> 
> If I search  for 'aaa/1.0/sample-1' or a substring of
> 'aaa/1.0/sample-1'
> I obviously get results.
> 
>  
> 
> Is there  any configuration or search methods to have
> the
> 'aaa/1.0/sample-1word' or 'wordaaa/1.0/sample-1' return a
> valid document
> results?

Usage NGramFilterFactory or NGramTokenizerFactory of can help. Depending of your solr version you may need PositionFilterFactory to prevent auto generated phrase queries.