mirror of https://github.com/apache/lucene.git
preflex codec still depends on field name interning, so test it some
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1341480 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2ce7899fc3
commit
de9e4695cf
|
@ -330,7 +330,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
|
|||
assertEquals(7, i);
|
||||
}
|
||||
|
||||
ScoreDoc[] hits = searcher.search(new TermQuery(new Term("content", "aaa")), null, 1000).scoreDocs;
|
||||
ScoreDoc[] hits = searcher.search(new TermQuery(new Term(new String("content"), "aaa")), null, 1000).scoreDocs;
|
||||
|
||||
// First document should be #21 since it's norm was
|
||||
// increased:
|
||||
|
@ -341,7 +341,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
|
|||
|
||||
hits = searcher.search(new TermQuery(new Term("utf8", "\u0000")), null, 1000).scoreDocs;
|
||||
assertEquals(34, hits.length);
|
||||
hits = searcher.search(new TermQuery(new Term("utf8", "Lu\uD834\uDD1Ece\uD834\uDD60ne")), null, 1000).scoreDocs;
|
||||
hits = searcher.search(new TermQuery(new Term(new String("utf8"), "Lu\uD834\uDD1Ece\uD834\uDD60ne")), null, 1000).scoreDocs;
|
||||
assertEquals(34, hits.length);
|
||||
hits = searcher.search(new TermQuery(new Term("utf8", "ab\ud917\udc17cd")), null, 1000).scoreDocs;
|
||||
assertEquals(34, hits.length);
|
||||
|
|
|
@ -829,6 +829,7 @@ public abstract class LuceneTestCase extends Assert {
|
|||
}
|
||||
|
||||
public static Field newField(Random random, String name, String value, FieldType type) {
|
||||
name = new String(name);
|
||||
if (usually(random) || !type.indexed()) {
|
||||
// most of the time, don't modify the params
|
||||
return new Field(name, value, type);
|
||||
|
|
Loading…
Reference in New Issue