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

Initial implementation of filtering aliases. #936

Closed
wants to merge 1 commit into from

Conversation

imotov
Copy link
Contributor

@imotov imotov commented May 17, 2011

Shay, I took a shot at adding filters to aliases. I know that you were planning to do it at some point of time, but not sure if this is what you had in mind. If it's not, please let me know. Filtering aliases are implemented for most of the methods. A couple of methods where I wasn't sure what would be a proper behavior with regard to filters are Percolator and DeleteIndex. In the first case, it seems that filters shouldn't affect the behavior at all. In the second case, perhaps, it could be appropriate to throw an Exception if a DeleteIndex is called on an alias with a filter to prevent. Could you take a look?

@kimchy
Copy link
Member

kimchy commented May 17, 2011

Heya,

Yea, thats certainly planned. We should have chatted a bit before you started this endeavor :). The design I had in mind is different (and more optimized), let me explain:

In general, aliases should move to work in a similar manner to how mappings work. In the index metadata we store the alias information (which possibly has a filter associated with it), and, on the concrete index level (similar to MapperService, we will have AliasService), have the parsed representation already there.

Then, when operations occur, we also pass the aliases that are associated with it, and get the relevant parsed filters using the AliasService. This means we don't need to pass the full filter def on each call, and we don't need to parse it each time.

Also, similar to mappings, we should move the aliases from being defined using settings, to explicit data structures / configuration (while still maintaing backward comp., which is tricky).

think we should move in baby steps here. The first thing to apply is moving to unique data structures for aliases, the new configuration. Without thinking implementing filters. Once we have that nailed down, we can push this change. Then, the next step would be to add the filter to aliases and add the relevant logic.

Also, one thing that I thing the new aliases support should have is also custom routing value that will automatically be used.

We can chat more about it on IRC.

@imotov
Copy link
Contributor Author

imotov commented May 17, 2011

Thanks. That makes sense. This iteration was necessary for me to better understand the code and to get by while the real solution is created. I don't think I would have been able to have a meaningful conversation with you about this area of ES without taking a shot at it. :-) So, now that I have it working, let's do it the right way.

@imotov imotov closed this May 17, 2011
@kimchy
Copy link
Member

kimchy commented May 17, 2011

Great!

emilykmarx pushed a commit to emilykmarx/elasticsearch that referenced this pull request Dec 26, 2023
…lastic#938)

Clarifies role and status of transport protocol 
Bumps version to v10.5.1

Fixes: elastic#936
Co-Authored-By: João Duarte <jsvd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants