Add source fallback support for match_only_text mapped type (#89473)

This change adds access to mapped match_only_text fields via the Painless scripting fields API. The 
values returned from a match_only_text field via the scripting fields API always use source as described 
by (#81246). These are not available via doc values so there are no bwc issues.
This commit is contained in:
Jack Conradson 2022-08-22 07:32:25 -07:00 committed by GitHub
parent b15f6dd6d0
commit 58fafe224f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 170 additions and 1 deletions

View file

@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
package org.elasticsearch.script.field;
import org.elasticsearch.index.fielddata.SortedBinaryDocValues;
public class MatchOnlyTextDocValuesField extends BaseKeywordDocValuesField {
public MatchOnlyTextDocValuesField(SortedBinaryDocValues input, String name) {
super(input, name);
}
}