mirror of https://github.com/apache/lucene.git
Changed TestDateFilter from date field being a Text field to being a Keyword field. Found by Doug.
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149743 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5b635fa89f
commit
7ac655d83a
|
@ -97,7 +97,7 @@ public class TestDateFilter
|
||||||
|
|
||||||
Document doc = new Document();
|
Document doc = new Document();
|
||||||
// add time that is in the past
|
// add time that is in the past
|
||||||
doc.add(Field.Text("datefield", DateField.timeToString(now - 1000)));
|
doc.add(Field.Keyword("datefield", DateField.timeToString(now - 1000)));
|
||||||
doc.add(Field.Text("body", "Today is a very sunny day in New York City"));
|
doc.add(Field.Text("body", "Today is a very sunny day in New York City"));
|
||||||
writer.addDocument(doc);
|
writer.addDocument(doc);
|
||||||
writer.optimize();
|
writer.optimize();
|
||||||
|
@ -155,7 +155,7 @@ public class TestDateFilter
|
||||||
|
|
||||||
Document doc = new Document();
|
Document doc = new Document();
|
||||||
// add time that is in the future
|
// add time that is in the future
|
||||||
doc.add(Field.Text("datefield", DateField.timeToString(now - 888888)));
|
doc.add(Field.Keyword("datefield", DateField.timeToString(now - 888888)));
|
||||||
doc.add(Field.Text("body", "Today is a very sunny day in New York City"));
|
doc.add(Field.Text("body", "Today is a very sunny day in New York City"));
|
||||||
writer.addDocument(doc);
|
writer.addDocument(doc);
|
||||||
writer.optimize();
|
writer.optimize();
|
||||||
|
|
Loading…
Reference in New Issue