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

setNumTargetHits sets hits but not targetHits - is this a bug? #32739

Open
drei34 opened this issue Nov 1, 2024 · 1 comment
Open

setNumTargetHits sets hits but not targetHits - is this a bug? #32739

drei34 opened this issue Nov 1, 2024 · 1 comment
Assignees

Comments

@drei34
Copy link

drei34 commented Nov 1, 2024

Hi,

My understanding is this method on a query is supposed to change targetHits but it seems to change hits. Is this intended? In java code, what is the proper way to change targetHits. targetHits affects Vespa multinode retrieval (not ranking), am I correct?

Thank you!

I found this but it does not seem right: https://stackoverflow.com/questions/67700811/dynamic-targethits-in-vespa-yql

Code is here for this method: https://javadoc.io/doc/com.yahoo.vespa/container-search/latest/com/yahoo/prelude/query/NearestNeighborItem.html

@hmusum
Copy link
Member

hmusum commented Nov 2, 2024

How do you come to the conclusion changing targetHits changes hits? It doesn't. But maybe you are seeing something that looks like that is the case? If so, please provide some queries, responses (and query profile if you use that).

The doc for this is https://docs.vespa.ai/en/reference/query-language-reference.html#targethits. The answers in https://stackoverflow.com/questions/67700811/dynamic-targethits-in-vespa-yql also describes in detail how targetHits works. Setting this in Java code is done as described in the last answer in that thread

@hmusum hmusum self-assigned this Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants