Open bastimm opened 1 year ago
Only the url parameters are restricted, do you have an example where this is not working?
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!!!
indices_boost
is part of the request body. So the array would be:
[
'index' => $myIndex,
'body' => [
'indices_boost' => $myBoost
]
]
🤔
Hello @bastimm,
I hope you're doing well. Could you please confirm if this issue has been resolved?
Thank you.
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