lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: SpanQuery and Spans optimizations
Date Wed, 12 Aug 2009 09:58:13 GMT
I think being able to ask the Scorer for matching spans for the
current doc makes tons of sense.

I think eventually span queries should be absorbed into the normal
lucene queries.  EG, if TermQuery creates a scorer that's able to
optionally enumerate matching spans, such that there's no performance
loss if you don't actuallly request the spans, then we don't need
SpanTermQuery.

And once all Lucene queries can optionally provide their spans, then
highlighter becomes simpler since it can just ask the query's scorer
for the matching spans.

Mike

On Sat, Aug 8, 2009 at 4:10 AM, Shai Erera<serera@gmail.com> wrote:
> That would work. Though your custom TopSpansCollector should be able to
> handle other Scorers as well. And you can store the payloads in yet another
> custom ScoreDoc - is that what you had in mind?
>
> Shai
>
> On Sat, Aug 8, 2009 at 3:06 AM, Grant Ingersoll <gsingers@apache.org> wrote:
>>
>> On Aug 6, 2009, at 5:09 PM, Grant Ingersoll wrote:
>>
>>>
>>> On Aug 6, 2009, at 5:06 PM, Shai Erera wrote:
>>>
>>>> Only w/ ScoreDocs we reuse the same instance. So I guess we'd like to do
>>>> the same here.
>>>>
>>>> Seems like providing a TopSpansCollector is what you want, only unlike
>>>> TopFieldCollector which populates the fields post search, you'd like to do
>>>> it during search.
>>>
>>> Bingo, but I think the collection functionality needs to be on Collector,
>>> as I'd hate to have to lose out on functionality that the other impls have
>>> to offer, or have to recreate them.
>>>
>>
>> Hmm, maybe I can get at this info from the setScorer capabilities.  Then I
>> would just need a place to hang the data...  Maybe would just take having
>> the SpanScorer implementation provide just a wee bit more access to
>> structures...
>>
>> ---------------------------------------------------------------------
>> 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


Mime
View raw message