Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

support declarative mappings #29

Open
willkg opened this Issue May 19, 2012 · 3 comments

Comments

Projects
None yet
2 participants
Member

willkg commented May 19, 2012

elasticutils currently doesn't do much on the indexing side of things. There are a few possible answers on how to solve this that have been implemented and are lying around in the various elasticutils uses.

django-haystack has an approach that I like. In 2.0, they create a SearchIndex class that works much like Django models. This has two interesting effects:

  1. It allows us to nix the implicit relationship between Django models and the documents that are indexed.
  2. It allows us to more easily specify a mapping with defaults that are sane.

Rob is working on this right now in https://github.com/robhudson/elasticutils/tree/declarative-mapping . He's using pyes to do it because it's got a lot of the bits implemented already.

I think we should go through the django-haystack SearchIndex and figure out what bits we want for the elasticutils SearchIndex.

This bug is for continuing and finalizing that work.

@ghost ghost assigned robhudson May 19, 2012

Member

willkg commented Apr 24, 2013

Some thoughts:

  1. We have MappingType now! Yay! That covers a portion of this.
  2. In the Django code, we have Indexable. I think we probably want to move that code to the core minus get_indexable and whatever else uses Django ORM things.
  3. After we do that, I think we can implement the declarative mapping stuff in Indexable.
Member

robhudson commented Nov 9, 2013

Some work-in-progress on this branch. I hope to continue pushing this forward. If you'd like to comment on the commits I'd love the feedback:
https://github.com/robhudson/elasticutils/compare/declarative-mapping

@willkg willkg added this to the 0.10 milestone Mar 1, 2014

@willkg willkg removed this from the 0.10 milestone May 30, 2014

Member

willkg commented May 30, 2014

Bumping this along with the pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment