-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[backend] Fix strict_dynamic_mapping_exception exceptions thrown in fileIndexManager (#14665) #14655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fellowseb
merged 9 commits into
master
from
issue/89-strict-dynamic-mapping-exception-in-fileindexmanager
Mar 5, 2026
Merged
[backend] Fix strict_dynamic_mapping_exception exceptions thrown in fileIndexManager (#14665) #14655
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
be64d79
[backend] Fix strict_dynamic_mapping_exception exceptions thrown in f…
fellowseb 49e7a0f
[backend] Add custom opensearch image with ingest-attachment plugin i…
fellowseb 6cc984a
[backend] Update docker-compose.yml comment to use podman
fellowseb e4faeb9
[backend] Refactor to extract attachment props from engine.ts
fellowseb 761e288
[backend] Update retentionManager-test to take into account new file
fellowseb 4f0d7be
[backend] Update retentionManager-test to take into account new file …
fellowseb 7e2cdde
[backend] Update retentionManager-test to take into account new file …
fellowseb 43e01e6
[backend] Refactor to assertType utility
fellowseb 6498c22
[backend] Apply PRs suggestions after review
fellowseb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[backend] Refactor to extract attachment props from engine.ts
- Loading branch information
commit e4faeb9d68751166abda311c06c6e672b4028482
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
opencti-platform/opencti-graphql/src/database/attachment-processor-props.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import type { Mutable } from '../types/type-utils'; | ||
|
|
||
| // List of fields extracted by the attachment ingest processor. | ||
| // The full list is available in the Elasticsearch docs: | ||
| // (https://www.elastic.co/guide/en/elasticsearch/reference/8.19/attachment.html#attachment-fields). | ||
| export const ATTACHMENT_PROCESSOR_EXTRACTED_PROPS_ELASTICSEARCH = [ | ||
| 'content', | ||
| 'title', | ||
| 'author', | ||
| 'keywords', | ||
| 'date', | ||
| 'content_type', | ||
| 'content_length', | ||
| 'language', | ||
| 'modified', | ||
| 'format', | ||
| // identifier, NOT EXTRACTED | ||
| // contributor, NOT EXTRACTED | ||
| // coverage, NOT EXTRACTED | ||
| 'modifier', | ||
| 'creator_tool', | ||
| // publisher, NOT EXTRACTED | ||
| // relation, NOT EXTRACTED | ||
| // rights, NOT EXTRACTED | ||
| // source, NOT EXTRACTED | ||
| // type, NOT EXTRACTED | ||
| 'description', | ||
| 'print_date', | ||
| 'metadata_date', | ||
| // latitude, NOT EXTRACTED | ||
| // longitude, NOT EXTRACTED | ||
| // altitude, NOT EXTRACTED | ||
| // rating, NOT EXTRACTED | ||
| 'comments', | ||
| ] as const; | ||
|
|
||
| // List of fields extracted by the attachment ingest processor, for OpenSearch. | ||
| // The full list is available in the OS docs: | ||
| // (https://docs.opensearch.org/latest/install-and-configure/additional-plugins/ingest-attachment-plugin/#extracted-information), | ||
| // and code shows the check rejects unknown fields with an exception: | ||
| // https://github.com/opensearch-project/OpenSearch/blob/315481148edaa43410e2e9f1801ec903fd62ec20/plugins/ingest-attachment/src/main/java/org/opensearch/ingest/attachment/AttachmentProcessor.java#L277 | ||
| export const ATTACHMENT_PROCESSOR_EXTRACTED_PROPS_OPENSEARCH = [ | ||
| 'content', | ||
| 'title', | ||
| 'author', | ||
| 'keywords', | ||
| 'date', | ||
| 'content_type', | ||
| 'content_length', | ||
| 'language', | ||
| ] as const; | ||
|
|
||
| // Union type of all properties extracted by the ES or OS attachment processor | ||
| export type AttachmentProcessorExtractedProp = Mutable<typeof ATTACHMENT_PROCESSOR_EXTRACTED_PROPS_ELASTICSEARCH>[number] | ||
| | Mutable<typeof ATTACHMENT_PROCESSOR_EXTRACTED_PROPS_OPENSEARCH>[number]; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.