lucene 6 api changes (tests only)

Original commit: elastic/x-pack-elasticsearch@8120c29cd8
This commit is contained in:
Robert Muir 2016-03-07 04:13:30 -05:00
parent 59ec9302c8
commit 2a9ba9e934
2 changed files with 24 additions and 24 deletions

View File

@ -207,7 +207,7 @@ public class DocumentSubsetReaderTests extends ESTestCase {
iw.addDocument(doc);
// open reader
DirectoryReader ir = DocumentSubsetReader.wrap(DirectoryReader.open(iw, true), bitsetFilterCache, new MatchAllDocsQuery());
DirectoryReader ir = DocumentSubsetReader.wrap(DirectoryReader.open(iw), bitsetFilterCache, new MatchAllDocsQuery());
assertEquals(2, ir.numDocs());
assertEquals(1, ir.leaves().size());

View File

@ -64,7 +64,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -96,7 +96,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
Document d2 = ir.document(0);
@ -123,7 +123,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
Document d2 = ir.document(0);
@ -150,7 +150,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
Document d2 = ir.document(0);
@ -177,7 +177,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
Document d2 = ir.document(0);
@ -204,7 +204,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
Document d2 = ir.document(0);
@ -231,7 +231,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
Document d2 = ir.document(0);
@ -260,7 +260,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
Fields vectors = ir.getTermVectors(0);
@ -290,7 +290,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -317,7 +317,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -349,7 +349,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -381,7 +381,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -413,7 +413,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -449,7 +449,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -484,7 +484,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -517,7 +517,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
Set<String> fields = new HashSet<>();
fields.add("fieldA");
fields.add(SourceFieldMapper.NAME);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
Document d2 = ir.document(0);
@ -548,7 +548,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
Set<String> fields = new HashSet<>();
fields.add("fieldA");
fields.add(FieldNamesFieldMapper.NAME);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -597,7 +597,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
fields.add("fieldA");
fields.add("fieldC");
fields.add(FieldNamesFieldMapper.NAME);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only two fields
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -645,7 +645,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
fields.add("fieldA");
fields.add("fieldC");
fields.add(FieldNamesFieldMapper.NAME);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -681,7 +681,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
Set<String> fields = new HashSet<>();
fields.add("fieldA");
fields.add(FieldNamesFieldMapper.NAME);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see only one field
LeafReader segmentReader = ir.leaves().get(0).reader();
@ -710,7 +710,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("id");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
assertEquals(2, ir.numDocs());
assertEquals(1, ir.leaves().size());
@ -745,7 +745,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldB");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// sees no fields
assertNull(ir.getTermVectors(0));
@ -765,7 +765,7 @@ public class FieldSubsetReaderTests extends ESTestCase {
// open reader
Set<String> fields = Collections.singleton("fieldA");
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw, true), fields);
DirectoryReader ir = FieldSubsetReader.wrap(DirectoryReader.open(iw), fields);
// see no fields
LeafReader segmentReader = ir.leaves().get(0).reader();