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

indices_boost ignore aliasing #4756

Closed
fdejaeger opened this issue Jan 16, 2014 · 17 comments
Closed

indices_boost ignore aliasing #4756

fdejaeger opened this issue Jan 16, 2014 · 17 comments
Assignees
Labels
>bug :Search/Search Search-related issues that do not fall into other categories

Comments

@fdejaeger
Copy link

It looks that the top level boosting based on the indices (indices_boost) requires that we specify the exact index name. We cannot substitue an alias pointing to a given index. This is very inconvenient since it defeats the purpose of having aliases to hide internal organization of the indices.

@ajhalani
Copy link

ajhalani commented Apr 7, 2014

+1 ..

@exAspArk
Copy link

I have the same problem

@sschwell
Copy link

sschwell commented Feb 6, 2015

+1

@tdoman
Copy link

tdoman commented Aug 18, 2015

+1, has this been addressed yet? i must be able to use the alias.

@egorz-eng
Copy link

+1

@clintongormley clintongormley added the :Search/Search Search-related issues that do not fall into other categories label Oct 14, 2015
@dabit
Copy link

dabit commented Oct 21, 2015

Has this been addressed? Please don't tell me this has not been fixed. Just bumped into it in production.

@splittingfield
Copy link

+1 as we have just hit this surprising behavior in production as well.

@masaruh
Copy link
Contributor

masaruh commented Nov 12, 2015

Things to consider:

  • should wildcard expansion be supported as well? (probably yes)
  • what if an index belongs to more than one alias in indices_boost parameter? For example, "indices_boost": {"alias1": 3,"alias2": 2} and both aliases include index1. (sum boost? max? min?)

@thiagolocatelli
Copy link

It seems the option to add indices_boost with the java client is not available. Is this true? I am using spring-data-elasticsearch and I cant seem to find a way to add indices_boots to my query. Thank you.

@davibe
Copy link

davibe commented Jan 13, 2016

+1

@ramseydsilva
Copy link

I would like support for wildcard expansion as well.

👍

@LoooooKe
Copy link

+1

@aurimasniekis
Copy link

Any updates on these? @clintongormley ?

@bjorn-ali-goransson
Copy link

Calling all devs. @clintongormley @kimchy Is this for real?

@thehybridtechnician
Copy link

+1

@clintongormley
Copy link
Contributor

This change stalled because of the problem of figuring out what to do when an index is boosted more than once via an alias or wildcard. From #8811 (comment) :

@masaruh just reread this thread and i think the correct answer is here:

Make indices_boost take list of index name and boost pair. We may need to do this if we want to have full control. But I somewhat hesitate to do this because it's breaking change.

Then the logic would be that we use the boost from the first time we see the index in the list, so eg:

[  
  { "foo" : 2 },  # alias foo points to bar & baz
  { "bar": 1.5 }, # this boost is ignored because we've already seen bar
  { "*": 1.2 }      # bar and baz are ignored because already seen, but index xyz gets this boost
]

This could be implemented in a bwc way. In fact, the old syntax doesn't need to be removed. We could just add this new syntax as an expert way of controlling boosts.

What do you think?

@masaruh
Copy link
Contributor

masaruh commented Nov 7, 2016

Ooh, true. that should work! Thanks @clintongormley.
I'll see what I can do.

masaruh added a commit to masaruh/elasticsearch that referenced this issue Dec 11, 2016
This change allows specifying alias/wildcard expression in indices_boost.
And added another format for specifying indices_boost. It accepts array of index name and boost pair.
If an index is included in multiple aliases/wildcard expressions, the first match will be used.
With new format, old format is marked as deprecated.

Closes elastic#4756
masaruh added a commit that referenced this issue Dec 16, 2016
This change allows specifying alias/wildcard expression in indices_boost.
And added another format for specifying indices_boost. It accepts array of index name and boost pair.
If an index is included in multiple aliases/wildcard expressions, the first match will be used.
With new format, old format is marked as deprecated.

Closes #4756
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

Successfully merging a pull request may close this issue.