From java-user-return-30882-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Mon Nov 05 20:25:35 2007 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 57557 invoked from network); 5 Nov 2007 20:25:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2007 20:25:35 -0000 Received: (qmail 51696 invoked by uid 500); 5 Nov 2007 20:25:16 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 51659 invoked by uid 500); 5 Nov 2007 20:25:16 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 51648 invoked by uid 99); 5 Nov 2007 20:25:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2007 12:25:16 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.196.101.38] (HELO web59212.mail.re1.yahoo.com) (66.196.101.38) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 05 Nov 2007 20:25:45 +0000 Received: (qmail 66013 invoked by uid 60001); 5 Nov 2007 20:24:54 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=bEIds6sNL0EkekdKd7By9pRo+KfmZW2CIO4gDaiELenP+HWiUPzGa6BONPyYid7SldSjMNn3KhKwid62iZUVsusO5z3mk+5qmBKmvRwHvhsaBSWPM73ZD2VM7knqatfAZ9dAtOlPD0mi4AqMn/Kkk4UFqTaQ11+QKUR3q3XQPek=; X-YMail-OSG: Yi_ksxsVM1nuXRlD51vXuCHy0ybM1j7GDtQtFpL2dAJnkuQvrUFkTKOaSaq50iqrOWyBRWDjrXKg7ET3aWkT6t8UV8tZAbBEPTOL3Od8AOyXyQLD71aPyRjcBylWNOU_ Received: from [68.167.115.34] by web59212.mail.re1.yahoo.com via HTTP; Mon, 05 Nov 2007 12:24:54 PST Date: Mon, 5 Nov 2007 12:24:54 -0800 (PST) From: Cool Coder Subject: Related items To: java-user@lucene.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-954704033-1194294294=:65860" Content-Transfer-Encoding: 8bit Message-ID: <761034.65860.qm@web59212.mail.re1.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-954704033-1194294294=:65860 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 query 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 http://mail.yahoo.com --0-954704033-1194294294=:65860--