How to trace prepared index will used custom analyzer?


(Sam-4) #1

Hi

I try to create custom analyzer with following settings :

        //   for creating custom analyzer

         client.admin().indices().prepareCreate("twitter")
        .setSettings(ImmutableSettings.settingsBuilder().loadFromSource( XContentFactory.jsonBuilder()
            .startObject()
                .startObject("analysis")
                    .startObject("analyzer")
                        .startObject("steak")
                            .field("type", "custom")
                            .field("tokenizer", "standard")
                            .field("filter", new String[]

{"snowball", "standard", "lowercase"})
.endObject()
.endObject()
.endObject()
.endObject().string()))
.execute().actionGet();

I have certain doubt regarding on analyzer :

1.used settings are correct for creating custom analyzer.
2.how to trace prepared index will used custom analyzer ,because if
custom analyzer will not used in this case it use default analyzer and
create index with any exception.

Thanks


(system) #2