Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 40313 invoked from network); 12 Mar 2007 07:36:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2007 07:36:24 -0000 Received: (qmail 57177 invoked by uid 500); 12 Mar 2007 07:36:26 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 57149 invoked by uid 500); 12 Mar 2007 07:36:26 -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 57132 invoked by uid 99); 12 Mar 2007 07:36:25 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2007 00:36:25 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [209.73.179.1] (HELO web60912.mail.yahoo.com) (209.73.179.1) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 12 Mar 2007 00:36:13 -0700 Received: (qmail 20182 invoked by uid 60001); 12 Mar 2007 07:35:52 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=apufYeB7k4Gcb9ZL4yont6B62bzOYF/aQ27OQEz1rQw3e605KU7OBQPvxhAo9sKALVBJ8VQUXMfyQNz0A5kZ5qmL+3PKhSNi9EIDu6Nq38Gif1hyZe0PK5xY+jhAL+yAMprBdcolpi6aQ/QQsfIbuamxULr84FPQc2701D/5BEA=; X-YMail-OSG: 5k_NmQsVM1mGNSeMdw7l39wC5b9q7owsGzSQpwfxdJBddRzXHpNyW2ZyrhyYKnMhoopNVqDySXkDmJFreIIXsVzWZjrDcdrh0iYKXPzVostmHjkWpn3u6O_jT1ZHIswbqJa3fp7ebOAQyGfpyhBoET3B3MQ- Received: from [124.43.224.0] by web60912.mail.yahoo.com via HTTP; Mon, 12 Mar 2007 00:35:49 PDT Date: Mon, 12 Mar 2007 00:35:49 -0700 (PDT) From: Chaminda Amarasinghe Subject: Re: Lucene Indexing - Getting Hited words in a query To: java-user@lucene.apache.org In-Reply-To: <305165.94493.qm@web60922.mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-706232433-1173684949=:17624" Content-Transfer-Encoding: 8bit Message-ID: <152204.17624.qm@web60912.mail.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-706232433-1173684949=:17624 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Why nobody is anwering me? Pls help me. Chaminda Amarasinghe wrote: Hi all, I'm new to this group, I'm using lucene for indexing. I have a problem. Any help gratly appreciate. Please see the following code // three fields MultiFieldQueryParser parser = new MultiFieldQueryParser(new String[]{"title", "tags", "content"}, new StandardAnalyzer()); // OR operator parser.setDefaultOperator(QueryParser.Operator.OR); // first step : search in lucene indexes IndexSearcher searcher = new IndexSearcher(eventsBothDirectory) // searchString is a String with many words Query lquery = parser.parse(searchString); //new QueryParser("content", new StandardAnalyzer()); Hits hits = searcher.search(lquery); How can I find the matched words in searchString. for a example will say the searchString="wordone wordtwo wordthree". there are some hits for "wordone" and "wordthree". but no hits for "wordtwo". So what I want is to get "wordone" and "wordthree". (results are available only for "wordone" and "wordthree". ).(I hope question is clear now) How can i get this with lucene. Many thanks. Chaminda Amarasighe --------------------------------- Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. --------------------------------- Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. --0-706232433-1173684949=:17624--