Tokenize result of a NGramFilterFactory in Solr (query analyzer)

2012-02-10 Thread Mathias Hodler
Hi,

I'm using the NGramFilterFactory for indexing and querying.

So if I'm searching for overflow it creates an query like this:

mySearchField:ov ve ... erflow overflo verflow overflow

But if I misspelled overflow, i.e. owerflow there are no matches
because the quotes around the query:

mySearchField:ow we ... erflow owerflo werflow owerflow

Is it possible to tokenize the result of the NGramFilteFactory, that
it'll creates an query like this:

mySearchField:ow
mySearchField:we
mySearchField:erflow
mySearchField:owerflo
mySearchField:werflow
mySearchField:owerflow

In this case solr would find results, because the token erflow exists.


Re: Tokenize result of a NGramFilterFactory in Solr (query analyzer)

2012-02-10 Thread Ahmet Arslan
 I'm using the NGramFilterFactory for indexing and querying.
 
 So if I'm searching for overflow it creates an query like
 this:
 
 mySearchField:ov ve ... erflow overflo verflow overflow
 
 But if I misspelled overflow, i.e. owerflow there are no
 matches
 because the quotes around the query:
 
 mySearchField:ow we ... erflow owerflo werflow owerflow
 
 Is it possible to tokenize the result of the
 NGramFilteFactory, that
 it'll creates an query like this:
 
 mySearchField:ow
 mySearchField:we
 mySearchField:erflow
 mySearchField:owerflo
 mySearchField:werflow
 mySearchField:owerflow
 
 In this case solr would find results, because the token
 erflow exists.

fieldType class=solr.TextField autoGeneratePhraseQueries=false should 
work for you.


Re: Tokenize result of a NGramFilterFactory in Solr (query analyzer)

2012-02-10 Thread Mathias Hodler
Hi Ahmet,

awesome! Now it works.

2012/2/10 Ahmet Arslan iori...@yahoo.com:
 I'm using the NGramFilterFactory for indexing and querying.

 So if I'm searching for overflow it creates an query like
 this:

 mySearchField:ov ve ... erflow overflo verflow overflow

 But if I misspelled overflow, i.e. owerflow there are no
 matches
 because the quotes around the query:

 mySearchField:ow we ... erflow owerflo werflow owerflow

 Is it possible to tokenize the result of the
 NGramFilteFactory, that
 it'll creates an query like this:

 mySearchField:ow
 mySearchField:we
 mySearchField:erflow
 mySearchField:owerflo
 mySearchField:werflow
 mySearchField:owerflow

 In this case solr would find results, because the token
 erflow exists.

 fieldType class=solr.TextField autoGeneratePhraseQueries=false should 
 work for you.