From java-dev-return-12863-apmail-lucene-java-dev-archive=lucene.apache.org@lucene.apache.org Mon Feb 20 17:21:44 2006 Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 30198 invoked from network); 20 Feb 2006 17:21:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Feb 2006 17:21:43 -0000 Received: (qmail 66184 invoked by uid 500); 20 Feb 2006 17:21:29 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 66046 invoked by uid 500); 20 Feb 2006 17:21:29 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 65983 invoked by uid 99); 20 Feb 2006 17:21:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Feb 2006 09:21:28 -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; Mon, 20 Feb 2006 09:21:26 -0800 Received: by ehatchersolutions.com (Postfix, from userid 504) id 6D19F33C043; Mon, 20 Feb 2006 12:21:05 -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 ED43B33C021 for ; Mon, 20 Feb 2006 12:21:00 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <29458A94-E6B1-4801-BA49-096A0C96005F@ehatchersolutions.com> Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Extending Doucment and Hits Date: Mon, 20 Feb 2006 12:20:57 -0500 To: java-dev@lucene.apache.org X-Mailer: Apple Mail (2.746.2) 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=BAYES_00 autolearn=ham version=3.0.1 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I'll just reply briefly and say that this topic has come up before and is usually shot down because what you are after can be accomplished by wrappers on your end. You would need to modify IndexSearcher and family to return a JDBCHits and have your JDBCHits modified to create JDBCDocuments, which seems overkill for what you're after. Why not just create a wrapper set of classes that do what you need with JDBC and Hits in an aggregate fashion rather than subclass fashion? Erik On Feb 19, 2006, at 2:13 AM, Ahmed El-dawy wrote: > Thanks for your reply. > I need to make a JDBCDocument. This document gets some of its fields > from Lucene Index. It contains a reference to a database where other > fields (larger ones) are stored. Later fields are only read upon > request (like lazy intialization). This is useful to me because when > a search is performed I need to view a snippet of the results. When > one is clicked I need to view the whole document. I needed to store > the snippet in Lucene Index and other fields in database. > JDBCDocument is constructed using an ordinary Document and a DB > connection. > JDBCHits is used to return JDBCDocuments instead of normal documents. > I need to do this without changing the code of the interface which > shows the snippets and formats the whole document when it is > requested. > > Ahmed Saad > On 2/18/06, Erik Hatcher wrote: >> Ahmed - could you outline your use case in detail and why you think >> your design demands extensions of these classes? >> >> Erik >> >> >> On Feb 18, 2006, at 3:41 PM, Ahmed El-dawy wrote: >> >>> Hello, >>> I needed in my application to override the classes Document and >>> Hits >>> to make JDBCDocument and JDBCHits. I was surprised that Document and >>> Hits are final classes and all methods in them are final. Why >>> this? I >>> couldn't make my program well because of this problem. Is there a >>> way >>> to overcome it? >>> >>> thanks in advance >>> -- >>> regards, >>> Ahmed Saad >>> >>> -------------------------------------------------------------------- >>> - >>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: java-dev-help@lucene.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-dev-help@lucene.apache.org >> >> > > > -- > regards, > Ahmed Saad > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-dev-help@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org