Take a look at "strdist" and see whether that does enough of what you want:
See:
http://wiki.apache.org/solr/FunctionQuery#strdist
Some discussion here:
http://lucene.472066.n3.nabble.com/can-t-use-strdist-as-functionquery-td1023390.html
And these would need to be "string" fields, not "text" since it is using the
full, literal character string value.
-- Jack Krupansky
-----Original Message-----
From: Gau
Sent: Wednesday, May 30, 2012 5:23 PM
To: solr-user@lucene.apache.org
Subject: Re: Difference between textfield and strfield
Well the I do not have phrases for synonym expansion. So it does work well.
The synonym expansion is done at query time. And since i am just searching
against the first name field, tf, idf and other ranking parameters do not
make sense, hence their weight has been initialized to 1. So after applying
synonym expansion I am getting results in random word format.
the Results are perfect just that they are not ordered by Levenstein
distance of the original query.
So the use case is
if use enters query ab
it gets expanded at query time to abc,abxy,aberfg
And I get results for ab, abc, abxy, aberfg.
But I want them to be sorted by Levenstein distance from the original query
(ab)
So order shoud be
ab
abc
abxy
aberfg
...... !
TextField makes this even more difficult? Any other suggestions?
Spellcheckers? Ngrams?
--
View this message in context:
http://lucene.472066.n3.nabble.com/Difference-between-textfield-and-strfield-tp3986916p3986928.html
Sent from the Solr - User mailing list archive at Nabble.com.