mozilla / elasticutils

[deprecated] A friendly chainable ElasticSearch interface for python
http://elasticutils.rtfd.org
BSD 3-Clause "New" or "Revised" License
243 stars 76 forks source link

django intergration questions. #245

Closed pcompassion closed 10 years ago

pcompassion commented 10 years ago
  1. inheritance Suppose you have abstract or multi-table django model inheritance. Is there a way to abstract out the common part (the base django model) into a base MappingType?
  2. equivalent of haystack's load_all() Is there a way to hit the database once to retrieve objects for a search result?
  3. related field When you create a mapping for a django model, and the model has a foreign key, can you return a dictionary for the foreign key in extract_document()?
willkg commented 10 years ago
  1. ElasticUtils doesn't currently have a way to infer a mapping type from a Django model, so I'm not sure why you're asking this question.
  2. There is no equivalent.
  3. ElasticUtils doesn't currently have a way to infer a mapping type from a Django model, so it doesn't do that automatically. You can call extract_document on the foreign key's model class to get the dictionary you want, though.
willkg commented 10 years ago

I think this was a support question and haven't heard back from @pcompassion, so I'm going to assume we're all set here.