You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Terry Steichen <te...@net-frame.com> on 2004/03/21 13:01:29 UTC

Final Hits

Does anyone know why the Hits class is final (thus preventing it from being subclassed)? 

Regards,

Terry

Re: Final Hits

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Terry,

I'm still quite curious how you plan to take advantage of a 
subclassable Hits.  Are you going to create your own IndexSearcher with 
returns your subclass somehow?

You could use a HitCollector (which is what is used under the covers of 
the Hits returning methods anyway) to emulate whatever it is you're 
trying to do, I suspect.

As for 'final'.... Doug did a great thing by designing Lucene tight and 
controlled with private/package scoped access and final modifiers in 
lots of places.  There is no technical issue with removing the final, 
but we would need to see a pretty compelling detailed reason to do so.

	Erik


On Mar 22, 2004, at 7:56 AM, Terry Steichen wrote:

> Erik,
>
> There are a number of different possibilities which I'm still 
> evaluating.
> But if there is some significant reason for *not* subclassing Hits
> (performance?), that will have a major bearing on whether the approach 
> I'm
> evaluating makes sense.
>
> So, let me rephrase my question: Is the "final" nature of Hits due to 
> some
> performance reason, or simply because no one has previously expressed 
> any
> interest in subclassing it?  Or, putting it in reverse, is there any
> technical problem likely to arise from removing the "final" 
> attribute(s)?
>
> Regards,
>
> Terry
>
> ----- Original Message -----
> From: "Erik Hatcher" <er...@ehatchersolutions.com>
> To: "Lucene Users List" <lu...@jakarta.apache.org>
> Sent: Monday, March 22, 2004 7:06 AM
> Subject: Re: Final Hits
>
>
>> How exactly would you take advantage of a subclassable Hits class?
>>
>>
>> On Mar 21, 2004, at 6:01 AM, Terry Steichen wrote:
>>
>>> Does anyone know why the Hits class is final (thus preventing it from
>>> being subclassed)?
>>>
>>> Regards,
>>>
>>> Terry
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Final Hits

Posted by Terry Steichen <te...@net-frame.com>.
Erik,

There are a number of different possibilities which I'm still evaluating.
But if there is some significant reason for *not* subclassing Hits
(performance?), that will have a major bearing on whether the approach I'm
evaluating makes sense.

So, let me rephrase my question: Is the "final" nature of Hits due to some
performance reason, or simply because no one has previously expressed any
interest in subclassing it?  Or, putting it in reverse, is there any
technical problem likely to arise from removing the "final" attribute(s)?

Regards,

Terry

----- Original Message -----
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Monday, March 22, 2004 7:06 AM
Subject: Re: Final Hits


> How exactly would you take advantage of a subclassable Hits class?
>
>
> On Mar 21, 2004, at 6:01 AM, Terry Steichen wrote:
>
> > Does anyone know why the Hits class is final (thus preventing it from
> > being subclassed)?
> >
> > Regards,
> >
> > Terry
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Final Hits

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
How exactly would you take advantage of a subclassable Hits class?


On Mar 21, 2004, at 6:01 AM, Terry Steichen wrote:

> Does anyone know why the Hits class is final (thus preventing it from 
> being subclassed)?
>
> Regards,
>
> Terry


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org