Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 71970 invoked from network); 11 Nov 2005 14:08:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Nov 2005 14:08:43 -0000 Received: (qmail 19539 invoked by uid 500); 11 Nov 2005 14:08:38 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 19522 invoked by uid 500); 11 Nov 2005 14:08:37 -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 19511 invoked by uid 99); 11 Nov 2005 14:08:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2005 06:08:37 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [69.55.225.129] (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2005 06:08:30 -0800 Received: by ehatchersolutions.com (Postfix, from userid 504) id 309CF13E2041; Fri, 11 Nov 2005 09:08:16 -0500 (EST) Received: from [128.143.167.108] (d-128-167-108.bootp.Virginia.EDU [128.143.167.108]) by ehatchersolutions.com (Postfix) with ESMTP id 3647613E2043 for ; Fri, 11 Nov 2005 09:08:02 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v734) In-Reply-To: <20051111062250.90092.qmail@web31205.mail.mud.yahoo.com> References: <20051111062250.90092.qmail@web31205.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Document as parameter? Date: Fri, 11 Nov 2005 09:08:13 -0500 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.734) X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 11 Nov 2005, at 01:22, bib_lucene bib wrote: > Hi All > > I use the following code to display search results > > LuceneHitHighlighter highlighter = new LuceneHitHighlighter > (queryStr, "snippet", "body"); > for (int i = 0; i < hits.size(); i++) { > Document doc = (Document) hits.get(i); > highlighter.doHighlight(doc); > out.println("SNIPPET: " + doc.get("snippet")); > > Issue: > > I want to give a link for each matched document, so that I can > click on the link and show the whole document instead of just the > snippet. I got a suggestion from Erik Hatcher to use NullFragmenter. > > Question is how can I put the information in the link so that I can > pass this document to another HitHighLighter which is using > NullFragmenter. > I don't really understand your question, and your example is using, apparently, your own custom classes that I'm not familiar with. How you access the "whole" document found by searches is entirely up to your application design. You can store information in a fields within the Document, or you could have the original document elsewhere and access it however appropriate, in which case you'll want to have some key to the original document stored as a field. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org