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 Roland Tollenaar <rw...@gmail.com> on 2011/09/23 07:50:21 UTC

levenshtein ranked results

Hi,

I tried an internet search to find out how to query solr to get the 
results ranked (ordered) by levenshtein distance.

This appears to be possible but I could not find a concrete example as 
to how I would have to formulate the query, or if its a schema setting 
on a particular field, how to set up the schema.

I am new to solr, any help appreciated.

tia.

Roland.




Re: levenshtein ranked results

Posted by Roland Tollenaar <rw...@gmail.com>.
Thanks Otis,

this helps me tremendously.

Kind regards,

Roland

Otis Gospodnetic wrote:
> Hi Roland,
> 
> I did this:
> http://search-lucene.com/?q=sort+by+function&fc_project=Solr&fc_type=wiki
> 
> 
> Which took me to this:
> http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function
> 
> 
> And further on that page you'll find strdist function documented:
> http://wiki.apache.org/solr/FunctionQuery#strdist
> 
> 
> I hope this helps.
> 
> Otis
> ----
> Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
> Lucene ecosystem search :: http://search-lucene.com/
> 
> 
> 
> ----- Original Message -----
>> From: Roland Tollenaar <rw...@gmail.com>
>> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
>> Cc: 
>> Sent: Friday, September 23, 2011 1:50 AM
>> Subject: levenshtein ranked results
>>
>> Hi,
>>
>> I tried an internet search to find out how to query solr to get the results 
>> ranked (ordered) by levenshtein distance.
>>
>> This appears to be possible but I could not find a concrete example as to how I 
>> would have to formulate the query, or if its a schema setting on a particular 
>> field, how to set up the schema.
>>
>> I am new to solr, any help appreciated.
>>
>> tia.
>>
>> Roland.
>>
> 

Re: levenshtein ranked results

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

I did this:
http://search-lucene.com/?q=sort+by+function&fc_project=Solr&fc_type=wiki


Which took me to this:
http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function


And further on that page you'll find strdist function documented:
http://wiki.apache.org/solr/FunctionQuery#strdist


I hope this helps.

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



----- Original Message -----
> From: Roland Tollenaar <rw...@gmail.com>
> To: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
> Cc: 
> Sent: Friday, September 23, 2011 1:50 AM
> Subject: levenshtein ranked results
> 
> Hi,
> 
> I tried an internet search to find out how to query solr to get the results 
> ranked (ordered) by levenshtein distance.
> 
> This appears to be possible but I could not find a concrete example as to how I 
> would have to formulate the query, or if its a schema setting on a particular 
> field, how to set up the schema.
> 
> I am new to solr, any help appreciated.
> 
> tia.
> 
> Roland.
>