We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider following document:
object UserDoc : Document() { override val dynamicTemplates : DynamicTemplates() { val ids by template( mapping = long(index = false).subFields(::IdSubFields), match = "*_id", ) val strings by template( mapping = Mapping( docValues = false, ), matchMappingType = MatchMappingType.STRING, ) } }
We want *_id fields to be mapped in document source class.
*_id
class UserDocSource : DocSource() { val ids by UserDoc.dynamicTemplates.ids val strings by UserDoc.dynamicTemplates.strings }
So then we could write:
val companyId: Long = user.ids["company_id"] val comment: String = user.strings["comment"]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider following document:
We want
*_id
fields to be mapped in document source class.So then we could write:
The text was updated successfully, but these errors were encountered: