Getting a null_pointer_exception when executing a distributed multi-term vector query


#1

I'm running the following query on a 3-node ES cluster running ES 2.2.0 on Microsoft Azure. When dfs is set to true, I get a null_pointer_description (demonstrated below). However, if I set dfs to false, I get term vectors. I'd really like to set dfs to true because I'd like to get term statistics for the entire index.

My next step is to try to make sense of the logs on the Azure boxes, but I figured I'd post this question in the meantime in case anything obvious stands out to anybody.

Thanks for your help!

POST http://url/my_index/my_type/_mtermvectors
BODY:

{  
    "ids" : ["AVM0c1e8FqhBZ7YfiHM8"],
    "parameters": {
        "fields": ["LongDescription"],
        "term_statistics": true,
        "field_statistics": true,
        "dfs": true
    }
}

The response I'm getting is:

{
  "docs": [
    {
      "_index": "my_index",
      "_type": "my_type",
      "_id": "AVM0c1e8FqhBZ7YfiHM8",
      "error": {
        "root_cause": [
          {
            "type": "exception",
            "reason": "failed to execute term vector request"
          }
        ],
        "type": "exception",
        "reason": "failed to execute term vector request",
        "caused_by": {
          "type": "null_pointer_exception",
          "reason": null
        }
      }
    }
  ]
}

(Adrien Grand) #2

Do you happen to have a stack trace in the logs?


#3

Here's what I was able to pull from the logs:

nested: TooManyClauses[maxClauseCount is set to 1024];
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:853)
at org.elasticsearch.search.SearchService.createContext(SearchService.java:652)
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:618)
at org.elasticsearch.search.SearchService.executeDfsPhase(SearchService.java:263)
at org.elasticsearch.action.termvectors.dfs.TransportDfsOnlyAction.shardOperation(TransportDfsOnlyAction.java:131)
at org.elasticsearch.action.termvectors.dfs.TransportDfsOnlyAction.shardOperation(TransportDfsOnlyAction.java:54)
at org.elasticsearch.action.support.broadcast.TransportBroadcastAction$ShardTransportHandler.messageReceived(TransportBroadcastAction.java:268)
at org.elasticsearch.action.support.broadcast.TransportBroadcastAction$ShardTransportHandler.messageReceived(TransportBroadcastAction.java:264)
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:350)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
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)
Caused by: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
at org.apache.lucene.search.BooleanQuery$Builder.add(BooleanQuery.java:136)
at org.apache.lucene.search.BooleanQuery$Builder.add(BooleanQuery.java:124)
at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:167)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:256)
at org.elasticsearch.index.query.IndexQueryParserService.innerParse(IndexQueryParserService.java:303)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:206)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:201)
at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:836)
... 12 more
[2016-03-08 16:16:37,846][DEBUG][action.termvectors ] [qwerty-es-kc-c1] [my_data_set][0] failed to execute multi term vectors for [document]/[AVM0c1e8FqhBZ7YfiHM8]
ElasticsearchException[failed to execute term vector request]; nested: NullPointerException;
at org.elasticsearch.index.termvectors.ShardTermVectorsService.getTermVectors(ShardTermVectorsService.java:152)
at org.elasticsearch.action.termvectors.TransportShardMultiTermsVectorAction.shardOperation(TransportShardMultiTermsVectorAction.java:84)
at org.elasticsearch.action.termvectors.TransportShardMultiTermsVectorAction.shardOperation(TransportShardMultiTermsVectorAction.java:40)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$ShardTransportHandler.messageReceived(TransportSingleShardAction.java:282)
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$ShardTransportHandler.messageReceived(TransportSingleShardAction.java:275)
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:350)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
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)
Caused by: java.lang.NullPointerException
at org.elasticsearch.action.termvectors.TermVectorsWriter.writeFieldStatistics(TermVectorsWriter.java:265)
at org.elasticsearch.action.termvectors.TermVectorsWriter.setFields(TermVectorsWriter.java:86)
at org.elasticsearch.action.termvectors.TermVectorsResponse.setFields(TermVectorsResponse.java:364)
at org.elasticsearch.index.termvectors.ShardTermVectorsService.getTermVectors(ShardTermVectorsService.java:149)


(Adrien Grand) #4

This looks like a bug. Could you open a bug at https://github.com/elastic/elasticsearch that links to this discussion? Thanks!


#5

Absolutely. Thanks!


#6

I created a GitHub issue. You can find it here. Thanks again for the help!


(system) #7