lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cool Coder <>
Subject Related items
Date Mon, 05 Nov 2007 20:24:54 GMT
Hello Group,
                   I have a requirement in my project where I need to display related items
for any select item in the group. I am not sure whether this can be possible. Let me tell
you that all our documents are indexed and for any document selected by user, we need to display
related documents(items) in some sort of group format.
  My initial thought was to use MultiPhraseQuery, something like
  If Currently selected Item's title is "foo bar and chacolate", then search index with following
  MultiPhraseQuery multiTermQuery = new MultiPhraseQuery();
  multiTermQuery.add(new Term("title","foo"));
  multiTermQuery.add(new Term("title","bar"));
  multiTermQuery.add(new Term("title","chacolate"));
  From the hits, show most relevant document. Maybe show all documents
  But search result is not returning anything though there are items with title "foo bar a
chacolate", "foo bar and chacolate" etc...
  I would appreciate your valuable suggestion.
  - BR

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message