A few questions: Index per "tenant" sharing schemas, dates auto-detected?

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

A few questions: Index per "tenant" sharing schemas, dates auto-detected?

dobesv
I'd like to make a search system such that each "user" of the system
has their own set of indexes, but all the user share a common set of
schemas and field settings.

If I put something in /_all/tweet/_mapping will it affect all existing
and future automatically-created indexes such as /foo/tweet/ and /bar/
tweet/?

Or, do I have to configure the indexes each time a new user is added,
and then reconfigure all existing users when a schema is updated?

I notice that the docs say that types can be automatically detected
like numbers, strings.  The example (in
http://www.elasticsearch.com/docs/elasticsearch/rest_api/index/) also
includes a date, are those detected automatically as well?


Reply | Threaded
Open this post in threaded view
|

Re: A few questions: Index per "tenant" sharing schemas, dates auto-detected?

kimchy
Administrator
Hi, 

On Fri, Apr 2, 2010 at 3:49 AM, Dobes <[hidden email]> wrote:
I'd like to make a search system such that each "user" of the system
has their own set of indexes, but all the user share a common set of
schemas and field settings.


   There was actually a thread similar to this which resulted in this issue: http://github.com/elasticsearch/elasticsearch/issues/86. This means you can define mappings in advance, and they will automatically be applied to all indices created.
 

If I put something in /_all/tweet/_mapping will it affect all existing
and future automatically-created indexes such as /foo/tweet/ and /bar/
tweet/?

Thats another option that was discussed, there is an issue for this, and I plan to support this notion as well.
 

Or, do I have to configure the indexes each time a new user is added,
and then reconfigure all existing users when a schema is updated?

I notice that the docs say that types can be automatically detected
like numbers, strings.  The example (in
http://www.elasticsearch.com/docs/elasticsearch/rest_api/index/) also
includes a date, are those detected automatically as well?

Dates (strings) are automatically detected using the following logic: They much have either '-' or ':' in the string, and the date parser manages to parse them. If both happen, then they are treated as dates. Note, there was a problem with this in 0.5.1, and its fixed in master (upcoming 0.6.0).
 
-shay.banon

Reply | Threaded
Open this post in threaded view
|

Re: A few questions: Index per "tenant" sharing schemas, dates auto-detected?

dobesv
For the fix for issue #86, if I update the mapping file(s), would it
update the mappings for indexes that already exist?

And was that fix included in the last release?


On Apr 2, 2:42 am, Shay Banon <[hidden email]> wrote:

> Hi,
>
> On Fri, Apr 2, 2010 at 3:49 AM, Dobes <[hidden email]> wrote:
> > I'd like to make a search system such that each "user" of the system
> > has their own set of indexes, but all the user share a common set of
> > schemas and field settings.
>
>    There was actually a thread similar to this which resulted in this
> issue:http://github.com/elasticsearch/elasticsearch/issues/86. This means
> you can define mappings in advance, and they will automatically be applied
> to all indices created.
>
>
>
> > If I put something in /_all/tweet/_mapping will it affect all existing
> > and future automatically-created indexes such as /foo/tweet/ and /bar/
> > tweet/?
>
> Thats another option that was discussed, there is an issue for this, and I
> plan to support this notion as well.
>
>
>
> > Or, do I have to configure the indexes each time a new user is added,
> > and then reconfigure all existing users when a schema is updated?
>
> > I notice that the docs say that types can be automatically detected
> > like numbers, strings.  The example (in
> >http://www.elasticsearch.com/docs/elasticsearch/rest_api/index/) also
> > includes a date, are those detected automatically as well?
>
> Dates (strings) are automatically detected using the following logic: They
> much have either '-' or ':' in the string, and the date parser manages to
> parse them. If both happen, then they are treated as dates. Note, there was
> a problem with this in 0.5.1, and its fixed in master (upcoming 0.6.0).
>
> -shay.banon
Reply | Threaded
Open this post in threaded view
|

Re: A few questions: Index per "tenant" sharing schemas, dates auto-detected?

kimchy
Administrator
On Sat, Apr 3, 2010 at 7:11 AM, Dobes <[hidden email]> wrote:
For the fix for issue #86, if I update the mapping file(s), would it
update the mappings for indexes that already exist?

No, when you update the mappings, it will only be applied to new indices created.
 

And was that fix included in the last release?

Not in 0.5.1. It is in master and will be included in 0.6.0 which I hope to release in the coming days.
 


On Apr 2, 2:42 am, Shay Banon <[hidden email]> wrote:
> Hi,
>
> On Fri, Apr 2, 2010 at 3:49 AM, Dobes <[hidden email]> wrote:
> > I'd like to make a search system such that each "user" of the system
> > has their own set of indexes, but all the user share a common set of
> > schemas and field settings.
>
>    There was actually a thread similar to this which resulted in this
> issue:http://github.com/elasticsearch/elasticsearch/issues/86. This means
> you can define mappings in advance, and they will automatically be applied
> to all indices created.
>
>
>
> > If I put something in /_all/tweet/_mapping will it affect all existing
> > and future automatically-created indexes such as /foo/tweet/ and /bar/
> > tweet/?
>
> Thats another option that was discussed, there is an issue for this, and I
> plan to support this notion as well.
>
>
>
> > Or, do I have to configure the indexes each time a new user is added,
> > and then reconfigure all existing users when a schema is updated?
>
> > I notice that the docs say that types can be automatically detected
> > like numbers, strings.  The example (in
> >http://www.elasticsearch.com/docs/elasticsearch/rest_api/index/) also
> > includes a date, are those detected automatically as well?
>
> Dates (strings) are automatically detected using the following logic: They
> much have either '-' or ':' in the string, and the date parser manages to
> parse them. If both happen, then they are treated as dates. Note, there was
> a problem with this in 0.5.1, and its fixed in master (upcoming 0.6.0).
>
> -shay.banon