lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3606) Make IndexReader really read-only in Lucene 4.0
Date Thu, 01 Dec 2011 01:01:52 GMT


Robert Muir commented on LUCENE-3606:

Hi, I will help too. I think norms itself is a pretty big project to clean up and its a good
one to do first.

We don't have to do it this way, but here is my idea of a way we could do it in commitable
# remove the setNorm first from IR, and fix all tests.
# rename NormsWriter to NormsConsumer, rote refactor of norms i/o code into codec as NormsFormat
(yes with just one default, and just reads whole byte[])
# remove IndexFileNames constant and default implementation handles files(), including .sNNN
# create SimpleText implementation

Then even more cleanups:
# split Default implementation to Preflex (with all hairiness like .sNNN) and Lucene40 (clean
# clean up 'behind the scenes' api, e.g. NormsFormat presents docvalues API (hardcoded at
fixed bytes), SegmentReader does getArray(). IndexReader still returns just byte[]
# finally, "holy grail" where similarities can declare the normalization factor(s) they need,
using byte/float/int whatever, and its all unified with the docvalues api. IndexReader.norms()
maybe goes away here, and maybe NormsFormat too.

> Make IndexReader really read-only in Lucene 4.0
> -----------------------------------------------
>                 Key: LUCENE-3606
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: core/index
>    Affects Versions: 4.0
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
> As we change API completely in Lucene 4.0 we are also free to remove read-write access
and commits from IndexReader. This code is so hairy and buggy (as investigated by Robert and
Mike today) when you work on SegmentReader level but forget to flush in the DirectoryReader,
so its better to really make IndexReaders readonly.
> Currently with IndexReader you can do things like:
> - delete/undelete Documents -> Can be done by with IndexWriter, too (using deleteByQuery)
> - change norms -> this is a bad idea in general, but when we remove norms at all and
replace by DocValues this is obsolete already. Changing DocValues should also be done using
IndexWriter in trunk (once it is ready)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message