On Wed, Mar 18, 2009 at 1:32 PM, Mark Miller <markrmil...@gmail.com> wrote:
>>> In some usecases this could be important especially where the power of
>>> a span query is not required.
>
> I think the power of a spanquery is required for payloads though - the term
> query will not hit each position to do payload loading - there is no need
> for termquery to enumerate positions. Right?
No you are right, term query does not need to enumerate the TermPositions.
This doesn't mean that it can not look at them. Issue
https://issues.apache.org/jira/browse/LUCENE-1017 has apparently done
some measurements without a significant performance improvement. I
didn't expect an large improvement anyway but without the knowledge of
this issue it was worth to look at it.

One thing I wanna mention aside: As long as TermScorer is final there
is no problem with the implementation beside some redundant code. The
TermScorer does not use the float score() method to calculate the
score in score(HitCollector, int). It rather duplicates the code for
performance reasons I assume. I have cleaned up this code a little bit
as I was going to implement payloads using this class. If it is
desirable to have this code cleaned up I can submit a patch.

Thanks,

simon
>
>
>
>
> Simon Willnauer wrote:
>>
>> Nothing different, I'm just concerned about the performance as the
>> SpanQuerys take about twice as long as a term query.
>> I run a little benchmark and found BoostingTermQuery being 1.5 times
>> slower than TermQuery without any payloads in the index.
>> In some usecases this could be important especially where the power of
>> a span query is not required.
>>
>> Maybe I miss something, if so please let me know.
>>
>> simon
>> On Tue, Mar 17, 2009 at 11:15 PM, Grant Ingersoll <gsing...@apache.org>
>> wrote:
>>
>>>
>>> What does PayloadTermQuery do that BoostingTermQuery doesn't do?
>>>
>>> -Grant
>>>
>>> On Mar 17, 2009, at 1:27 PM, Simon Willnauer wrote:
>>>
>>>
>>>>
>>>> Hi, I looked at TermScorer today in order implement a TermQuery to
>>>> utilize Payloads from the index.
>>>> I realized that this class is final in the current trunk. It's kind of
>>>> obvious that is is declared final for optimization purposes.
>>>> I wanna know if it is possible to make it non final in the next
>>>> release or later to use it in a PayloadTermQuery class.
>>>> I would like to reuse this code and do some additional cleanups like
>>>> remove the code redundancy in score() / score(HitCollector, int).
>>>>
>>>> Thanks,
>>>> Simon
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
>>>> For additional commands, e-mail: java-dev-h...@lucene.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
>>> For additional commands, e-mail: java-dev-h...@lucene.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: java-dev-h...@lucene.apache.org
>>
>>
>
>
> --
> - Mark
>
> http://www.lucidimagination.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-dev-h...@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to