lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3318) Sketch out highlighting based on term positions / position iterators
Date Sun, 24 Jul 2011 10:34:09 GMT


Uwe Schindler commented on LUCENE-3318:


if (q instanceof MultiTermQuery) {
  ((MultiTermQuery)q).setRewriteMethod (MultiTermQuery.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE);

This changes the original query, so we should clone the query before (this is what the standard
highlighter does when it rewrites queries) - but: maybe cloning was done before in other highlighter
code. This one just looks wrong to me. Also for large indexes with many terms, this may easily
throw TooManyClausesException, so we should catch this exception somehow and disable highlighting
in that case.

About the payloads encoding: I would not limit the offsets and positions and use the full
32bit ints, but instead encode them as vInt. The facetting package already has a method for
this (it does similar thins, namely encoding ints into payloads), maybe we move those byte[]
vInt encoders to core utils.

> Sketch out highlighting based on term positions / position iterators
> --------------------------------------------------------------------
>                 Key: LUCENE-3318
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Sub-task
>          Components: modules/highlighter
>    Affects Versions: Positions Branch
>            Reporter: Simon Willnauer
>            Assignee: Mike Sokolov
>             Fix For: Positions Branch
>         Attachments: LUCENE-3318.patch
> Spinn off from LUCENE-2878. Since we have positions on a large number of queries already
in the branch is worth looking at highlighting as a real consumer of the API. A prototype
is already committed.

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message