Hi Mark,

Thanks very much for your comments.

>�It looks like all queries on the site have to be a span of some
>�kind (ie all search terms must appear in the document). Is your
>�highlighting code applicable to other modes of querying?

In a sense you're correct, in that the system relies on all leaf queries to be 
span queries. Doug's original span code was already set up to report the 
positional information of hits, while a normal TermQuery for instance doesn't 
even iterate the positions. I also added a couple new span queries to fill out 
the set: SpanRangeQuery and SpanWildcardQuery.

For complex queries within one field, they're joined with the normal span 
operators -- SpanOrQuery, SpanNearQuery, SpanNotQuery, etc. To form a single 
query across multiple fields, it's the the usual (non-span-oriented) 
BooleanQuery.

So to answer your question, the system isn't applicable to queries that don't 
use spans. But since we want to highlight based on positional data, that seemed 
only right.

Someone mentioned a while back modifying the query parser to (optionally?) 
produce span queries. This might be another good reason to do so... or are you 
suggesting something else?

--Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to