mirror of https://github.com/apache/lucene.git
remove pkg-private sugar method in Term only used by one test
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1206455 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9fcc72fe13
commit
004cec8ca2
|
@ -130,12 +130,6 @@ public final class Term implements Comparable<Term> {
|
||||||
this.bytes = bytes;
|
this.bytes = bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Resets the field and text of a Term. */
|
|
||||||
final void set(String fld, String txt) {
|
|
||||||
field = fld;
|
|
||||||
this.bytes = new BytesRef(txt);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final String toString() { return field + ":" + bytes.utf8ToString(); }
|
public final String toString() { return field + ":" + bytes.utf8ToString(); }
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.apache.lucene.document.Field;
|
||||||
import org.apache.lucene.document.TextField;
|
import org.apache.lucene.document.TextField;
|
||||||
import org.apache.lucene.store.Directory;
|
import org.apache.lucene.store.Directory;
|
||||||
import org.apache.lucene.store.LockObtainFailedException;
|
import org.apache.lucene.store.LockObtainFailedException;
|
||||||
|
import org.apache.lucene.util.BytesRef;
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
import org.apache.lucene.util.LuceneTestCase;
|
||||||
|
|
||||||
public class TestIndexWriterNRTIsCurrent extends LuceneTestCase {
|
public class TestIndexWriterNRTIsCurrent extends LuceneTestCase {
|
||||||
|
@ -99,12 +100,12 @@ public class TestIndexWriterNRTIsCurrent extends LuceneTestCase {
|
||||||
for (int i = 0; i < numOps && !holder.stop; i++) {
|
for (int i = 0; i < numOps && !holder.stop; i++) {
|
||||||
float nextOp = random.nextFloat();
|
float nextOp = random.nextFloat();
|
||||||
if (nextOp < 0.3) {
|
if (nextOp < 0.3) {
|
||||||
term.set("id", "1");
|
term.set("id", new BytesRef("1"));
|
||||||
writer.updateDocument(term, doc);
|
writer.updateDocument(term, doc);
|
||||||
} else if (nextOp < 0.5) {
|
} else if (nextOp < 0.5) {
|
||||||
writer.addDocument(doc);
|
writer.addDocument(doc);
|
||||||
} else {
|
} else {
|
||||||
term.set("id", "1");
|
term.set("id", new BytesRef("1"));
|
||||||
writer.deleteDocuments(term);
|
writer.deleteDocuments(term);
|
||||||
}
|
}
|
||||||
if (holder.reader != currentReader) {
|
if (holder.reader != currentReader) {
|
||||||
|
|
Loading…
Reference in New Issue