Exclude and include not working on script_score

Hi guys,

if query is something like that...

{
  "size": 30,
  "_source": {
    "includes": "source_sentence",
    "excludes": ["source_embedding", "target_embedding"]
  },
  "query": {
    "script_score": {
      "query": {
        "match_all": {}
      },
      "script": {
        "source": "cosineSimilarity(params.query_vector, 'source_embedding') + 1.0",
        "params": {
          "query_vector": [...]
        }
      }
    }
  }
}

the result is not what I want.
All the fields in "_source" are included! I think query syntax and symentic is right.

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