NullPointerException on CompletionLookupProvider


#1

I recently setup a new 1.7.2 instance on my local machine. I am getting a NullPointerException when attempting to perform an auto search. The following are the steps I used in order to recreate the problem. Any help is appreciated as this it the only thing holding me up from utilizing Elasticsearch in a production environment.

  1. Create an autocomplete index before bulk loading:

    {
    "mappings": {
    "music": {
    "properties": {
    "artist": { "type": "string" },
    "album": { "type": "string" },
    "title": { "type": "string" },
    "tag_suggest": {
    "type": "completion",
    "index_analyzer": "simple",
    "search_analyzer": "simple",
    "payloads": false
    }
    }
    }
    }
    }

  2. Add some simple documents using the bulk API with the following content:

    { "index": {"_index": "music", "_type": "string" } }
    { "artist": "Artist 1", "album": "Album 1", "title": "Song 1", "tags": [ "90s", "grunge" ], "tag_suggest": [ "90s", "grunge" ] }

  3. Make sure search works (success)

    curl -XPOST "http://localhost:9200/music/_search?pretty" -d '{ "query": { "match": { "title": "song 1" } } }'

  4. Verify autocomplete (failure)

    curl -XPOST "http://localhost:9200/music/_suggest?pretty" -d '{ "music_suggest": { "text": "90", "completion": { "field": "tag_suggest" } } }'

The error that I am receiving in my logs is as follows:

[2015-10-12 15:27:07,993][WARN ][cluster.action.shard ] [Tess-One] [music][1] received shard failed for [music][1], node[ibl1HM_ISR-pZoD-j2_33g], [P], s[INITIALIZING], unassigned_info[[reason=ALLOCATION_FAILED], at[2015-10-12T19:27:07.948Z], details[shard failure [failed recovery][IndexShardGatewayRecoveryException[[music][1] failed recovery]; nested: FlushFailedEngineException[[music][1] Flush failed]; nested: NullPointerException; ]]], indexUUID [yqYHNsd0RN-5BE377OEvYA], reason [shard failure [failed recovery][IndexShardGatewayRecoveryException[[music][1] failed recovery]; nested: FlushFailedEngineException[[music][1] Flush failed]; nested: NullPointerException; ]] [2015-10-12 15:27:07,997][WARN ][index.engine ] [Tess-One] [music][0] failed engine [lucene commit failed] java.lang.NullPointerException at org.elasticsearch.search.suggest.completion.Completion090PostingsFormat$CompletionLookupProvider.parsePayload(Completion090PostingsFormat.java:337) at org.elasticsearch.search.suggest.completion.AnalyzingCompletionLookupProvider$CompletionPostingsConsumer.addPosition(AnalyzingCompletionLookupProvider.java:189) at org.elasticsearch.search.suggest.completion.Completion090PostingsFormat$GroupedPostingsConsumer.addPosition(Completion090PostingsFormat.java:188) at org.apache.lucene.index.FreqProxTermsWriterPerField.flush(FreqProxTermsWriterPerField.java:493) at org.apache.lucene.index.FreqProxTermsWriter.flush(FreqProxTermsWriter.java:80) at org.apache.lucene.index.DefaultIndexingChain.flush(DefaultIndexingChain.java:114) at org.apache.lucene.index.DocumentsWriterPerThread.flush(DocumentsWriterPerThread.java:441) at org.apache.lucene.index.DocumentsWriter.doFlush(DocumentsWriter.java:521) at org.apache.lucene.index.DocumentsWriter.flushAllThreads(DocumentsWriter.java:632) at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:2979) at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3134) at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3101) at org.elasticsearch.index.engine.InternalEngine.commitIndexWriter(InternalEngine.java:1293) at org.elasticsearch.index.engine.InternalEngine.flush(InternalEngine.java:669) at org.elasticsearch.index.engine.InternalEngine.flush(InternalEngine.java:631) at org.elasticsearch.index.shard.IndexShard.flush(IndexShard.java:723) at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:306) at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:112) 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)

(Mark Walkom) #2

What state is your cluster in?


(system) #3