During the analysis phase you could add payloads to the terms using LevensteinDistance and then use that in conjunction with a PayloadSimilarity class ´See [1] for an example), or just use a custom Similarity class which uses LevensteinDistance for scoring. HTH Tommaso
[1] : http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads/ 2012/6/6 Gau <gauravshe...@gmail.com> > I have a list of synoynms which is being expanded at query time. This > yields > a lot of results (in millions). My use-case is name search. > > I want to sort the results by Levenstein Distance. I know this can be done > with strdist function. But sorting being inefficient and Solr function > adding to its woes kills the performance. I want the results to be returned > as quickly as possible. > > One of the ways which I think Levenstein can work is, applying the strdist > on the synonym file and getting the scores of each of the synonym. And then > use these scores to boost the results appropriately, it should be > equivalent > to levenstein distance. But I am not sure how to do this in Solr or infact > if Solr supports this. > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Levenstein-Distance-tp3988026.html > Sent from the Solr - User mailing list archive at Nabble.com. >