How to perform searching in same index name with different indices?


(Sam-4) #1

Hi All

I'm using elastic search-0.16.2 java lib and using Rabbitmq River to
create index from json documents.i have created index person and with
two different indices(personal_details,location).i want know how i'm
able to search data in same index with different indices.
please help me?

Thanks


(Shay Banon) #2

Not sure I understand the question. How can there be one index and two
indices? Maybe you are mixing between an index and a type?

On Wed, Jul 20, 2011 at 3:46 PM, sam mishra.sameek@gmail.com wrote:

Hi All

I'm using elastic search-0.16.2 java lib and using Rabbitmq River to
create index from json documents.i have created index person and with
two different indices(personal_details,location).i want know how i'm
able to search data in same index with different indices.
please help me?

Thanks


(Sam-4) #3

yes my mistake,I have confusion on indices and type.can we create same
index with different type and perform searching on different type.if
it is possible then how i 'm able to search data using java?

On Jul 20, 9:48 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Not sure I understand the question. How can there be one index and two
indices? Maybe you are mixing between an index and a type?

On Wed, Jul 20, 2011 at 3:46 PM, sam mishra.sam...@gmail.com wrote:

Hi All

I'm using elastic search-0.16.2 java lib and using Rabbitmq River to
create index from json documents.i have created index person and with
two different indices(personal_details,location).i want know how i'm
able to search data in same index with different indices.
please help me?

Thanks


(Shay Banon) #4

You can set the types you want to search on on the
SearchRequestBuilder#setTypes

On Thu, Jul 21, 2011 at 8:23 AM, sam mishra.sameek@gmail.com wrote:

yes my mistake,I have confusion on indices and type.can we create same
index with different type and perform searching on different type.if
it is possible then how i 'm able to search data using java?

On Jul 20, 9:48 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Not sure I understand the question. How can there be one index and two
indices? Maybe you are mixing between an index and a type?

On Wed, Jul 20, 2011 at 3:46 PM, sam mishra.sam...@gmail.com wrote:

Hi All

I'm using elastic search-0.16.2 java lib and using Rabbitmq River to
create index from json documents.i have created index person and with
two different indices(personal_details,location).i want know how i'm
able to search data in same index with different indices.
please help me?

Thanks


(system) #5