Upgrade to lucene-5.4-snapshot-1710880.

This commit is contained in:
Adrien Grand 2015-10-27 21:57:46 +01:00
parent 47540d5e82
commit 43958db10b
51 changed files with 38 additions and 36 deletions

View File

@ -60,9 +60,9 @@ public class Lucene {
public static final Version VERSION = Version.LATEST;
public static final Version ANALYZER_VERSION = VERSION;
public static final Version QUERYPARSER_VERSION = VERSION;
public static final String LATEST_DOC_VALUES_FORMAT = "Lucene50";
public static final String LATEST_DOC_VALUES_FORMAT = "Lucene54";
public static final String LATEST_POSTINGS_FORMAT = "Lucene50";
public static final String LATEST_CODEC = "Lucene53";
public static final String LATEST_CODEC = "Lucene54";
static {
Deprecated annotation = PostingsFormat.forName(LATEST_POSTINGS_FORMAT).getClass().getAnnotation(Deprecated.class);

View File

@ -21,7 +21,7 @@ package org.elasticsearch.index.codec;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat.Mode;
import org.apache.lucene.codecs.lucene53.Lucene53Codec;
import org.apache.lucene.codecs.lucene54.Lucene54Codec;
import org.elasticsearch.common.collect.MapBuilder;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
@ -56,8 +56,8 @@ public class CodecService extends AbstractIndexComponent {
this.mapperService = mapperService;
MapBuilder<String, Codec> codecs = MapBuilder.<String, Codec>newMapBuilder();
if (mapperService == null) {
codecs.put(DEFAULT_CODEC, new Lucene53Codec());
codecs.put(BEST_COMPRESSION_CODEC, new Lucene53Codec(Mode.BEST_COMPRESSION));
codecs.put(DEFAULT_CODEC, new Lucene54Codec());
codecs.put(BEST_COMPRESSION_CODEC, new Lucene54Codec(Mode.BEST_COMPRESSION));
} else {
codecs.put(DEFAULT_CODEC,
new PerFieldMappingPostingFormatCodec(Mode.BEST_SPEED, mapperService, logger));

View File

@ -22,7 +22,7 @@ package org.elasticsearch.index.codec;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.PostingsFormat;
import org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat;
import org.apache.lucene.codecs.lucene53.Lucene53Codec;
import org.apache.lucene.codecs.lucene54.Lucene54Codec;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.index.mapper.MappedFieldType;
@ -38,7 +38,7 @@ import org.elasticsearch.index.mapper.core.CompletionFieldMapper;
* configured for a specific field the default postings format is used.
*/
// LUCENE UPGRADE: make sure to move to a new codec depending on the lucene version
public class PerFieldMappingPostingFormatCodec extends Lucene53Codec {
public class PerFieldMappingPostingFormatCodec extends Lucene54Codec {
private final ESLogger logger;
private final MapperService mapperService;

View File

@ -31,7 +31,7 @@ grant codeBase "file:${{java.ext.dirs}}/*" {
//// Very special jar permissions:
//// These are dangerous permissions that we don't want to grant to everything.
grant codeBase "${codebase.lucene-core-5.4.0-snapshot-1708254.jar}" {
grant codeBase "${codebase.lucene-core-5.4.0-snapshot-1710880.jar}" {
// needed to allow MMapDirectory's "unmap hack"
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";

View File

@ -30,7 +30,7 @@ grant codeBase "${codebase.securemock-1.1.jar}" {
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};
grant codeBase "${codebase.lucene-test-framework-5.4.0-snapshot-1708254.jar}" {
grant codeBase "${codebase.lucene-test-framework-5.4.0-snapshot-1710880.jar}" {
// needed by RamUsageTester
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
};

View File

@ -31,6 +31,7 @@ import org.apache.lucene.codecs.lucene50.Lucene50Codec;
import org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat;
import org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat.Mode;
import org.apache.lucene.codecs.lucene53.Lucene53Codec;
import org.apache.lucene.codecs.lucene54.Lucene54Codec;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexWriter;
@ -49,7 +50,8 @@ public class CodecTests extends ESSingleNodeTestCase {
public void testResolveDefaultCodecs() throws Exception {
CodecService codecService = createCodecService();
assertThat(codecService.codec("default"), instanceOf(PerFieldMappingPostingFormatCodec.class));
assertThat(codecService.codec("default"), instanceOf(Lucene53Codec.class));
assertThat(codecService.codec("default"), instanceOf(Lucene54Codec.class));
assertThat(codecService.codec("Lucene53"), instanceOf(Lucene53Codec.class));
assertThat(codecService.codec("Lucene50"), instanceOf(Lucene50Codec.class));
assertThat(codecService.codec("Lucene410"), instanceOf(Lucene410Codec.class));
assertThat(codecService.codec("Lucene49"), instanceOf(Lucene49Codec.class));

View File

@ -23,7 +23,7 @@ import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.codecs.FilterCodec;
import org.apache.lucene.codecs.SegmentInfoFormat;
import org.apache.lucene.codecs.lucene50.Lucene50SegmentInfoFormat;
import org.apache.lucene.codecs.lucene53.Lucene53Codec;
import org.apache.lucene.codecs.lucene54.Lucene54Codec;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.SortedDocValuesField;
@ -290,7 +290,7 @@ public class StoreTests extends ESTestCase {
private static final class OldSIMockingCodec extends FilterCodec {
protected OldSIMockingCodec() {
super(new Lucene53Codec().getName(), new Lucene53Codec());
super(new Lucene54Codec().getName(), new Lucene54Codec());
}
@Override

View File

@ -23,7 +23,7 @@ import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.FieldsConsumer;
import org.apache.lucene.codecs.PostingsFormat;
import org.apache.lucene.codecs.lucene53.Lucene53Codec;
import org.apache.lucene.codecs.lucene54.Lucene54Codec;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.Fields;
@ -272,7 +272,7 @@ public class CompletionPostingsFormatTests extends ESTestCase {
public Lookup buildAnalyzingLookup(final CompletionFieldMapper mapper, String[] terms, String[] surfaces, long[] weights)
throws IOException {
RAMDirectory dir = new RAMDirectory();
Codec codec = new Lucene53Codec() {
Codec codec = new Lucene54Codec() {
@Override
public PostingsFormat getPostingsFormatForField(String field) {
final PostingsFormat in = super.getPostingsFormatForField(field);

View File

@ -1 +0,0 @@
16aa0bdb66b7471e9a26f78a9a5701f678a905db

View File

@ -0,0 +1 @@
584673fa6187890af89deab81df6a8651651fa2a

View File

@ -1 +0,0 @@
7f16ec8294a09118237817d8c9c03b87cec67e29

View File

@ -0,0 +1 @@
f3b0911633d657e49d7a00df0eb5da5a7f65f61b

View File

@ -1 +0,0 @@
0a2305ed749cb8abc321ee50b871097b4bda8a64

View File

@ -0,0 +1 @@
d4ac9f13091eabf5cc0b13bd995dc2c161771139

View File

@ -1 +0,0 @@
51ed4b60eddd2ce38fcdc8c89903c1ece336ab4f

View File

@ -0,0 +1 @@
9499d90d3db187210f9991ab0a92d48423ba3d4e

View File

@ -1 +0,0 @@
d71c018d888dc5fe71c7fb20c2a6009c36ef117f

View File

@ -0,0 +1 @@
7daf49e720499e43d9b44b588526eb750ea2e83a

View File

@ -1 +0,0 @@
5e82bc11bccb55af5d88d5526abe9bd3d04f0d13

View File

@ -0,0 +1 @@
e1a36360e967bf3116a4271d4b04aa5bdcc235ca

View File

@ -1 +0,0 @@
0dfec35d41e7120e48cf6d0ae16a88ef2949e778

View File

@ -0,0 +1 @@
78b2fe81fe90c2d45ace3f21c7915319fe92119b

View File

@ -1 +0,0 @@
30ddb3175c08d443c5a9f74e50e50e3a95afa72d

View File

@ -0,0 +1 @@
8c7734673fbdfa7ae251b29a7bee7842b6450606

View File

@ -1 +0,0 @@
5e45b31ff8374ac5dc651ac2477dde5299b7e746

View File

@ -0,0 +1 @@
f2ce93847617b42c98fc44a979697ba8f6e3f693

View File

@ -1 +0,0 @@
ff0780a5ad9620036f80114b2ce0b30d25647a62

View File

@ -0,0 +1 @@
bf99b0920e7d5cdddeddb0181ffad7df9e557ebb

View File

@ -1 +0,0 @@
7679111888ccd185db0b360954777e68364eb88a

View File

@ -0,0 +1 @@
89cd7591008f10ceeb88fe87c52ea5f96754ad94

View File

@ -1 +0,0 @@
a1699a0ed320c4db66ae4e8dc9dfd80e4bfc4017

View File

@ -0,0 +1 @@
55817ab7fc4b2980429aa6ced151affe7740eb44

View File

@ -1 +0,0 @@
7bcd15e2e685a8c92f48c3d2f355d2dd63073420

View File

@ -0,0 +1 @@
ef817826ffec2b506672ba5038f4e396a7bfcdc7

View File

@ -1 +0,0 @@
be74ad2360527cca776379499254f355ccd93484

View File

@ -0,0 +1 @@
5b39ae55fa40709cc45d5925ad80d09cb0cdc4ba

View File

@ -1 +0,0 @@
0ffcda4683ae66ecb96882a6809516d9a288ba52

View File

@ -0,0 +1 @@
43979949bebc071fc0353513fffe11684690f23e

View File

@ -1 +0,0 @@
9e34274dd0f1903453f8e4f76ee8e88f15437752

View File

@ -0,0 +1 @@
d621f00b5ce0f9fde87a713e932d888c3ddd1a78

View File

@ -1 +0,0 @@
8020f9e0a9c3f30fe1989dcac2085134385a9e93

View File

@ -0,0 +1 @@
d46a1cd06ae642581e566844b1e42e14e0eeffe6

View File

@ -1 +0,0 @@
f8c9a0775dd92a2e537e0e19fc1831b3214eeef5

View File

@ -0,0 +1 @@
8e6058a95f38637c1d4b7a1ebcc6c8ce85c80b20

View File

@ -1 +0,0 @@
a3111a7cff126498ce361d56e363bcf8bee945a9

View File

@ -0,0 +1 @@
4c69ca398b34c7a58482b09cdc06d0e2bab89cc4

View File

@ -0,0 +1 @@
66144204f9d6d7d3f3f775622c2dd7e9bd511d97

View File

@ -1 +0,0 @@
29e48af049f17dd89153b83a7ad5d01b3b4bcdda

View File

@ -1 +0,0 @@
40f4f54812a7a34312519ceb8b3f128feb4e2185

View File

@ -0,0 +1 @@
431504b7bad8ffc1a03707b9a1531d95f33e10b9

View File

@ -49,7 +49,7 @@
<!-- NOTE: when changing these versions, also update security.policy and test-framework.policy to match -->
<!-- (we don't do any automatic property substitution on those resources, it could get confusing... -->
<lucene.version>5.4.0</lucene.version>
<lucene.snapshot.revision>1708254</lucene.snapshot.revision>
<lucene.snapshot.revision>1710880</lucene.snapshot.revision>
<lucene.maven.version>5.4.0-snapshot-${lucene.snapshot.revision}</lucene.maven.version>
<testframework.version>2.1.17</testframework.version>
<securemock.version>1.1</securemock.version>