App Search: boost on multiple fields

Hi,

How can I boost on more than 1 field?
With this query:

{
  "query": "someterm",
    "boosts": {
    "url_path_dir1": [
      {
        "type": "value",
        "value": "subsite",
        "operation": "multiply",
        "factor": 10
      }
    ]
  }
}

So I want to boost on url_path_dir_1 and on another field (f.i. url_path_dir_2)as well.
How can I do that?

Best Regards,

Marten

Anyone?

Wouldn't you just add a new key to that object for url_path_dir_2?

{
  "query": "someterm",
  "boosts": {
    "url_path_dir1": [
      {
        "type": "value",
        "value": "subsite",
        "operation": "multiply",
        "factor": 10
      }
    ],
    "url_path_dir2": [
      {
        "type": "value",
        "value": "subsite",
        "operation": "multiply",
        "factor": 10
      }
    ]
  }
}

Wow, how stupid from me.
Totally fixated on an incorrect json :slightly_smiling_face:

Thanks Jason

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.