ES get IndexMissingException when search not existed index

We are building search system like this:

  1. backend, use elasticsearch as search engine. Every day create a new
    index by using the date as index name, such as 20130801,20130802...
  2. frontend use web page, pepole can select the date range in calendar and
    search for the matched records.
    Here is a problem, frontend user don't know when ES start to index. He may
    just choose a date range from the web, such as 20130720 to 20130802.
    In backend, we will compose the REST request to search in all selected
    index: http://locahost:9200/20130720,20130721...20130802/...
    But ES just has index since 20130801, which means that the index
    20130720,20130721...don't exist. And this operation will get
    IndexMissingException result.

Is there a way to ignore IndexMissingException and just return the matched
records in existed index?
Or there is some other way to do the things?


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit