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());

        assertThat(doc.rootDoc().getFieldable("point.lat"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(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());

        assertThat(doc.rootDoc().getFieldable("point.lat"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(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());

        assertThat(doc.rootDoc().getFieldable("point.lat"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(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", true).field("geohash", true).endObject().endObject()
View Full Code Here

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

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

        assertThat(doc.rootDoc().getFieldable("point.lat"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(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());

        assertThat(doc.rootDoc().getFieldable("point.lat"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(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());

        assertThat(doc.rootDoc().getFieldable("point.lat"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().get("point.geohash"), equalTo(GeoHashUtils.encode(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("lat_lon", true).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());

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

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

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

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

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

                .endObject()
                .copiedBytes());

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

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

                .startObject()
                .field("field", "value")
                .endObject()
                .copiedBytes()).type("type").id("1").routing("routing_value"));

        assertThat(doc.rootDoc().get("_routing"), equalTo("routing_value"));
        assertThat(doc.rootDoc().get("field"), equalTo("value"));
    }
}
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.