Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev
Re: Extending Doucment and Hits
 

Index | Next | Previous | View Flat


erik at ehatchersolutions

Feb 20, 2006, 9:20 AM


Views: 1480
Permalink
Re: Extending Doucment and Hits [In reply to]

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 <erik [at] ehatchersolutions> 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 [at] lucene
>>> For additional commands, e-mail: java-dev-help [at] lucene
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
>> For additional commands, e-mail: java-dev-help [at] lucene
>>
>>
>
>
> --
> regards,
> Ahmed Saad
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
> For additional commands, e-mail: java-dev-help [at] lucene


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene

Subject User Time
Extending Doucment and Hits aseldawy at gmail Feb 18, 2006, 12:34 PM
    Extending Doucment and Hits aseldawy at gmail Feb 18, 2006, 12:41 PM
    Re: Extending Doucment and Hits erik at ehatchersolutions Feb 18, 2006, 1:28 PM
    Re: Extending Doucment and Hits aseldawy at gmail Feb 18, 2006, 11:13 PM
    Re: Extending Doucment and Hits erik at ehatchersolutions Feb 20, 2006, 9:20 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.