Skip to content

Commit 11af731

Browse files
committed
fixed valueForDisplay
1 parent 2a4c2a6 commit 11af731

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

x-pack/plugin/logsdb/src/main/java/org/elasticsearch/xpack/logsdb/patternedtext/PatternedTextFieldType.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ public TermsEnum getTerms(IndexReader reader, String prefix, boolean caseInsensi
141141
return terms.intersect(automaton, searchBytes);
142142
}
143143

144+
@Override
145+
public Object valueForDisplay(Object value) {
146+
if (value instanceof BytesRef bytesRef) {
147+
return new BytesRef(bytesRef.utf8ToString());
148+
}
149+
return value;
150+
}
151+
144152
private IOFunction<LeafReaderContext, CheckedIntFunction<List<Object>, IOException>> getValueFetcherProvider(
145153
SearchExecutionContext searchExecutionContext
146154
) {

0 commit comments

Comments
 (0)