[Pluggable Dataformat] Adding support for FieldTypeCapabilities#21733
[Pluggable Dataformat] Adding support for FieldTypeCapabilities#21733darjisagar7 wants to merge 2 commits into
Conversation
Signed-off-by: Sagar Darji <darsaga@amazon.com>
PR Reviewer Guide 🔍(Review updated until commit 022ce52)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 022ce52
Previous suggestionsSuggestions up to commit 3bde29b
|
| * @param fieldFactoryRegistry the registry to use for field creation | ||
| */ | ||
| public LuceneDocumentInput(LuceneFieldFactoryRegistry fieldFactoryRegistry) { | ||
| public LuceneDocumentInput(DataFormat owningFormat, LuceneFieldFactoryRegistry fieldFactoryRegistry) { |
There was a problem hiding this comment.
We can hardcode to Lucene format here
| if (ownedCaps == null || ownedCaps.isEmpty()) { | ||
| // Another format owns this field — silently skip | ||
| return; | ||
| } |
| new FieldTypeCapabilities(IgnoredFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities(IdFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities(RoutingFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities(SourceFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities(SeqNoFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.COLUMNAR_STORAGE, | ||
| FieldTypeCapabilities.Capability.POINT_RANGE)), | ||
| new FieldTypeCapabilities(IndexFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.COLUMNAR_STORAGE, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities(NestedPathFieldMapper.NAME, Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities(VersionFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities(DocCountFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities("_feature", Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)), | ||
| new FieldTypeCapabilities(FieldNamesFieldMapper.CONTENT_TYPE, Set.of(FieldTypeCapabilities.Capability.STORED_FIELDS, | ||
| FieldTypeCapabilities.Capability.FULL_TEXT_SEARCH)) |
|
❌ Gradle check result for 3bde29b: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
|
||
| @Override | ||
| protected FieldTypeCapabilities.Capability searchCapability() { | ||
| return FieldTypeCapabilities.Capability.POINT_RANGE; |
|
|
||
| @Override | ||
| protected FieldTypeCapabilities.Capability searchCapability() { | ||
| return FieldTypeCapabilities.Capability.POINT_RANGE; |
There was a problem hiding this comment.
Can you add for PrimaryTermFieldType as well?
There was a problem hiding this comment.
Same POINT_RANGE right?
|
Persistent review updated to latest commit 022ce52 |
|
❌ Gradle check result for 022ce52: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Sagar Darji <darsaga@amazon.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 496920e.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
Description
[Describe what this change achieves]
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.