Examples of analyzers()


Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .field("field2", "value2")
                .endObject().copiedBytes());

        FieldNameAnalyzer analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));

        // check that it serializes and de-serializes correctly

        DocumentMapper reparsedMapper = MapperTests.newParser().parse(documentMapper.mappingSource().string());
View Full Code Here

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .endObject().copiedBytes());

        FieldNameAnalyzer analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));

        // check that it serializes and de-serializes correctly

        DocumentMapper reparsedMapper = MapperTests.newParser().parse(documentMapper.mappingSource().string());
View Full Code Here

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .field("field2", "value2")
                .endObject().copiedBytes());

        analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));
    }


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

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .endObject().copiedBytes());

        analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));
    }


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

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .field("field2", "value2")
                .endObject().copiedBytes());

        FieldNameAnalyzer analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));

        // check that it serializes and de-serializes correctly

        DocumentMapper reparsedMapper = MapperTests.newParser().parse(documentMapper.mappingSource().string());
View Full Code Here

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .endObject().copiedBytes());

        FieldNameAnalyzer analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));

        // check that it serializes and de-serializes correctly

        DocumentMapper reparsedMapper = MapperTests.newParser().parse(documentMapper.mappingSource().string());
View Full Code Here

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .field("field2", "value2")
                .endObject().copiedBytes());

        analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));
    }

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

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .endObject().copiedBytes());

        analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));
    }

    @Test public void testAnalyzerMappingNotIndexedNorStored() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
                .startObject("_analyzer").field("path", "field_analyzer").endObject()
View Full Code Here

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .field("field2", "value2")
                .endObject().copiedBytes());

        FieldNameAnalyzer analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));

        // check that it serializes and de-serializes correctly

        DocumentMapper reparsedMapper = MapperTests.newParser().parse(documentMapper.mappingSource().string());
View Full Code Here

Examples of org.elasticsearch.index.analysis.FieldNameAnalyzer.analyzers()

                .endObject().copiedBytes());

        FieldNameAnalyzer analyzer = (FieldNameAnalyzer) doc.analyzer();
        assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
        assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));

        // check that it serializes and de-serializes correctly

        DocumentMapper reparsedMapper = MapperTests.newParser().parse(documentMapper.mappingSource().string());
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.