Autocomplete Analyzer

Hi,

I am following this:

https://www.elastic.co/guide/en/elasticsearch/guide/current/_index_time_search_as_you_type.html

My settings look like this:

{
  "parts": {
    "settings": {
      "index": {
        "creation_date": "1455184604925",
        "analysis": {
          "filter": {
            "autocomplete_filter": {
              "type": "edge_ngram",
              "min_gram": "1",
              "max_gram": "20"
            }
          },
          "analyzer": {
            "autocomplete": {
              "filter": [
                "lowercase",
                "autocomplete_filter"
              ],
              "type": "custom",
              "tokenizer": "standard"
            }
          }
        },
        "number_of_shards": "1",
        "number_of_replicas": "1",
        "uuid": "BnzMGfSBRAWq5Wnnd1KJyg",
        "version": {
          "created": "2010199"
        }
      }
    }
  }
}

but when I do:

curl -XPOST 'http://blahblah:9200/_analyze?analyzer=autocomplete' -d 'bel'

my terminal just seems to hang

But this works:

curl -XPOST 'http://blahblah:9200/_analyze?analyzer=standard' -d 'bel'

{"tokens":[{"token":"bel","start_offset":0,"end_offset":3,"type":"","position":0}]}

I can see this is the log:

[2016-02-11 11:35:19,930][ERROR][transport                ] [node-1] failed to handle exception for action [indices:admin/analyze[s]], handler [org.elasticsearch.action.support.single.shard.TransportSing$
java.lang.NullPointerException
        at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:195)
        at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.access$700(TransportSingleShardAction.java:115)
        at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction$1.handleException(TransportSingleShardAction.java:174)
        at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:821)
        at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:799)               
        at org.elasticsearch.transport.TransportService$4.onFailure(TransportService.java:361)                 
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:42)                  
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)             
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Looks like it could be this:

I will get my documents indexed and see what happens.

Mick

Seems to be working OK.

I needed this as well: