Hi,

use two fields:
1. KeywordTokenizer (= single token) with ngram minsize=1 and maxsize=2 for 
inputs of length < 3,
2. the other one tokenized as appropriate with minsize=3 and longer for all 
longer inputs


Cheers,
Chantal


Am 26.07.2012 um 09:05 schrieb Finotti Simone:

> Hi Ahmet,
> business asked me to apply EdgeNGram with minGramSize=1 on the first term and 
> with minGramSize=3 on the latter terms.
> 
> We are developing a search suggestion mechanism, the idea is that if the user 
> types "D", the engine should suggest "Dolce & Gabbana", but if we type "G", 
> it should suggest other brands. Only if users type "Gab" it should suggest 
> "Dolce & Gabbana".
> 
> Thanks
> S
> ________________________________________
> Inizio: Ahmet Arslan [iori...@yahoo.com]
> Inviato: mercoledì 25 luglio 2012 18.10
> Fine: solr-user@lucene.apache.org
> Oggetto: Re: Skip first word
> 
>> is there a tokenizer and/or a combination of filter to
>> remove the first term from a field?
>> 
>> For example:
>> The quick brown fox
>> 
>> should be tokenized as:
>> quick
>> brown
>> fox
> 
> There is no such filter that i know of. Though, you can implement one with 
> modifying source code of LengthFilterFactory or StopFilterFactory. They both 
> remove tokens. Out of curiosity, what is the use case for this?
> 
> 
> 
> 

Reply via email to