anchor.diff:          "match_all": {}
         },
         "script": {
  -        "source": "dotProductSparse(params.queryVector, doc['my_sparse_vector'])",
  -        "params": {
  -          "queryVector": {"2": 0.5, "10" : 111.3, "50": -1.3, "113": 14.8, "4545": 156.0}
  +        "source": """
  +          double value = dotProductSparse(params.query_vector, doc['my_sparse_vector']);
  +          return sigmoid(1, Math.E, -value);
  +        """,
  +         "params": {
  +          "query_vector": {"2": 0.5, "10" : 111.3, "50": -1.3, "113": 14.8, "4545": 156.0}
           }
         }
       }
  
positive.code: }
  --------------------------------------------------
  // NOTCONSOLE
  <1> 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.
  
negative.code: // CONSOLE
  // TEST[setup:twitter]
  
  NOTE: The values returned from `script_score` cannot be negative. In general,
  Lucene requires the scores produced by queries to be non-negative in order to
  support certain search optimizations.
  
  ==== Accessing the score of a document within a script
  
  Within a script, you can
  