Is it a good idea to add mapping of a doctype before saving it?
See original GitHub issueIs it a good idea to add mapping of a doctype before saving it? Because if it is I don’t see why we should be using .init() method before saving a Doctype object. In this case my suggestion is to add an automatic .init() before saving it in the DocType class like the following ideally in line 405 of elasticsearch_dsl/document.py
self.init(using=using, index=index)
@HonzaKral what do you think about it?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Elasticsearch Mapping Basics & Examples (After Create Index)
Two main alternatives to mapping types are recommended: 1) to index per document type, OR 2) to create a customer type field.
Read more >How to Define Efficient Mapping in Elasticsearch - Opster
The default is true. Static mapping: With static mapping, the mapping is defined before the document is indexed. All new fields are added...
Read more >Should create multiple document types or multiple indexes?
What I would do is to create several indices and one mapping/document type per index, then you'd simply group all indices belonging to...
Read more >Mapping | Elasticsearch Guide [8.5] | Elastic
Dynamic mapping allows you to experiment with and explore data when you're just getting started. Elasticsearch adds new fields automatically, just by indexing...
Read more >4 Quick Steps To Make An Image Map In HTML (With Code ...
Image maps are used hyperlink parts of an image to different destination. Add in a jQuery plugin and image maps render beautifully on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @WisdomPill, currently there is no direct support for index templates, but it shouldn’t be too hard (famous last words) and it makes perfect sense as the next addition.
In the meantime you can do it semi manually by taking the output of
Index.to_dict()
and storing it as a template by using theindices.put_template
method ofelasticsearch-py
For
IndexTemplate
implementation you can check fb830eb - any and all feedback is welcome!