Skip to content

Commit

Permalink
fix assert
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrik-es committed Oct 18, 2024
1 parent ce436a7 commit 338d171
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ public void preParse(DocumentParserContext context) throws IOException {
final BytesReference adaptedSource = applyFilters(originalSource, contentType);

if (adaptedSource != null) {
assert context.indexSettings().getIndexVersionCreated().before(IndexVersions.V_8_7_0)
|| context.indexSettings().getMode() == null
|| context.indexSettings().getMode().isSyntheticSourceEnabled() == false;
final BytesRef ref = adaptedSource.toBytesRef();
context.doc().add(new StoredField(fieldType().name(), ref.bytes, ref.offset, ref.length));
}
Expand Down

0 comments on commit 338d171

Please sign in to comment.