Package org.apache.lucene.index

Examples of org.apache.lucene.index.IndexableField.stringValue()


        doc = docMapper.parse(json).rootDoc();

        f = doc.getField("b");
        assertThat(f, notNullValue());
        assertThat(f.name(), equalTo("b"));
        assertThat(f.stringValue(), equalTo("-1.0,-1.0"));
        assertThat(f.fieldType().stored(), equalTo(false));
        assertNotSame(IndexOptions.NONE, f.fieldType().indexOptions());

        f = doc.getField("b.a");
        assertThat(f, notNullValue());
View Full Code Here


        assertNotSame(IndexOptions.NONE, f.fieldType().indexOptions());

        f = doc.getField("b.a");
        assertThat(f, notNullValue());
        assertThat(f.name(), equalTo("b.a"));
        assertThat(f.stringValue(), equalTo("-1,-1"));
        assertThat(f.fieldType().stored(), equalTo(false));
        assertNotSame(IndexOptions.NONE, f.fieldType().indexOptions());

        json = jsonBuilder().startObject()
                .field("_id", "1")
View Full Code Here

        doc = docMapper.parse(json).rootDoc();

        f = doc.getFields("b")[0];
        assertThat(f, notNullValue());
        assertThat(f.name(), equalTo("b"));
        assertThat(f.stringValue(), equalTo("-1.0,-1.0"));
        assertThat(f.fieldType().stored(), equalTo(false));
        assertNotSame(IndexOptions.NONE, f.fieldType().indexOptions());

        f = doc.getFields("b")[1];
        assertThat(f, notNullValue());
View Full Code Here

        assertNotSame(IndexOptions.NONE, f.fieldType().indexOptions());

        f = doc.getFields("b")[1];
        assertThat(f, notNullValue());
        assertThat(f.name(), equalTo("b"));
        assertThat(f.stringValue(), equalTo("-2.0,-2.0"));
        assertThat(f.fieldType().stored(), equalTo(false));
        assertNotSame(IndexOptions.NONE, f.fieldType().indexOptions());

        f = doc.getField("b.a");
        assertThat(f, notNullValue());
View Full Code Here

        assertThat(f, notNullValue());
        assertThat(f.name(), equalTo("b.a"));
        // NOTE: "]" B/c the lat,long aren't specified as a string, we miss the actual values when parsing the multi
        // fields. We already skipped over the coordinates values and can't get to the coordinates.
        // This happens if coordinates are specified as array and object.
        assertThat(f.stringValue(), equalTo("]"));
        assertThat(f.fieldType().stored(), equalTo(false));
        assertNotSame(IndexOptions.NONE, f.fieldType().indexOptions());
    }

    @Test
View Full Code Here

        Document doc = docMapper.parse(json).rootDoc();

        IndexableField f = doc.getField("a");
        assertThat(f, notNullValue());
        assertThat(f.name(), equalTo("a"));
        assertThat(f.stringValue(), equalTo("complete me"));
        assertThat(f.fieldType().stored(), equalTo(false));
        assertNotSame(IndexOptions.NONE, f.fieldType().indexOptions());

        f = doc.getField("a.b");
        assertThat(f, 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.