Examples of rootDoc()


Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .startObject()
                .startObject("point").field("lat", 1.2).field("lon", 1.3).endObject()
                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }

    @Test public void testLatLonInOneValue() throws Exception {
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .startObject("point").field("lat", 1.2).field("lon", 1.3).endObject()
                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }

    @Test public void testLatLonInOneValue() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }

    @Test public void testLatLonInOneValue() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
                .startObject("properties").startObject("point").field("type", "geo_point").field("lat_lon", false).endObject().endObject()
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .startObject()
                .field("point", "1.2,1.3")
                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }

    @Test public void testGeoHashValue() throws Exception {
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .field("point", "1.2,1.3")
                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }

    @Test public void testGeoHashValue() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }

    @Test public void testGeoHashValue() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
                .startObject("properties").startObject("point").field("type", "geo_point").field("geohash", true).endObject().endObject()
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .startObject()
                .field("point", GeoHashUtils.encode(1.2, 1.3))
                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(1.2, 1.3)));
        MatcherAssert.assertThat(doc.rootDoc().get("point"), notNullValue());
    }
}
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .field("point", GeoHashUtils.encode(1.2, 1.3))
                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(1.2, 1.3)));
        MatcherAssert.assertThat(doc.rootDoc().get("point"), notNullValue());
    }
}
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .endObject()
                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(1.2, 1.3)));
        MatcherAssert.assertThat(doc.rootDoc().get("point"), notNullValue());
    }
}
View Full Code Here

Examples of org.elasticsearch.index.mapper.ParsedDocument.rootDoc()

                .copiedBytes());

        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lat"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().getFieldable("point.lon"), nullValue());
        MatcherAssert.assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(1.2, 1.3)));
        MatcherAssert.assertThat(doc.rootDoc().get("point"), notNullValue());
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.