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

[FEATURE] Implement indices_boost for Multi-index-search #153

Open
bastimm opened this issue May 13, 2023 · 4 comments
Open

[FEATURE] Implement indices_boost for Multi-index-search #153

bastimm opened this issue May 13, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@bastimm
Copy link

bastimm commented May 13, 2023

Is your feature request related to a problem?

Yes, I need to search in multiple indices and want to boost one of them

What solution would you like?

Please implement this switch

What alternatives have you considered?

Do you have any additional context?

https://opensearch.org/docs/latest/api-reference/search/ => indices_boost

@bastimm bastimm added enhancement New feature or request untriaged labels May 13, 2023
@shyim
Copy link
Collaborator

shyim commented May 13, 2023

Only the url parameters are restricted, do you have an example where this is not working?

@bastimm
Copy link
Author

bastimm commented May 13, 2023

Hi,

a short excerpt of my PHP code, perhaps I made a mistake?

$this->ESQuery1 = [ 'index' => [ $this->config->getIndexName($this->language), ], 'from' => $this->paginationStart, 'size' => (int) $this->size, ]; if(true){ $this->ESQuery1['index'][] = $this->config->getIndexName($this->language).'_cmsnews'; } $this->ESQuery1['ignore_unavailable'] = true; $this->ESQuery1["indices_boost"] = [ $this->config->getIndexName($this->language) => 3, $this->config->getIndexName($this->language).'_cmsnews' => 2 ] ;

If I add "indices_boost" I got this result:
[message:protected] => "indices_boost" is not a valid parameter. Allowed parameters are "_source", "_source_excludes", "_source_includes", "allow_no_indices"

Thanks in advance!!!

@shyim
Copy link
Collaborator

shyim commented May 13, 2023

indices_boost is part of the request body. So the array would be:

[
  'index' => $myIndex,
  'body' => [
    'indices_boost' => $myBoost
  ]
]

🤔

@saimedhi
Copy link
Collaborator

Hello @bastimm,

I hope you're doing well. Could you please confirm if this issue has been resolved?

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants