dungba88 commented on issue #13699: URL: https://github.com/apache/lucene/issues/13699#issuecomment-2319630418
I think system property might be prohibitive for configurability. This parameter is a query-time control, but system property inherently enforce a single value for the whole application (and has to be determined at the start). Some use cases that I can see during tuning are: - Users start a Lucene service, maybe a HTTP wrapper. Then they would want to run multiple queries, and see how the results look like with different value of greediness. If the cost of starting up the service is high, then reusing a single JVM instance would be ideal. - Users might want to tune the value with the actual production settings, or even production instances. In this case, it would only be possible if the value is tunable through a query parameter (that is used to create the AbstractKnnVectorQuery). - Different set of queries may need different value of greediness. For example, for tail queries, which have small lexical match-set, we may want to get more recall here; for head queries, which already had large lexical match-set, we may want to tune for better latency. With that being said, I agree that having too many parameters would also be bad for API brevity. What if we allow configuring this parameter with a separate method after the `AbstractKnnVectorQuery` is created? And if there are multiple parameters such as in case of `AbstractVectorSimilarityQuery`, we group them in a single struct-like object (such as TunableParameters; but of course we should try to reduce them as many as possible). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org