ES get IndexMissingException when search not existed index

Hi,
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?

Thanks.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,
fire http://localhost:9200/_aliases on your server, grep the index names
and modify the search request with given indexes.
cheers
Vadim

Am Mittwoch, 28. August 2013 16:37:03 UTC+2 schrieb liji...@gmail.com:

Hi,
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?

Thanks.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

http://localhost:9200/_aliases is to get all aliases, is there a way to get
the earilest index name? or can it be ordered by name?
Since I need to grep range date one by one in aliases

在 2013年8月28日星期三UTC+8下午10时43分16秒,Vadim Kisselmann写道:

Hi,
fire http://localhost:9200/_aliases on your server, grep the index names
and modify the search request with given indexes.
cheers
Vadim

Am Mittwoch, 28. August 2013 16:37:03 UTC+2 schrieb liji...@gmail.com:

Hi,
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?

Thanks.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Your index naming convention should make the index names easily sortable.
You can have more than one alias on an index, so you can also assign an
alias such as "oldest" to your oldest index and search for that alias.

--
Ivan

On Wed, Aug 28, 2013 at 8:07 AM, lijionly@gmail.com wrote:

http://localhost:9200/_aliases is to get all aliases, is there a way to
get the earilest index name? or can it be ordered by name?
Since I need to grep range date one by one in aliases

在 2013年8月28日星期三UTC+8下午10时43分16秒,Vadim Kisselmann写道:

Hi,
fire http://localhost:9200/_aliases on your server, grep the index names
and modify the search request with given indexes.
cheers
Vadim

Am Mittwoch, 28. August 2013 16:37:03 UTC+2 schrieb liji...@gmail.com:

Hi,
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/.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?

Thanks.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hello,

Below is an excerpt from the documentation [1]:

Since version 0.20, all multi indices API support the ignore_indicesoption.

Setting it to "missing" will cause indices that do not exists to be *
ignored* from the execution.

By default, when its not set, the request will fail.

When this option is set, it just ignores any missing index and does not
report or keep track of which ones are missing.

[1] Elasticsearch Platform — Find real-time answers at scale | Elastic

Author and Instructor for the Upcoming Book and Lecture Series
Massive Log Data Aggregation, Processing, Searching and Visualization with
Open Source Software

http://massivelogdata.com

On 28 August 2013 10:37, lijionly@gmail.com wrote:

Hi,
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?

Thanks.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thank you very much, but how could I use the ignore_indices? put it in
_settings? or use it in request uri?
I tried both but still get IndexMissingException

在 2013年8月29日星期四UTC+8上午12时27分02秒,Israel Ekpo写道:

Hello,

Below is an excerpt from the documentation [1]:

Since version 0.20, all multi indices API support the ignore_indicesoption.

Setting it to "missing" will cause indices that do not exists to be *
ignored* from the execution.

By default, when its not set, the request will fail.

When this option is set, it just ignores any missing index and does not
report or keep track of which ones are missing.

[1] Elasticsearch Platform — Find real-time answers at scale | Elastic

Author and Instructor for the Upcoming Book and Lecture Series
Massive Log Data Aggregation, Processing, Searching and Visualization
with Open Source Software

http://massivelogdata.com

On 28 August 2013 10:37, <liji...@gmail.com <javascript:>> wrote:

Hi,
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?

Thanks.

--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Never knew about that option was introduced since I do not use multiple
indices. Very simple.

According to the code, you set a url param of ignore_indices=missing
Or via Java:
searchRequest.ignoreIndices(IgnoreIndices.MISSING);

--
Ivan

On Wed, Aug 28, 2013 at 8:42 PM, lijionly@gmail.com wrote:

Thank you very much, but how could I use the ignore_indices? put it in
_settings? or use it in request uri?
I tried both but still get IndexMissingException

在 2013年8月29日星期四UTC+8上午12时27分02秒,Israel Ekpo写道:

Hello,

Below is an excerpt from the documentation [1]:

Since version 0.20, all multi indices API support the ignore_indicesoption.

Setting it to "missing" will cause indices that do not exists to be *
ignored* from the execution.

By default, when its not set, the request will fail.

When this option is set, it just ignores any missing index and does not
report or keep track of which ones are missing.

[1] Elasticsearch Platform — Find real-time answers at scale | Elastichttp://www.elasticsearch.org/guide/reference/api/

Author and Instructor for the Upcoming Book and Lecture Series
Massive Log Data Aggregation, Processing, Searching and Visualization
with Open Source Software

http://massivelogdata.com

On 28 August 2013 10:37, liji...@gmail.com wrote:

Hi,
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/.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?

Thanks.

--
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 elasticsearc...@**googlegroups.com.

For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.