Failed to execute phase [query_fetch], total failure

Hi everybody,

I am using elasticsearch as a search cache which means that I am constantly
inserting/expiring/searching documents in one index (in parallel). Normally
this works fine, but on heavy loads (many updates / second) some errors
start appearing in a non-deterministic way. I tried to create a python
script to reproduce this error but I couldn't reproduce outside my
application.

This is the first error:

[27/07/12 05:06:07]  WARN indexer.ElasticSearchIndexer: Could not 

search - Failed to execute phase [query_fetch], total failure;
shardFailures {[na][posts][0]: No active shards}
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to
execute phase [query_fetch], total failure; shardFaiures {[na][posts][0]:
No active shards}
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:259)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:144)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:56)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:46)
at
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at
org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:112)
at
org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)
at
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at
org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
at
org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:206)
at
org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:743)
at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)
at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)

Sometimes I get this one too (the query is correct, and it works in
different occasions):

[27/07/12 05:06:08]  WARN indexer.ElasticSearchIndexer: Could not 

search - Failed to execute phase [query_fetch], total failure;
shardFailures {[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]:
SearchParseException[[posts][0]:
query[content:casamento],from[0],size[1000]: Parse Failure [Failed to parse
source
[{"from":0,"size":1000,"query":{"query_string":{"query":"(word)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},>>"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}]]];
nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }
org.elasticsearch.action.search.SearchPhaseExecutionException: Failed
to execute phase [query_fetch], total failure; shardFail>>ures
{[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
query[content:casamento],from[0],size[1000]: Pars>>e Failure [Failed to
parse source [{"from":0,"size":1000,"query":{"query_string":{"query":
"(word)","default_field":"con>>tent","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uplo>>adDate":{"order":"asc"}}]}]]];
nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }

  1. The shard is running. It was created with the java lib in the following
    way:
    node = NodeBuilder.nodeBuilder().node();
    client = this.node.client();

  2. Some searches are correctly returned while others return this
    shardFailure error

  3. Tested with elasticsearch 0.17.7 and 0.19.8

Any clues?

Thanks in advance
Thiago

It is hard to say what is wrong in your cluster. Can your try to use bigdesk:

How many nodes does your cluster have? What hardware are you using?
How many documents do you have in your indices and what is the average
document size?

Martijn

On 27 July 2012 22:32, Thiago thiagoncc@gmail.com wrote:

Hi everybody,

I am using elasticsearch as a search cache which means that I am constantly
inserting/expiring/searching documents in one index (in parallel). Normally
this works fine, but on heavy loads (many updates / second) some errors
start appearing in a non-deterministic way. I tried to create a python
script to reproduce this error but I couldn't reproduce outside my
application.

This is the first error:

[27/07/12 05:06:07]  WARN indexer.ElasticSearchIndexer: Could not search
  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[na][posts][0]: No active shards}
    org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to
    execute phase [query_fetch], total failure; shardFaiures {[na][posts][0]:
    No active shards}
    at
    org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:259)
    at
    org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:144)
    at
    org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:56)
    at
    org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:46)
    at
    org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
    at
    org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:112)
    at
    org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)
    at
    org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
    at
    org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
    at
    org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:206)
    at
    org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:743)
    at
    org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)
    at
    org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)

Sometimes I get this one too (the query is correct, and it works in
different occasions):

[27/07/12 05:06:08]  WARN indexer.ElasticSearchIndexer: Could not search
  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
    query[content:casamento],from[0],size[1000]: Parse Failure [Failed to parse
    source
    [{"from":0,"size":1000,"query":{"query_string":{"query":"(word)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},>>"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}]]];
    nested: QueryParsingException[[posts] failed to find mapping for field
    [uploadDate]]; }
    org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to
    execute phase [query_fetch], total failure; shardFail>>ures
    {[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
    query[content:casamento],from[0],size[1000]: Pars>>e Failure [Failed to
    parse source [{"from":0,"size":1000,"query":{"query_string":{"query":
    "(word)","default_field":"con>>tent","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uplo>>adDate":{"order":"asc"}}]}]]];
    nested: QueryParsingException[[posts] failed to find mapping for field
    [uploadDate]]; }
  1. The shard is running. It was created with the java lib in the following
    way:
    node = NodeBuilder.nodeBuilder().node();
    client = this.node.client();

  2. Some searches are correctly returned while others return this
    shardFailure error

  3. Tested with elasticsearch 0.17.7 and 0.19.8

Any clues?

Thanks in advance
Thiago

--
Met vriendelijke groet,

Martijn van Groningen

I have one node (my machine), dual core with 4gb RAM. I start the database
with 0 documents, the average document size is small ~ 1Kb. I tried bigdesk
(very nice tool) but the errors come to quick so I don't get useful data.

I tried running a standalone elasticsearch and got the following errors on
its log:

[2012-07-30 15:07:52,313][DEBUG][action.search.type ] [Freak of
Science] [posts][3], node[ck2Th0zHS8GuWM4eGlPtCg], [P], >>s[STARTED]:
Failed to execute [org.elasticsearch.action.search.SearchRequest@45445d28]
org.elasticsearch.search.SearchParseException: [posts][3]:
query[content:banco],from[0],size[1000]: Parse Failure [Failed to parse
source
[{"from":0,"size":1000,"query":{"query_string":{"query":"(banco)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343671239000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}>>]]
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:557)
at
org.elasticsearch.search.SearchService.createContext(SearchService.java:469)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:228)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSea>>rchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177>>)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.elasticsearch.index.query.QueryParsingException: [posts]
failed to find mapping for field [uploadDate]
at
org.elasticsearch.index.query.NumericRangeFilterParser.parse(NumericRangeFilterParser.java:115)
at
org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:223)
at
org.elasticsearch.index.query.IndexQueryParserService.parseInnerFilter(IndexQueryParserService.java:238)
at
org.elasticsearch.search.query.FilterParseElement.parse(FilterParseElement.java:33)
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:545)
... 10 more

Note that under different scenarios, this same query works correctly.

Thanks for the reply.
-- Thiago

On Mon, Jul 30, 2012 at 8:16 AM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

It is hard to say what is wrong in your cluster. Can your try to use
bigdesk:
GitHub - lukas-vlcek/bigdesk: Live charts and statistics for Elasticsearch cluster.

How many nodes does your cluster have? What hardware are you using?
How many documents do you have in your indices and what is the average
document size?

Martijn

On 27 July 2012 22:32, Thiago thiagoncc@gmail.com wrote:

Hi everybody,

I am using elasticsearch as a search cache which means that I am
constantly
inserting/expiring/searching documents in one index (in parallel).
Normally
this works fine, but on heavy loads (many updates / second) some errors
start appearing in a non-deterministic way. I tried to create a python
script to reproduce this error but I couldn't reproduce outside my
application.

This is the first error:

[27/07/12 05:06:07]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[na][posts][0]: No active shards}
    org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to
    execute phase [query_fetch], total failure; shardFaiures
    {[na][posts][0]:
    No active shards}
    at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:259)

    at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:144)

    at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:56)

    at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:46)

    at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)

    at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:112)

    at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)

    at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)

    at

org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
at

org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:206)

    at

org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:743)

    at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)

    at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)

Sometimes I get this one too (the query is correct, and it works in
different occasions):

[27/07/12 05:06:08]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
    query[content:casamento],from[0],size[1000]: Parse Failure [Failed to
    parse
    source

[{"from":0,"size":1000,"query":{"query_string":{"query":"(word)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},>>"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}]]];

nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }
org.elasticsearch.action.search.SearchPhaseExecutionException:
Failed to
execute phase [query_fetch], total failure; shardFail>>ures
{[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
query[content:casamento],from[0],size[1000]: Pars>>e Failure [Failed to
parse source [{"from":0,"size":1000,"query":{"query_string":{"query":

"(word)","default_field":"con>>tent","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uplo>>adDate":{"order":"asc"}}]}]]];

nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }

  1. The shard is running. It was created with the java lib in the
    following
    way:
    node = NodeBuilder.nodeBuilder().node();
    client = this.node.client();

  2. Some searches are correctly returned while others return this
    shardFailure error

  3. Tested with elasticsearch 0.17.7 and 0.19.8

Any clues?

Thanks in advance
Thiago

--
Met vriendelijke groet,

Martijn van Groningen

I've managed to create a Frankenstein that reproduces the problem. Horrible
code alert.

the elasticsearch lib is the only dependency.

-- Thiago

On Mon, Jul 30, 2012 at 3:16 PM, Thiago Cardoso thiagoncc@gmail.com wrote:

I have one node (my machine), dual core with 4gb RAM. I start the database
with 0 documents, the average document size is small ~ 1Kb. I tried bigdesk
(very nice tool) but the errors come to quick so I don't get useful data.

I tried running a standalone elasticsearch and got the following errors on
its log:

[2012-07-30 15:07:52,313][DEBUG][action.search.type ] [Freak of
Science] [posts][3], node[ck2Th0zHS8GuWM4eGlPtCg], [P], >>s[STARTED]:
Failed to execute [org.elasticsearch.action.search.SearchRequest@45445d28]
org.elasticsearch.search.SearchParseException: [posts][3]:
query[content:banco],from[0],size[1000]: Parse Failure [Failed to parse
source
[{"from":0,"size":1000,"query":{"query_string":{"query":"(banco)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343671239000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}>>]]
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:557)
at
org.elasticsearch.search.SearchService.createContext(SearchService.java:469)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:228)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSea>>rchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177>>)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.elasticsearch.index.query.QueryParsingException: [posts]
failed to find mapping for field [uploadDate]
at
org.elasticsearch.index.query.NumericRangeFilterParser.parse(NumericRangeFilterParser.java:115)
at
org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:223)
at
org.elasticsearch.index.query.IndexQueryParserService.parseInnerFilter(IndexQueryParserService.java:238)
at
org.elasticsearch.search.query.FilterParseElement.parse(FilterParseElement.java:33)
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:545)
... 10 more

Note that under different scenarios, this same query works correctly.

Thanks for the reply.
-- Thiago

On Mon, Jul 30, 2012 at 8:16 AM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

It is hard to say what is wrong in your cluster. Can your try to use
bigdesk:
GitHub - lukas-vlcek/bigdesk: Live charts and statistics for Elasticsearch cluster.

How many nodes does your cluster have? What hardware are you using?
How many documents do you have in your indices and what is the average
document size?

Martijn

On 27 July 2012 22:32, Thiago thiagoncc@gmail.com wrote:

Hi everybody,

I am using elasticsearch as a search cache which means that I am
constantly
inserting/expiring/searching documents in one index (in parallel).
Normally
this works fine, but on heavy loads (many updates / second) some errors
start appearing in a non-deterministic way. I tried to create a python
script to reproduce this error but I couldn't reproduce outside my
application.

This is the first error:

[27/07/12 05:06:07]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[na][posts][0]: No active shards}
    org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to
    execute phase [query_fetch], total failure; shardFaiures
    {[na][posts][0]:
    No active shards}
    at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:259)

    at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:144)

    at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:56)

    at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:46)

    at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)

    at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:112)

    at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)

    at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)

    at

org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
at

org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:206)

    at

org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:743)

    at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)

    at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)

Sometimes I get this one too (the query is correct, and it works in
different occasions):

[27/07/12 05:06:08]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
    query[content:casamento],from[0],size[1000]: Parse Failure [Failed to
    parse
    source

[{"from":0,"size":1000,"query":{"query_string":{"query":"(word)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},>>"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}]]];

nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }
org.elasticsearch.action.search.SearchPhaseExecutionException:
Failed to
execute phase [query_fetch], total failure; shardFail>>ures
{[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
query[content:casamento],from[0],size[1000]: Pars>>e Failure [Failed to
parse source [{"from":0,"size":1000,"query":{"query_string":{"query":

"(word)","default_field":"con>>tent","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uplo>>adDate":{"order":"asc"}}]}]]];

nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }

  1. The shard is running. It was created with the java lib in the
    following
    way:
    node = NodeBuilder.nodeBuilder().node();
    client = this.node.client();

  2. Some searches are correctly returned while others return this
    shardFailure error

  3. Tested with elasticsearch 0.17.7 and 0.19.8

Any clues?

Thanks in advance
Thiago

--
Met vriendelijke groet,

Martijn van Groningen

A better version: package main;import java.util.AbstractMap;import java.util.ArrayList;imp - Pastebin.com

sorry for the consecutive emails
-- Thiago

On Mon, Jul 30, 2012 at 4:35 PM, Thiago Cardoso thiagoncc@gmail.com wrote:

I've managed to create a Frankenstein that reproduces the problem.
Horrible code alert.

package main;import java.util.AbstractMap;import java.util.ArrayList;imp - Pastebin.com

the elasticsearch lib is the only dependency.

-- Thiago

On Mon, Jul 30, 2012 at 3:16 PM, Thiago Cardoso thiagoncc@gmail.comwrote:

I have one node (my machine), dual core with 4gb RAM. I start the
database with 0 documents, the average document size is small ~ 1Kb. I
tried bigdesk (very nice tool) but the errors come to quick so I don't get
useful data.

I tried running a standalone elasticsearch and got the following errors
on its log:

[2012-07-30 15:07:52,313][DEBUG][action.search.type ] [Freak of
Science] [posts][3], node[ck2Th0zHS8GuWM4eGlPtCg], [P], >>s[STARTED]:
Failed to execute [org.elasticsearch.action.search.SearchRequest@45445d28
]
org.elasticsearch.search.SearchParseException: [posts][3]:
query[content:banco],from[0],size[1000]: Parse Failure [Failed to parse
source
[{"from":0,"size":1000,"query":{"query_string":{"query":"(banco)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343671239000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}>>]]
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:557)
at
org.elasticsearch.search.SearchService.createContext(SearchService.java:469)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:228)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSea>>rchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177>>)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.elasticsearch.index.query.QueryParsingException: [posts]
failed to find mapping for field [uploadDate]
at
org.elasticsearch.index.query.NumericRangeFilterParser.parse(NumericRangeFilterParser.java:115)
at
org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:223)
at
org.elasticsearch.index.query.IndexQueryParserService.parseInnerFilter(IndexQueryParserService.java:238)
at
org.elasticsearch.search.query.FilterParseElement.parse(FilterParseElement.java:33)
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:545)
... 10 more

Note that under different scenarios, this same query works correctly.

Thanks for the reply.
-- Thiago

On Mon, Jul 30, 2012 at 8:16 AM, Martijn v Groningen <
martijn.v.groningen@gmail.com> wrote:

It is hard to say what is wrong in your cluster. Can your try to use
bigdesk:
GitHub - lukas-vlcek/bigdesk: Live charts and statistics for Elasticsearch cluster.

How many nodes does your cluster have? What hardware are you using?
How many documents do you have in your indices and what is the average
document size?

Martijn

On 27 July 2012 22:32, Thiago thiagoncc@gmail.com wrote:

Hi everybody,

I am using elasticsearch as a search cache which means that I am
constantly
inserting/expiring/searching documents in one index (in parallel).
Normally
this works fine, but on heavy loads (many updates / second) some errors
start appearing in a non-deterministic way. I tried to create a python
script to reproduce this error but I couldn't reproduce outside my
application.

This is the first error:

[27/07/12 05:06:07]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[na][posts][0]: No active shards}
    org.elasticsearch.action.search.SearchPhaseExecutionException: Failed
    to
    execute phase [query_fetch], total failure; shardFaiures
    {[na][posts][0]:
    No active shards}
    at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:259)

    at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:144)

    at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:56)

    at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:46)

    at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)

    at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:112)

    at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)

    at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)

    at

org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
at

org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:206)

    at

org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:743)

    at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)

    at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)

Sometimes I get this one too (the query is correct, and it works in
different occasions):

[27/07/12 05:06:08]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
    query[content:casamento],from[0],size[1000]: Parse Failure [Failed to
    parse
    source

[{"from":0,"size":1000,"query":{"query_string":{"query":"(word)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},>>"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}]]];

nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }
org.elasticsearch.action.search.SearchPhaseExecutionException:
Failed to
execute phase [query_fetch], total failure; shardFail>>ures
{[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
query[content:casamento],from[0],size[1000]: Pars>>e Failure [Failed to
parse source [{"from":0,"size":1000,"query":{"query_string":{"query":

"(word)","default_field":"con>>tent","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uplo>>adDate":{"order":"asc"}}]}]]];

nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }

  1. The shard is running. It was created with the java lib in the
    following
    way:
    node = NodeBuilder.nodeBuilder().node();
    client = this.node.client();

  2. Some searches are correctly returned while others return this
    shardFailure error

  3. Tested with elasticsearch 0.17.7 and 0.19.8

Any clues?

Thanks in advance
Thiago

--
Met vriendelijke groet,

Martijn van Groningen

I tried to run your code from your last. I also got errors, but these
errors were related to the cluster not being ready.
I added the following line to the ElasticSearchIndexerBug constructor
after client has been initialized (line 196):
client.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet();

With this in place everything seems to work fine. No errors occurred.
I couldn't reproduce the error you described. Are you using a custom mapping?

Martijn

On 30 July 2012 23:09, Thiago Cardoso thiagoncc@gmail.com wrote:

A better version: package main;import java.util.AbstractMap;import java.util.ArrayList;imp - Pastebin.com

sorry for the consecutive emails
-- Thiago

On Mon, Jul 30, 2012 at 4:35 PM, Thiago Cardoso thiagoncc@gmail.com wrote:

I've managed to create a Frankenstein that reproduces the problem.
Horrible code alert.

package main;import java.util.AbstractMap;import java.util.ArrayList;imp - Pastebin.com

the elasticsearch lib is the only dependency.

-- Thiago

On Mon, Jul 30, 2012 at 3:16 PM, Thiago Cardoso thiagoncc@gmail.com
wrote:

I have one node (my machine), dual core with 4gb RAM. I start the
database with 0 documents, the average document size is small ~ 1Kb. I tried
bigdesk (very nice tool) but the errors come to quick so I don't get useful
data.

I tried running a standalone elasticsearch and got the following errors
on its log:

[2012-07-30 15:07:52,313][DEBUG][action.search.type ] [Freak of
Science] [posts][3], node[ck2Th0zHS8GuWM4eGlPtCg], [P], >>s[STARTED]: Failed
to execute [org.elasticsearch.action.search.SearchRequest@45445d28]
org.elasticsearch.search.SearchParseException: [posts][3]:
query[content:banco],from[0],size[1000]: Parse Failure [Failed to parse
source
[{"from":0,"size":1000,"query":{"query_string":{"query":"(banco)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343671239000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}>>]]
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:557)
at
org.elasticsearch.search.SearchService.createContext(SearchService.java:469)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:228)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSea>>rchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177>>)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.elasticsearch.index.query.QueryParsingException: [posts]
failed to find mapping for field [uploadDate]
at
org.elasticsearch.index.query.NumericRangeFilterParser.parse(NumericRangeFilterParser.java:115)
at
org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:223)
at
org.elasticsearch.index.query.IndexQueryParserService.parseInnerFilter(IndexQueryParserService.java:238)
at
org.elasticsearch.search.query.FilterParseElement.parse(FilterParseElement.java:33)
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:545)
... 10 more

Note that under different scenarios, this same query works correctly.

Thanks for the reply.
-- Thiago

On Mon, Jul 30, 2012 at 8:16 AM, Martijn v Groningen
martijn.v.groningen@gmail.com wrote:

It is hard to say what is wrong in your cluster. Can your try to use
bigdesk:
GitHub - lukas-vlcek/bigdesk: Live charts and statistics for Elasticsearch cluster.

How many nodes does your cluster have? What hardware are you using?
How many documents do you have in your indices and what is the average
document size?

Martijn

On 27 July 2012 22:32, Thiago thiagoncc@gmail.com wrote:

Hi everybody,

I am using elasticsearch as a search cache which means that I am
constantly
inserting/expiring/searching documents in one index (in parallel).
Normally
this works fine, but on heavy loads (many updates / second) some
errors
start appearing in a non-deterministic way. I tried to create a python
script to reproduce this error but I couldn't reproduce outside my
application.

This is the first error:

[27/07/12 05:06:07]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[na][posts][0]: No active shards}
    org.elasticsearch.action.search.SearchPhaseExecutionException: Failed
    to
    execute phase [query_fetch], total failure; shardFaiures
    {[na][posts][0]:
    No active shards}
    at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:259)
at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:144)
at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:56)
at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:46)
at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:112)
at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)
at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at
org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
at

org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:206)
at

org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:743)
at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)
at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)

Sometimes I get this one too (the query is correct, and it works in
different occasions):

[27/07/12 05:06:08]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
    query[content:casamento],from[0],size[1000]: Parse Failure [Failed to
    parse
    source

[{"from":0,"size":1000,"query":{"query_string":{"query":"(word)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},>>"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}]]];
nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }
org.elasticsearch.action.search.SearchPhaseExecutionException:
Failed to
execute phase [query_fetch], total failure; shardFail>>ures
{[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
query[content:casamento],from[0],size[1000]: Pars>>e Failure [Failed
to
parse source [{"from":0,"size":1000,"query":{"query_string":{"query":

"(word)","default_field":"con>>tent","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uplo>>adDate":{"order":"asc"}}]}]]];
nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }

  1. The shard is running. It was created with the java lib in the
    following
    way:
    node = NodeBuilder.nodeBuilder().node();
    client = this.node.client();

  2. Some searches are correctly returned while others return this
    shardFailure error

  3. Tested with elasticsearch 0.17.7 and 0.19.8

Any clues?

Thanks in advance
Thiago

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen

Thanks for your help Martijn,

this sure was a problem but I still get some errors. Here are the main
and my elasticsearch.json:

And the output I get:

Note that this error is undeterministic, it can happen in the
beggining of the execution. It easier to reproduce if you erase your
data dir before executing.

thanks
-- Thiago

On Tue, Jul 31, 2012 at 7:00 AM, Martijn v Groningen
martijn.v.groningen@gmail.com wrote:

I tried to run your code from your last. I also got errors, but these
errors were related to the cluster not being ready.
I added the following line to the ElasticSearchIndexerBug constructor
after client has been initialized (line 196):
client.admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet();

With this in place everything seems to work fine. No errors occurred.
I couldn't reproduce the error you described. Are you using a custom mapping?

Martijn

On 30 July 2012 23:09, Thiago Cardoso thiagoncc@gmail.com wrote:

A better version: package main;import java.util.AbstractMap;import java.util.ArrayList;imp - Pastebin.com

sorry for the consecutive emails
-- Thiago

On Mon, Jul 30, 2012 at 4:35 PM, Thiago Cardoso thiagoncc@gmail.com wrote:

I've managed to create a Frankenstein that reproduces the problem.
Horrible code alert.

package main;import java.util.AbstractMap;import java.util.ArrayList;imp - Pastebin.com

the elasticsearch lib is the only dependency.

-- Thiago

On Mon, Jul 30, 2012 at 3:16 PM, Thiago Cardoso thiagoncc@gmail.com
wrote:

I have one node (my machine), dual core with 4gb RAM. I start the
database with 0 documents, the average document size is small ~ 1Kb. I tried
bigdesk (very nice tool) but the errors come to quick so I don't get useful
data.

I tried running a standalone elasticsearch and got the following errors
on its log:

[2012-07-30 15:07:52,313][DEBUG][action.search.type ] [Freak of
Science] [posts][3], node[ck2Th0zHS8GuWM4eGlPtCg], [P], >>s[STARTED]: Failed
to execute [org.elasticsearch.action.search.SearchRequest@45445d28]
org.elasticsearch.search.SearchParseException: [posts][3]:
query[content:banco],from[0],size[1000]: Parse Failure [Failed to parse
source
[{"from":0,"size":1000,"query":{"query_string":{"query":"(banco)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343671239000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}>>]]
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:557)
at
org.elasticsearch.search.SearchService.createContext(SearchService.java:469)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:228)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSea>>rchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAct>>ion.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177>>)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: org.elasticsearch.index.query.QueryParsingException: [posts]
failed to find mapping for field [uploadDate]
at
org.elasticsearch.index.query.NumericRangeFilterParser.parse(NumericRangeFilterParser.java:115)
at
org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:223)
at
org.elasticsearch.index.query.IndexQueryParserService.parseInnerFilter(IndexQueryParserService.java:238)
at
org.elasticsearch.search.query.FilterParseElement.parse(FilterParseElement.java:33)
at
org.elasticsearch.search.SearchService.parseSource(SearchService.java:545)
... 10 more

Note that under different scenarios, this same query works correctly.

Thanks for the reply.
-- Thiago

On Mon, Jul 30, 2012 at 8:16 AM, Martijn v Groningen
martijn.v.groningen@gmail.com wrote:

It is hard to say what is wrong in your cluster. Can your try to use
bigdesk:
GitHub - lukas-vlcek/bigdesk: Live charts and statistics for Elasticsearch cluster.

How many nodes does your cluster have? What hardware are you using?
How many documents do you have in your indices and what is the average
document size?

Martijn

On 27 July 2012 22:32, Thiago thiagoncc@gmail.com wrote:

Hi everybody,

I am using elasticsearch as a search cache which means that I am
constantly
inserting/expiring/searching documents in one index (in parallel).
Normally
this works fine, but on heavy loads (many updates / second) some
errors
start appearing in a non-deterministic way. I tried to create a python
script to reproduce this error but I couldn't reproduce outside my
application.

This is the first error:

[27/07/12 05:06:07]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[na][posts][0]: No active shards}
    org.elasticsearch.action.search.SearchPhaseExecutionException: Failed
    to
    execute phase [query_fetch], total failure; shardFaiures
    {[na][posts][0]:
    No active shards}
    at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:259)
at

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(TransportSearchTypeAction.java:144)
at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:56)
at

org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction.doExecute(TransportSearchQueryAndFetchAction.java:46)
at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:112)
at

org.elasticsearch.action.search.TransportSearchAction.doExecute(TransportSearchAction.java:43)
at

org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:61)
at
org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:83)
at

org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:206)
at

org.elasticsearch.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:743)
at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)
at

org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)

Sometimes I get this one too (the query is correct, and it works in
different occasions):

[27/07/12 05:06:08]  WARN indexer.ElasticSearchIndexer: Could not

search

  • Failed to execute phase [query_fetch], total failure; shardFailures
    {[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
    query[content:casamento],from[0],size[1000]: Parse Failure [Failed to
    parse
    source

[{"from":0,"size":1000,"query":{"query_string":{"query":"(word)","default_field":"content","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},>>"explain":true,"sort":[{"uploadDate":{"order":"asc"}}]}]]];
nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }
org.elasticsearch.action.search.SearchPhaseExecutionException:
Failed to
execute phase [query_fetch], total failure; shardFail>>ures
{[ST_pdB1fS3aeJYU1NfiKIQ][posts][0]: SearchParseException[[posts][0]:
query[content:casamento],from[0],size[1000]: Pars>>e Failure [Failed
to
parse source [{"from":0,"size":1000,"query":{"query_string":{"query":

"(word)","default_field":"con>>tent","default_operator":"and","analyzer":"standard","allow_leading_wildcard":false,"phrase_slop":0}},"filter":{"numeric_range":{"uploadDate":{"from":1343418749000,"to":null,"include_lower":true,"include_upper":true}}},"explain":true,"sort":[{"uplo>>adDate":{"order":"asc"}}]}]]];
nested: QueryParsingException[[posts] failed to find mapping for field
[uploadDate]]; }

  1. The shard is running. It was created with the java lib in the
    following
    way:
    node = NodeBuilder.nodeBuilder().node();
    client = this.node.client();

  2. Some searches are correctly returned while others return this
    shardFailure error

  3. Tested with elasticsearch 0.17.7 and 0.19.8

Any clues?

Thanks in advance
Thiago

--
Met vriendelijke groet,

Martijn van Groningen

--
Met vriendelijke groet,

Martijn van Groningen