-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Semantic_text multi-field/copy_to compatibility POC #105080
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
Changes from all commits
bbb379c
2d7793b
fb4d271
c240ea1
4825836
f8d5f07
61c1a82
24b5cd0
1c89d8d
619d1bc
4fbc383
9b8a457
aafd0cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,14 +8,28 @@ | |
|
|
||
| package org.elasticsearch.index.mapper; | ||
|
|
||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * Field type that uses an inference model. | ||
| */ | ||
| public interface InferenceModelFieldType { | ||
| // TODO: Are there any scenarios where extending SimpleMappedFieldType becomes an issue? | ||
| public abstract class InferenceModelFieldType extends SimpleMappedFieldType { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I changed This change is not strictly required, but IMO makes for a cleaner implementation overall. Does anyone see any issues with extending
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given that we were already basically doing this in |
||
| public InferenceModelFieldType( | ||
| String name, | ||
| boolean isIndexed, | ||
| boolean isStored, | ||
| boolean hasDocValues, | ||
| TextSearchInfo textSearchInfo, | ||
| Map<String, String> meta | ||
| ) { | ||
| super(name, isIndexed, isStored, hasDocValues, textSearchInfo, meta); | ||
| } | ||
|
|
||
| /** | ||
| * Retrieve inference model used by the field type. | ||
| * | ||
| * @return model id used by the field type | ||
| */ | ||
| String getInferenceModel(); | ||
| public abstract String getInferenceModel(); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we capture this as a specific record with:
Having a
<Map<String, Map<String, List<String>>>is a bit confusing to me.No need to change it now, just a thought for accommodating changes to the structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely,
<Map<String, Map<String, List<String>>>is super confusing. It's more of a placeholder for now, I didn't want to put too much work into optimizing the data type knowing that it could change a lot based on the semantic query work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😵 Made it a little hard to read, but I think this makes sense 👍