Skip to content
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

Define the script in the @ScriptedField annotation #2035

Closed
AntonLGVS opened this issue Dec 19, 2021 · 2 comments · Fixed by #2663
Closed

Define the script in the @ScriptedField annotation #2035

AntonLGVS opened this issue Dec 19, 2021 · 2 comments · Fixed by #2663
Labels
type: enhancement A general enhancement

Comments

@AntonLGVS
Copy link
Contributor

How about integration of the @ScriptedField annotation and the ScriptedField/RuntimeField inside query factories?
For example:

@ScriptedField(script = "doc['other'].value + 'text'")
private String field;

From my opinion, it is better to use the RuntimeField instead of the ScriptedField because it is part of the ElasticSearch library.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 19, 2021
@sothawo
Copy link
Collaborator

sothawo commented Dec 20, 2021

runtime fields and scripted fields are different things. In Spring Data Elasticsearch scripted fields are currently only available via the NativeSearchQuery, this is something that we should change in the future, after the client switch. We then should introduce a ScriptedField in a Spring Data Elasticsearch package, not using an Elasticsearch class and only when building the concrete query, use this.

But not before we have changed or at least added the internal client implementation to the new Elasticsearch Client, which is what I am currently working on.

@AntonLGVS
Copy link
Contributor Author

Yes, many issue depend on the new ES client. Most issue can be blocked. Is there anything I can do to help you with your the new client?

@sothawo sothawo added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 19, 2022
sothawo added a commit to sothawo/spring-data-elasticsearch that referenced this issue Aug 11, 2023
sothawo added a commit that referenced this issue Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants