-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support custom analysers, add es.create_models
To support custom analysers, it seems best to abandon model.create_all in favour of an index-wide method (es.create_models) that sets all mappings (and custom analysis settings) at once. Code is largely transplanted from hypothesis/h#1825 Details: Custom analysers(&filters&tokenisers) are shared in Elasticsearch among all document types (models). To update a model's mappings one needs to make sure the custom analysers are defined first, but updating those just for one model is inelegant; The index would have to be closed for each update, and one cannot check for duplicate definitions of analysers as it is not visible which model defined a particular analyser. Treating index-wide settings as per-model settings creates leaky abstractions.
- Loading branch information
Showing
4 changed files
with
93 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters