[
https://issues.apache.org/jira/browse/LUCENE-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501141#comment-13501141
]
Shai Erera commented on LUCENE-3441:
------------------------------------
bq. would the old TR ever receive a request to look up an out-of-bounds ord
In fact, it could. Like IR, the old TR still lives for old queries in flight.
It is possible that TR-1 received a FacetRequest with a category that it
doesn't recognize, but because the cache is now shared, and the TR-2 recognizes
that category and put it in the cache, TR-1 will receive its ordinal, which is
out-of-bound.
Took a re-look at the code, and I think that it's solvable by having TR do a
bounds check. It is a very simple and cheap check, only one 'if', which will
happen, in practice, only for the top-K categories and the FacetRequest
initially. I.e., the entire faceted search process -- aggregating the
categories, determining top-K etc., all happen on the ordinals that are known
to the search index (IR-1, that is coupled with TR-1).
In fact, the labeling that IR-1/TR-1 will do to the top-K cannot out-of-bound,
so actually only the FacetRequest may out-of-bound. Still, I think that it's
safer to add the bounds check to both caches.
I will post a new patch soon, compiled with the comments from Sivan (thanks !),
and removing the nocommit.
> Add NRT support to LuceneTaxonomyReader
> ---------------------------------------
>
> Key: LUCENE-3441
> URL: https://issues.apache.org/jira/browse/LUCENE-3441
> Project: Lucene - Core
> Issue Type: New Feature
> Components: modules/facet
> Reporter: Shai Erera
> Assignee: Shai Erera
> Priority: Minor
> Attachments: LUCENE-3441.patch
>
>
> Currently LuceneTaxonomyReader does not support NRT - i.e., on changes to
> LuceneTaxonomyWriter, you cannot have the reader updated, like
> IndexReader/Writer. In order to do that we need to do the following:
> # Add ctor to LuceneTaxonomyReader to allow you to instantiate it with
> LuceneTaxonomyWriter.
> # Add API to LuceneTaxonomyWriter to expose its internal IndexReader
> # Change LTR.refresh() to return an LTR, rather than void. This is actually
> not strictly related to that issue, but since we'll need to modify refresh()
> impl, I think it'll be good to change its API as well. Since all of facet API
> is @lucene.experimental, no backwards issues here (and the sooner we do it,
> the better).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]