use of org.opensearch.script.TermsSetQueryScript in project OpenSearch by opensearch-project.
the class ExpressionTermsSetQueryTests method testFieldAccessWithFieldAlias.
public void testFieldAccessWithFieldAlias() throws IOException {
TermsSetQueryScript script = compile("doc['alias'].value").newInstance(null);
script.setDocument(1);
double result = script.execute().doubleValue();
assertEquals(2.718, result, 0.0);
}
use of org.opensearch.script.TermsSetQueryScript in project OpenSearch by opensearch-project.
the class ExpressionTermsSetQueryTests method testFieldAccess.
public void testFieldAccess() throws IOException {
TermsSetQueryScript script = compile("doc['field'].value").newInstance(null);
script.setDocument(1);
double result = script.execute().doubleValue();
assertEquals(2.718, result, 0.0);
}
Aggregations