lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: Find related words
Date Thu, 04 Jul 2013 14:03:03 GMT
You can take a look at the MoreLikeThis/Find Similar feature. That gives you 
an approximation, but using documents rather than discrete terms. You would 
have to write a custom component of your own based on logic from MLT.

-- Jack Krupansky

-----Original Message----- 
From: Dotan Cohen
Sent: Thursday, July 04, 2013 8:09 AM
Subject: Find related words

How might one find the top related words for a given word in a Solr index?

For instance, given the following single-field documents:
1: I love chocolate
2: I love Solr
3: I eat chocolate cake
4: You will eat chocolate candy

Thus, given the word "Chocolate" Solr might find these top words:
I (3 times matched)
eat (2 times matched)
love, cake, you, will, candy (1 time each)


Dotan Cohen 

View raw message