[GitHub] [lucene] gf2121 opened a new issue, #12028: Add newSetQuery for IntField, LongField, FloatField, DoubleField

2022-12-21 Thread GitBox
gf2121 opened a new issue, #12028: URL: https://github.com/apache/lucene/issues/12028 ### Description Today `TermInSetQuery` can be rewritten to disjunction BooleanQuery to lazily materialize query result if terms count < 16. This can significantly improve query performance in cases

[GitHub] [lucene] gf2121 commented on issue #12028: Add newSetQuery for IntField, LongField, FloatField, DoubleField

2022-12-21 Thread GitBox
gf2121 commented on issue #12028: URL: https://github.com/apache/lucene/issues/12028#issuecomment-1361021593 I benchmarked some queries like `_id = '1' AND cardinality_8_field in (1, 2, 3) ` on 1M docs, here is the result: ``` Benchmark Mode Cnt ScoreEr

[GitHub] [lucene] alessandrobenedetti opened a new pull request, #12029: KnnVectorQuery introduce getters/setters

2022-12-21 Thread GitBox
alessandrobenedetti opened a new pull request, #12029: URL: https://github.com/apache/lucene/pull/12029 ### Description Knn Queries are locked currently, it would be beneficial for applications using them to have access to getters and setters. An example is how filter queries are manag

[GitHub] [lucene] rmuir commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
rmuir commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1361503436 queries should be immutable, see Query.java documentation. Hence I don't think we should add getter/setters or remove final keywords. -- This is an automated message from the Apache Git

[GitHub] [lucene] alessandrobenedetti commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
alessandrobenedetti commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1361523810 Thanks @rmuir for the prompt answer, I took a look at Query.java, and couldn't find any particular reason for the Knn query to be immutable(aside from historical reasons?).

[GitHub] [lucene] rmuir commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
rmuir commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1361552026 All queries need to be immutable for the query cache to work correctly and consistently. You are right, the docs need help here. Unfortunately docs on immutability were attached to

[GitHub] [lucene] rmuir commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
rmuir commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1361577899 the `getTarget()` getters are unsafe as they return mutable things (`float[]`, `BytesRef`) -- This is an automated message from the Apache Git Service. To respond to the message, please

[GitHub] [lucene] alessandrobenedetti commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
alessandrobenedetti commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1361578619 Thanks, @rmuir for the explanation, it seems reasonable and definitely, I won't argue with that. For the sake of my needs, just the getters would be fine(and I'll clone the

[GitHub] [lucene] alessandrobenedetti commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
alessandrobenedetti commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1361606803 @rmuir you are right again, I gave it another try, using copies, this should be safe. If there are still concerns I may move to some Builder/Constructors approaches, to be

[GitHub] [lucene] epotyom commented on pull request #12025: Issue #11582 Update Faceting user guide

2022-12-21 Thread GitBox
epotyom commented on PR #12025: URL: https://github.com/apache/lucene/pull/12025#issuecomment-1361631708 > At the same time, for demo module we already have a method for compile-time safety of examples that doesn't rely upon this new `@snippet`. See IndexFiles/SearchFiles where we simply in

[GitHub] [lucene] twosom opened a new pull request, #12030: fix typo in BaseSynonymParserTestCase

2022-12-21 Thread GitBox
twosom opened a new pull request, #12030: URL: https://github.com/apache/lucene/pull/12030 ### Description -- 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 un

[GitHub] [lucene] rmuir merged pull request #12025: Issue #11582 Update Faceting user guide

2022-12-21 Thread GitBox
rmuir merged PR #12025: URL: https://github.com/apache/lucene/pull/12025 -- 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.apach

[GitHub] [lucene] rmuir commented on pull request #12025: Issue #11582 Update Faceting user guide

2022-12-21 Thread GitBox
rmuir commented on PR #12025: URL: https://github.com/apache/lucene/pull/12025#issuecomment-1361698706 Thank you @epotyom for this! I'll backport to 9.5. -- 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

[GitHub] [lucene] rmuir closed issue #11582: Update Faceting user guide [LUCENE-10546]

2022-12-21 Thread GitBox
rmuir closed issue #11582: Update Faceting user guide [LUCENE-10546] URL: https://github.com/apache/lucene/issues/11582 -- 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 unsub

[GitHub] [lucene] rmuir commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
rmuir commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1361726280 BytesRef.clone won't do what we want here. it is a shallow clone. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use t

[GitHub] [lucene] dsmiley commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
dsmiley commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1361753981 Completely agree with Robert -- Query subclasses ought to be immutable and the javadocs ought to be updated to scream this. Nasty/hard bugs happen when a Query is mutable. -- This is

[GitHub] [lucene] rmuir merged pull request #12030: fix typo in BaseSynonymParserTestCase

2022-12-21 Thread GitBox
rmuir merged PR #12030: URL: https://github.com/apache/lucene/pull/12030 -- 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.apach

[GitHub] [lucene] rmuir commented on pull request #12030: fix typo in BaseSynonymParserTestCase

2022-12-21 Thread GitBox
rmuir commented on PR #12030: URL: https://github.com/apache/lucene/pull/12030#issuecomment-1361838583 Thank you @twosom ! -- 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. T

[GitHub] [lucene] jpountz commented on pull request #12011: Tune the amount of memory that is allocated to sorting postings upon flushing.

2022-12-21 Thread GitBox
jpountz commented on PR #12011: URL: https://github.com/apache/lucene/pull/12011#issuecomment-1362512365 I plan on merging it soon if there are no objections. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL abo

[GitHub] [lucene] alessandrobenedetti commented on pull request #12029: introduce support in KnnVectorQuery for getters/setters

2022-12-21 Thread GitBox
alessandrobenedetti commented on PR #12029: URL: https://github.com/apache/lucene/pull/12029#issuecomment-1362512997 Thanks again @rmuir, moved to a deep copy! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL ab