On 4/29/10 3:45 PM, Koji Sekiguchi wrote:
Ranveer Kumar wrote:
Hi,
I require to configure synonym to exact match.
The field I need to search is string type. I tried to configure by
the text
but in text, due to whitespace tokenizer exact match not found.
My requirement is :
suppose user search by "solr user" and exact "solr user" (or equivalant
synonym) are available then only return result..
my fieldType is "string" and I want to configure synonym on string
field.
or
Is there any other way to index without tokenize (as it is) string and
configure synonym for that field?
please help..
Why don't you use KeywordTokenizer? And if you want to
treat text in synonyms.txt as string as well, set tokenizerFactory
attribute to KeywordTokenizerFactory.
Koji
Hi Koji,
thanks for reply.
where should I use the KeywordTokenizerFactory in string or in text field.
I am wondering that KeywordTokenizerFactory will work or not in
textfield. Actually as I understood about the KeywordTokenizerFactory
that : KeywordTokenizerFactory is tokenize the keyword.
for example : 'solr user' will tokenize to 'solr' and 'user' because
solr and user are keyword.. My requirement is to index as 'solr user'