anchor.diff:          "match_all": {}
         },
         "script": {
  -        "source": "dotProduct(params.queryVector, doc['my_dense_vector'])",
  +        "source": """
  +          double value = dotProduct(params.query_vector, doc['my_vector']);
  +          return sigmoid(1, Math.E, -value); <1>
  +        """,
           "params": {
  -          "queryVector": [4, 3.4, -0.2]
  +          "query_vector": [4, 3.4, -0.2]
           }
         }
       }
  
positive.code:         "match_all": {}
        },
        "script": {
          "source": "cosineSimilaritySparse(params.queryVector, doc['my_sparse_vector'])",
          "params": {
            "queryVector": {"2": 0.5, "10" : 111.3, "50": -1.3, "113": 14.8, "4545": 156.0}
          }
        }
      }
  
negative.code: }
  --------------------------------------------------
  // NOTCONSOLE
  <1> The script adds 1.0 to the cosine similarity to prevent the score from being negative.
  <2> To take advantage of the script optimizations, provide a query vector as a script parameter.
  
  Similarly, for sparse_vector fields, `cosineSimilaritySparse` calculates cosine similarity
  between a given query vector and document vectors.
  