more tests

This commit is contained in:
kimchy 2010-04-07 16:10:20 +03:00
parent 21f7de5123
commit bb49db8f92
3 changed files with 9 additions and 2 deletions

View File

@ -61,6 +61,13 @@ public class JsonMultiFieldTests {
assertThat(f.stringValue(), equalTo("some name"));
assertThat(f.isStored(), equalTo(true));
assertThat(f.isIndexed(), equalTo(false));
f = doc.getField("object1.multi1");
assertThat(f.name(), equalTo("object1.multi1"));
f = doc.getField("object1.multi1.string");
assertThat(f.name(), equalTo("object1.multi1.string"));
assertThat(f.stringValue(), equalTo("2010-01-01"));
}
@Test public void testBuildThenParse() throws Exception {

View File

@ -2,6 +2,6 @@
_id : 1,
name : "some name",
object1 : {
multi1 : 12
multi1 : "2010-01-01"
}
}

View File

@ -14,7 +14,7 @@
"multi1" : {
type : "multi_field",
"fields" : {
"number" : {type: "integer"},
"multi1" : {type : "date"},
"string" : {type: "string", index : "not_analyzed"}
}
}