# Elasticsearch-0.19.4 \_all search query throws an exception

**URL:** <https://discuss.elastic.co/t/elasticsearch-0-19-4--all-search-query-throws-an-exception/9058>\
**Category:** Elasticsearch\
**Created:** [September 18, 2012, 9:41pm UTC](https://discuss.elastic.co/t/elasticsearch-0-19-4--all-search-query-throws-an-exception/9058 "2012-09-18T21:41:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_Kariyanahall](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@Praveen\_Kariyanahall](https://discuss.elastic.co/u/Praveen_Kariyanahall)\
**Post date:** [September 18, 2012, 9:41pm UTC](https://discuss.elastic.co/t/elasticsearch-0-19-4--all-search-query-throws-an-exception/9058/1 "2012-09-18T21:41:35Z")

</div>

We have our documents indexed everyday (tenant name and date based) and the  
mapping are tenant based.

For example:  
Index : abcDotcom-2012-09-18  
Type/Mapping: abcDotCom-documentTypeBlah

So we get the corresponding tenant documents search result by manipulating  
the index name and Type in our search query.

But sometimes when we need to get all the documents for a give tenant  
(independent of date), we query like

[http://localhost:9200/](http://localhost:9200/)_\_all_/_abcDotCom-documentTypeBlah_/\_search ..

But note that for another tenant xyzDotCom there wont be any mapping  
called abcDotCom-documentTypeBlah. Hence I expect it to skip over. Instead  
I see an exception thrown by the error logs.

How can change my query so that elasticsearch doesnt throw this exception?

Thanks in Advance  
-pk

[2012-09-18 19:59:44,760][DEBUG][action.search.type] [Patriot I]  
[xyzDotcom-2012-09-13][0], node[G7TdDyODQ-SEr\_K76lfJUw], [P], s[STARTED]:  
Failed to execute [org.elasticsearch.action.search.SearchRequest@2c06bf4f]  
org.elasticsearch.search.SearchParseException: [xyzDotCom-2012-09-13][0]:_query[ConstantScore(NotDeleted(_:\*))]  
\*,from[-1],size[-1]: Parse Failure [Failed to parse source  
[{"query":{"match\_all":{}},"sort":{"created\_timestamp":{"order":"desc","ignore\_unmapped":"true"}},"facets":{"user":{"terms":{"field":"user"}},"facility":{"terms":{"field":"facility"}},"severity":{"terms":{"field":"severity"}},"histo1":{"date\_histogram":{"field":"created\_timestamp","interval":"minute"}}}}]]  
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(TransportSearchQueryThenFetchAction.java:80)  
at  
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:204)  
at  
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.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:722)  
Caused by: org.elasticsearch.search.facet.FacetPhaseExecutionException:  
Facet [histo1]: (key) field [created\_timestamp] not found  
at  
org.elasticsearch.search.facet.datehistogram.DateHistogramFacetProcessor.parse(DateHistogramFacetProcessor.java:147)  
at  
org.elasticsearch.search.facet.FacetParseElement.parse(FacetParseElement.java:93)  
at  
org.elasticsearch.search.SearchService.parseSource(SearchService.java:545)  
... 10 more

--

---

<div class="post-metadata">

**Author:** ![Praveen\_Kariyanahall](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@Praveen\_Kariyanahall](https://discuss.elastic.co/u/Praveen_Kariyanahall)\
**Post date:** [September 18, 2012, 9:59pm UTC](https://discuss.elastic.co/t/elasticsearch-0-19-4--all-search-query-throws-an-exception/9058/2 "2012-09-18T21:59:04Z")

</div>

Clarification: I am happy with the result. It is just that the ES throws  
this exception and fills up my error log file/directory. I need a way to  
suppress this exception error being thrown (or ignored).

--

---

<div class="post-metadata">

**Author:** ![Praveen\_Kariyanahall](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@Praveen\_Kariyanahall](https://discuss.elastic.co/u/Praveen_Kariyanahall)\
**Post date:** [September 19, 2012, 2:10pm UTC](https://discuss.elastic.co/t/elasticsearch-0-19-4--all-search-query-throws-an-exception/9058/3 "2012-09-19T14:10:11Z")

</div>

Any Idea what I am doing wrong here ?

Thanks in Advance  
-pk

--

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:12am UTC](https://discuss.elastic.co/t/elasticsearch-0-19-4--all-search-query-throws-an-exception/9058/4 "2017-07-06T03:12:18Z")

</div>


