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 Praveen Kumar Jayaram <Pr...@gmail.com> on 2009/04/02 08:02:55 UTC

How do I combine WhitespaceTokenizerFactory and EdgeNGramTokenizerFactory?

Hi folks,

I am trying to use features of WhitespaceTokenizerFactory and
EdgeNGramTokenizerFactory.
My requirement is to search a String using substring and inword concepts.

For example:
Let us assume the String as "Praveen  Kumar Jayaram".
The query for "Kumar" will be successful if we use
WhitespaceTokenizerFactory.
And the query for "Pra" will be successful if we use
EdgeNGramTokenizerFactory.

Now I need to search with query string "Kum". I tried using these two
tokenizer factories parallely but got an error saying we can use only one
tokenizer per field.
Could you please help in achieving this requirement??

Thanks in advance.

Regards,
Praveen

-----
Regards,
Praveen
-- 
View this message in context: http://www.nabble.com/How-do-I-combine-WhitespaceTokenizerFactory-and-EdgeNGramTokenizerFactory--tp22841455p22841455.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How do I combine WhitespaceTokenizerFactory and EdgeNGramTokenizerFactory?

Posted by Praveen Kumar Jayaram <Pr...@gmail.com>.

Thanks for the suggestion Otis.
This works.


Otis Gospodnetic wrote:
> 
> 
> Hi,
> 
> Try defining 2 separate fields and using copyField.
> 
> 
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
> 
> 
> 
> ----- Original Message ----
>> From: Praveen Kumar Jayaram <Pr...@gmail.com>
>> To: solr-user@lucene.apache.org
>> Sent: Thursday, April 2, 2009 2:02:55 AM
>> Subject: How do I combine WhitespaceTokenizerFactory and
>> EdgeNGramTokenizerFactory?
>> 
>> 
>> Hi folks,
>> 
>> I am trying to use features of WhitespaceTokenizerFactory and
>> EdgeNGramTokenizerFactory.
>> My requirement is to search a String using substring and inword concepts.
>> 
>> For example:
>> Let us assume the String as "Praveen  Kumar Jayaram".
>> The query for "Kumar" will be successful if we use
>> WhitespaceTokenizerFactory.
>> And the query for "Pra" will be successful if we use
>> EdgeNGramTokenizerFactory.
>> 
>> Now I need to search with query string "Kum". I tried using these two
>> tokenizer factories parallely but got an error saying we can use only one
>> tokenizer per field.
>> Could you please help in achieving this requirement??
>> 
>> Thanks in advance.
>> 
>> Regards,
>> Praveen
>> 
>> -----
>> Regards,
>> Praveen
>> -- 
>> View this message in context: 
>> http://www.nabble.com/How-do-I-combine-WhitespaceTokenizerFactory-and-EdgeNGramTokenizerFactory--tp22841455p22841455.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 


-----
Regards,
Praveen
-- 
View this message in context: http://www.nabble.com/How-do-I-combine-WhitespaceTokenizerFactory-and-EdgeNGramTokenizerFactory--tp22841455p22862468.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: How do I combine WhitespaceTokenizerFactory and EdgeNGramTokenizerFactory?

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hi,

Try defining 2 separate fields and using copyField.


Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Praveen Kumar Jayaram <Pr...@gmail.com>
> To: solr-user@lucene.apache.org
> Sent: Thursday, April 2, 2009 2:02:55 AM
> Subject: How do I combine WhitespaceTokenizerFactory and EdgeNGramTokenizerFactory?
> 
> 
> Hi folks,
> 
> I am trying to use features of WhitespaceTokenizerFactory and
> EdgeNGramTokenizerFactory.
> My requirement is to search a String using substring and inword concepts.
> 
> For example:
> Let us assume the String as "Praveen  Kumar Jayaram".
> The query for "Kumar" will be successful if we use
> WhitespaceTokenizerFactory.
> And the query for "Pra" will be successful if we use
> EdgeNGramTokenizerFactory.
> 
> Now I need to search with query string "Kum". I tried using these two
> tokenizer factories parallely but got an error saying we can use only one
> tokenizer per field.
> Could you please help in achieving this requirement??
> 
> Thanks in advance.
> 
> Regards,
> Praveen
> 
> -----
> Regards,
> Praveen
> -- 
> View this message in context: 
> http://www.nabble.com/How-do-I-combine-WhitespaceTokenizerFactory-and-EdgeNGramTokenizerFactory--tp22841455p22841455.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: How do I combine WhitespaceTokenizerFactory and EdgeNGramTokenizerFactory?

Posted by Praveen Kumar Jayaram <Pr...@gmail.com>.

Is there a way to achieve this requiremnt?
Please give your valuable comments.


Praveen Kumar Jayaram wrote:
> 
> Hi folks,
> 
> I am trying to use features of WhitespaceTokenizerFactory and
> EdgeNGramTokenizerFactory.
> My requirement is to search a String using substring and inword concepts.
> 
> For example:
> Let us assume the String as "Praveen  Kumar Jayaram".
> The query for "Kumar" will be successful if we use
> WhitespaceTokenizerFactory.
> And the query for "Pra" will be successful if we use
> EdgeNGramTokenizerFactory.
> 
> Now I need to search with query string "Kum". I tried using these two
> tokenizer factories parallely but got an error saying we can use only one
> tokenizer per field.
> Could you please help in achieving this requirement??
> 
> Thanks in advance.
> 
> Regards,
> Praveen
> 


-----
Regards,
Praveen
-- 
View this message in context: http://www.nabble.com/How-do-I-combine-WhitespaceTokenizerFactory-and-EdgeNGramTokenizerFactory--tp22841455p22845811.html
Sent from the Solr - User mailing list archive at Nabble.com.