ChristopherRabotin / bungiesearch

UNMAINTAINED CODE -- Elasticsearch-dsl-py django wrapper with mapping generator
BSD 3-Clause "New" or "Revised" License
68 stars 20 forks source link

Support overriding index settings #150

Closed NullSoldier closed 3 years ago

NullSoldier commented 8 years ago

First... thanks to @jjhuang for putting up the ES 2.0 pull request! https://github.com/ChristopherRabotin/bungiesearch/pull/149

We need to merge in https://github.com/ChristopherRabotin/bungiesearch/pull/149 first but replication and sharing is now a per index option so we need a way to override it for when an index is created. Previously is was a more "global" setting. This expands the settings for each index to pave the way for overriding and specifying settings per index.

This breaks backwards compat and will require a major version change. I'm thinking that if we merge this in, and merge in ES 2.0 we can do a full major version change but I want to get feedback on this first.

TODO

ChristopherRabotin commented 8 years ago

I agree with the changes. One of the tests does not work though.

Concerning the test of the new settings, does ES 2.0 have an API to retrieve the settings? If so we could check that.

Let me create a milestone for the major release.

jjhuang commented 8 years ago

Yes, even pre 2.0 you should be able to call /INDEX_NAME/_settings to get the settings, so I imagine both the Elasticsearch python client and the elasticsearch_dsl libraries have ways of accessing it.

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html https://github.com/elastic/elasticsearch-py/blob/master/elasticsearch/client/indices.py#L109 https://github.com/elastic/elasticsearch-dsl-py/blob/master/elasticsearch_dsl/index.py#L10

NullSoldier commented 8 years ago

sorry im slacking hardcore, im about to get this cleaned up so we can merge it.

NullSoldier commented 8 years ago

This should be working now and I've made it safe to merge before the 2.0 merge. In fact... it has to merge in before the 2.0 merge now because of the dependency fixes.

It was downloading elasticsearch-dsl and elasticsearch 2.0 which were not right... we needed to force dependencies to be before 2.0. It won't matter because jjhuang's PR will upgrade the dependencies to 2.0 and acutally support it.

coveralls commented 8 years ago

Coverage Status

Changes Unknown when pulling ddc1791e3d4f1c38155f688df38413fb0df1ff15 on NullSoldier:index-override into \ on ChristopherRabotin:master**.

NullSoldier commented 8 years ago

Just to be clear, I'm not sure how to get this in. I realized it's too easy for bungiesearch to create an index without using these settings because if any index hits ES before rebuild_index is called then it won't use these settings since ES creates it lazily.

ChristopherRabotin commented 8 years ago

I am sorry I can't be of much help for the next two months or so. I'm traveling without access to a computer.

On Tue, May 10, 2016, 01:49 Jason Spafford notifications@github.com wrote:

Just to be clear, I'm not sure how to get this in. I realized it's too easy for bungiesearch to create an index without using these settings because if any index hits ES before rebuild_index is called then it won't use these settings since ES creates it lazily.

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/ChristopherRabotin/bungiesearch/pull/150#issuecomment-218072923

RobinRamael commented 7 years ago

Are there plans to merge this in the near future?

NullSoldier commented 7 years ago

The problem is that this isn't the right way to do it. because it misses some cases/