Whats the best way to add mappings programmatically ?

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

Whats the best way to add mappings programmatically ?

mooky

I've been using elastic since about 2009 ... and I've always found myself embedding elastic into our app - and configuring it programmatically.
I've always found programmatically configuring the mapping for an index to be very clunky.

But perhaps I just havent paid close attention to the enhancements over the years and I am now Doing It Wrong.

So, what is the best/cleanest way to configure mappings programmatically?

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b2536cd4-fa9b-4a94-8d24-09bbb0f648af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Whats the best way to add mappings programmatically ?

Jason Wee
mapping is not something you add/change every second or hour? just curious, why would you want to do it programmatically?

the discussion have been moved to https://discuss.elastic.co/ , you might get more response there.

jason

On Tue, May 26, 2015 at 10:07 PM, mooky <[hidden email]> wrote:

I've been using elastic since about 2009 ... and I've always found myself embedding elastic into our app - and configuring it programmatically.
I've always found programmatically configuring the mapping for an index to be very clunky.

But perhaps I just havent paid close attention to the enhancements over the years and I am now Doing It Wrong.

So, what is the best/cleanest way to configure mappings programmatically?

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b2536cd4-fa9b-4a94-8d24-09bbb0f648af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHO4itw4%2Bi7XhWFHthff1rMOL1t144tBRjqyw6sf5LDtHhongg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Whats the best way to add mappings programmatically ?

mooky

I am primarily indexing structured data - so typically, there are many fields.
In my experience mapping changes quite a bit over time - as requirements evolve - or as you discover the mistakes you have made.
Your mapping necessarily refers to fields - as does your code. So, keeping those two in sync over time sucks.

(I have raised the same question here: https://discuss.elastic.co/t/whats-the-best-way-to-configure-mappings-programmatically/ )

-Nick




On Thursday, 28 May 2015 07:51:20 UTC+1, Jason Wee wrote:
mapping is not something you add/change every second or hour? just curious, why would you want to do it programmatically?

the discussion have been moved to <a href="https://discuss.elastic.co/" style="font-size:12.8000001907349px" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fdiscuss.elastic.co%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFguF42tUvBArAl-xFnDHHIi5v0cA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fdiscuss.elastic.co%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFguF42tUvBArAl-xFnDHHIi5v0cA';return true;">https://discuss.elastic.co/ , you might get more response there.

jason

On Tue, May 26, 2015 at 10:07 PM, mooky <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="MGwtwx8w75EJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">nick.mi...@...> wrote:

I've been using elastic since about 2009 ... and I've always found myself embedding elastic into our app - and configuring it programmatically.
I've always found programmatically configuring the mapping for an index to be very clunky.

But perhaps I just havent paid close attention to the enhancements over the years and I am now Doing It Wrong.

So, what is the best/cleanest way to configure mappings programmatically?

--
Please update your bookmarks! We have moved to <a href="https://discuss.elastic.co/" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fdiscuss.elastic.co%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFguF42tUvBArAl-xFnDHHIi5v0cA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fdiscuss.elastic.co%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNFguF42tUvBArAl-xFnDHHIi5v0cA';return true;">https://discuss.elastic.co/
---
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="MGwtwx8w75EJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/b2536cd4-fa9b-4a94-8d24-09bbb0f648af%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/b2536cd4-fa9b-4a94-8d24-09bbb0f648af%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/b2536cd4-fa9b-4a94-8d24-09bbb0f648af%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/b2536cd4-fa9b-4a94-8d24-09bbb0f648af%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/be69bcc2-c447-4e33-b2a8-01865e6f2b1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.