gerrit/lib/lucene
Dave Borowitz 70aaf7eaa7 Update Lucene to 5.0.0
Use this version starting at the existing schema version 15 (which has
been in master for only a week or so).

Notable changes:

 - Can use the new IndexWriter#setCommitOnClose(boolean) method to
   simplify closing an index.

 - This means we no longer need to pass Version into the
   IndexWriterConstructor. According to [1], this was _only_ used to
   determine whether or not the index should be committed on close, as
   this behavior differed between versions. No more mapping schema
   versions to Lucene versions!

 - IndexWriters are now forced to use their configured Analyzer,
   removing the methods taking an Analyzer (which we weren't using
   anyway). This saves some code in AutoCommitWriter.

 - Lucene 5 cannot read indexes created by older versions without an
   additional jar in the classpath, so we need to add that.

The most annoying change is that sorting cannot be done on normal
numeric fields by default anymore[2]. This was inefficient anyway, as
Lucene had to seek and read all index field values before doing the
sorting. Switch to the newer DocValues API for strongly-typed sortable
fields. This introduces some medium-term ugliness as the sort spec
changes depending on the schema version.

Unfortunately we can only use DocValues on new index versions; older
versions need to use the new UninvertingReader API, which provides
FieldCache based sorting without a reindex. An overzealous check in a
static method in Lucene[3] means we need to temporarily fork
SearcherManager.java from Lucene in order to get this to work with the
NRT machinery.

Since we have to jump through significant hoops to get older index
versions readable by this version of Lucene, add a test specifically
for schema v14.

[1] https://issues.apache.org/jira/browse/LUCENE-5871
[2] https://issues.apache.org/jira/browse/LUCENE-5666
[3] https://issues.apache.org/jira/browse/LUCENE-6370

Change-Id: I843be2fb697779fc741e25459a2716280b2bd0b6
2015-03-25 12:21:59 -07:00
..
BUCK Update Lucene to 5.0.0 2015-03-25 12:21:59 -07:00