private Document createDocument(Person person) { Document doc = new Document(); doc.add(new Field("id", person.getId(), Store.YES, Index.NOT_ANALYZED)); doc.add(new Field("name", person.getName(), Store.YES, Index.NOT_ANALYZED)); doc.add( new Field("birthDate", person.getBirthDate().toString(), Store.YES, Index.NOT_ANALYZED)); return doc; }
@Test public void Equals_By_Birth_Date() throws Exception { testQuery(person.birthDate.eq(clooney.getBirthDate()), "birthDate:1961-04-06", 1); }