Skip to content

fixes highlightQuery in the highlight dsl - #134

Merged
jillesvangurp merged 1 commit into
jillesvangurp:masterfrom
AnyRoad:fix_highlight_query
May 8, 2024
Merged

jillesvangurp merged 1 commit into
jillesvangurp:masterfrom
AnyRoad:fix_highlight_query

Conversation

@AnyRoad

@AnyRoad AnyRoad commented May 4, 2024

Copy link
Copy Markdown
Contributor

Without esQueryProperty dsl does not call wrapWithName() automatically and query is not applied correctly.

Also, esQueryProperty does not apply field naming policy and for other one-word fields it does not change anything but for highlightQuery we have to apply it as highlight_query

Without esQueryProperty dsl does not call wrapWithName()
automatically and query is not applied correctly.

Also, esQueryProperty does not apply field naming policy and
for other one-word fields it does not change anything but for
highlightQuery we have to apply it as highlight_query
return object : ReadWriteProperty<Any, ESQuery> {
override fun getValue(thisRef: Any, property: KProperty<*>): ESQuery {
val map = this@esQueryProperty[property.name] as Map<String, JsonDsl>
val propertyName = property.name.convertPropertyName(defaultNamingConvention)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can also add customPropertyName parameter, same as the one in the property(customPropertyName: String, defaultValue: T?) method.

@jillesvangurp
jillesvangurp merged commit c95bcf6 into jillesvangurp:master May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants