Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow deletion of mapping/type if no documents are present #15160

Closed
rossbrower opened this issue Dec 1, 2015 · 3 comments
Closed

Allow deletion of mapping/type if no documents are present #15160

rossbrower opened this issue Dec 1, 2015 · 3 comments
Labels
:Search/Mapping Index mappings, including merging and defining field types :Search/Percolator Reverse search: find queries that match a document

Comments

@rossbrower
Copy link

I understand that deletion of a type is no longer allowed in 2.x. However, I have a scenario where it would be helpful. I have a dedicated index for percolators which contains mappings from the types which flow into daily indices. These types are not stored in the percolators index so there (presumably) is no way for them to leave corruption behind. If I change a type mapping and the percolator that corresponds to it I now have to delete the entire percolators index? This seems pretty undesirable. Why can't the corruption be avoided or why can't it simply allow the deletion if no documents are stored corresponding to the type being deleted? Either way this seems like a weird limitation and I would appreciate some guidance.

@clintongormley clintongormley added discuss :Search/Mapping Index mappings, including merging and defining field types :Search/Percolator Reverse search: find queries that match a document labels Dec 2, 2015
@clintongormley
Copy link

Interesting point. I wonder if a better way to solve this would be to have the percolator fetch the mapping from the source index, instead of storing it locally. Not sure if that's possible.

@rossbrower
Copy link
Author

That would certainly work for my purposes as writing the mapping twice is a bit redundant. If you are able to percolate a document that lives in a different index it would be more intuitive if the mappings were fetched/cached from the source index.

@martijnvg martijnvg removed the discuss label Dec 11, 2015
@martijnvg
Copy link
Member

The percolator queries are parsed based on that doc type mapping in the percolator index, so removing that mapping and would make the already added percolator queries invalid. So it is important that the doc type mapping can't be deleted or existing fields to be changed.

The only solution here would be to reindex the all the percolator queries. Once the reindex api is added this will be easier to manage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Mapping Index mappings, including merging and defining field types :Search/Percolator Reverse search: find queries that match a document
Projects
None yet
Development

No branches or pull requests

3 participants