Skip to content

Add support for "_source": false in Query when searching #3009

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

Closed
matus753 opened this issue Nov 21, 2024 · 0 comments · Fixed by #3014
Closed

Add support for "_source": false in Query when searching #3009

matus753 opened this issue Nov 21, 2024 · 0 comments · Fixed by #3014
Assignees
Labels
type: enhancement A general enhancement

Comments

@matus753
Copy link

My goal is to get all ids of records from Elastic using ReactiveElasticsearchTemplate.search filtered by NativeQuery. For that, I do not need to fetch source of the records.

I am not able to set that right now, I can only work around this by using:
.withSourceFilter(new FetchSourceFilterBuilder().withExcludes("*").build())
but that only generate SourceConfig with type Filter to exclude everything

I was wondering if it would be possible to add option for NativeQuery to set fetchSource(false)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 21, 2024
@sothawo sothawo added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 24, 2024
@sothawo sothawo self-assigned this Nov 27, 2024
sothawo added a commit to sothawo/spring-data-elasticsearch that referenced this issue Nov 28, 2024
@sothawo sothawo added this to the 5.5 M1 (2025.0.0) milestone Nov 28, 2024
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