can indexname be associated with two or more index types?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

can indexname be associated with two or more index types?

Sam-4
Hi

Can  we use same index name associated with two or more  index types?
For example my index name is "exceptionlist" and it will consist of
two different index type "customerExcetion" and
"adminDefaultException",
Can I use index name + index type as a key to store different data and
as well in the searching also.
Is it possible?


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: can indexname be associated with two or more index types?

Karussell
You create an index. You store data there. Data can be of multiple
type that you can define in a mapping or via API.

So, yes your requirements should be possible. you can e.g. select the
type directly in the URI of the REST api.

Peter.

On Feb 15, 7:51 am, sam <[hidden email]> wrote:

> Hi
>
> Can  we use same index name associated with two or more  index types?
> For example my index name is "exceptionlist" and it will consist of
> two different index type "customerExcetion" and
> "adminDefaultException",
> Can I use index name + index type as a key to store different data and
> as well in the searching also.
> Is it possible?
>
> Thanks
Reply | Threaded
Open this post in threaded view
|

Re: can indexname be associated with two or more index types?

Sam-4
Then it will also be possible that I can delete a particular type
associated with a index with out affecting the rest of the index type?
If yes then which java api can help me?

Thanks


On Feb 15, 2:09 pm, Karussell <[hidden email]> wrote:

> You create an index. You store data there. Data can be of multiple
> type that you can define in a mapping or via API.
>
> So, yes your requirements should be possible. you can e.g. select the
> type directly in the URI of the REST api.
>
> Peter.
>
> On Feb 15, 7:51 am, sam <[hidden email]> wrote:
>
>
>
>
>
>
>
> > Hi
>
> > Can  we use same index name associated with two or more  index types?
> > For example my index name is "exceptionlist" and it will consist of
> > two different index type "customerExcetion" and
> > "adminDefaultException",
> > Can I use index name + index type as a key to store different data and
> > as well in the searching also.
> > Is it possible?
>
> > Thanks
Reply | Threaded
Open this post in threaded view
|

Re: can indexname be associated with two or more index types?

Ivan Brusic
Most actions can be bounded by both index and type. Delete by Query is
no exception, and in fact, the example used demonstrates deleting all
documents belonging to a specific type:

http://www.elasticsearch.org/guide/reference/java-api/delete-by-query.html

--
Ivan

On Wed, Feb 15, 2012 at 3:31 AM, sam <[hidden email]> wrote:

> Then it will also be possible that I can delete a particular type
> associated with a index with out affecting the rest of the index type?
> If yes then which java api can help me?
>
> Thanks
>
>
> On Feb 15, 2:09 pm, Karussell <[hidden email]> wrote:
>> You create an index. You store data there. Data can be of multiple
>> type that you can define in a mapping or via API.
>>
>> So, yes your requirements should be possible. you can e.g. select the
>> type directly in the URI of the REST api.
>>
>> Peter.
>>
>> On Feb 15, 7:51 am, sam <[hidden email]> wrote:
>>
>>
>>
>>
>>
>>
>>
>> > Hi
>>
>> > Can  we use same index name associated with two or more  index types?
>> > For example my index name is "exceptionlist" and it will consist of
>> > two different index type "customerExcetion" and
>> > "adminDefaultException",
>> > Can I use index name + index type as a key to store different data and
>> > as well in the searching also.
>> > Is it possible?
>>
>> > Thanks