Package org.elasticsearch.index.mapper

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.lat").getBinaryValue(), nullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon").getBinaryValue(), nullValue());
        assertThat(doc.rootDoc().getFieldable("point.geohash"), nullValue());
        assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }
View Full Code Here


                .endObject()
                .copiedBytes());

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

                .copiedBytes());

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

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

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

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

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

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

                .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.lat").getBinaryValue(), equalTo(Numbers.doubleToBytes(1.2)));
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon").getBinaryValue(), equalTo(Numbers.doubleToBytes(1.3)));
        assertThat(doc.rootDoc().getFieldable("point.geohash"), nullValue());
        assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
View Full Code Here

                .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.lat").getBinaryValue(), equalTo(Numbers.doubleToBytes(1.2)));
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon").getBinaryValue(), equalTo(Numbers.doubleToBytes(1.3)));
        assertThat(doc.rootDoc().getFieldable("point.geohash"), nullValue());
        assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }
View Full Code Here

                .endObject()
                .copiedBytes());

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

                .copiedBytes());

        assertThat(doc.rootDoc().getFieldable("point.lat"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lat").getBinaryValue(), equalTo(Numbers.doubleToBytes(1.2)));
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon").getBinaryValue(), equalTo(Numbers.doubleToBytes(1.3)));
        assertThat(doc.rootDoc().getFieldable("point.geohash"), nullValue());
        assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }

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

        assertThat(doc.rootDoc().getFieldable("point.lat"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lat").getBinaryValue(), equalTo(Numbers.doubleToBytes(1.2)));
        assertThat(doc.rootDoc().getFieldable("point.lon"), notNullValue());
        assertThat(doc.rootDoc().getFieldable("point.lon").getBinaryValue(), equalTo(Numbers.doubleToBytes(1.3)));
        assertThat(doc.rootDoc().getFieldable("point.geohash"), nullValue());
        assertThat(doc.rootDoc().get("point"), equalTo("1.2,1.3"));
    }

    @Test public void testArrayLatLonValues() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
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.