[GitHub] [lucene] dweiss commented on a diff in pull request #11998: Migrate away from per-segment-per-threadlocals on SegmentReader

2022-12-10 Thread GitBox
dweiss commented on code in PR #11998: URL: https://github.com/apache/lucene/pull/11998#discussion_r1045027949 ## lucene/test-framework/src/java/org/apache/lucene/tests/index/AssertingLeafReader.java: ## @@ -113,34 +116,84 @@ public Fields getTermVectors(int docID) throws IOExc

[GitHub] [lucene] rmuir commented on a diff in pull request #11998: Migrate away from per-segment-per-threadlocals on SegmentReader

2022-12-10 Thread GitBox
rmuir commented on code in PR #11998: URL: https://github.com/apache/lucene/pull/11998#discussion_r1045078398 ## lucene/test-framework/src/java/org/apache/lucene/tests/index/AssertingLeafReader.java: ## @@ -113,34 +116,84 @@ public Fields getTermVectors(int docID) throws IOExce

[GitHub] [lucene] jpountz commented on a diff in pull request #12003: Some minor code cleanup in IndexSortSortedNumericDocValuesRangeQuery

2022-12-10 Thread GitBox
jpountz commented on code in PR #12003: URL: https://github.com/apache/lucene/pull/12003#discussion_r1045084049 ## lucene/sandbox/src/java/org/apache/lucene/sandbox/search/IndexSortSortedNumericDocValuesRangeQuery.java: ## @@ -212,9 +212,9 @@ public boolean isCacheable(LeafReade

[GitHub] [lucene] jpountz commented on a diff in pull request #11998: Migrate away from per-segment-per-threadlocals on SegmentReader

2022-12-10 Thread GitBox
jpountz commented on code in PR #11998: URL: https://github.com/apache/lucene/pull/11998#discussion_r1045086896 ## lucene/test-framework/src/java/org/apache/lucene/tests/index/AssertingLeafReader.java: ## @@ -113,34 +116,84 @@ public Fields getTermVectors(int docID) throws IOEx

[GitHub] [lucene] jpountz opened a new issue, #12005: Should we fail retrieving doc values on the wrong type?

2022-12-10 Thread GitBox
jpountz opened a new issue, #12005: URL: https://github.com/apache/lucene/issues/12005 ### Description Lucene currently treats the different doc-value types as if they were independent features and `LeafReader#getXXXDocValues()` returns `null` in case of mismatch, e.g. retrieving bin

[GitHub] [lucene] jpountz commented on a diff in pull request #12004: Move byte vector queries into new KnnByteVectorQuery

2022-12-10 Thread GitBox
jpountz commented on code in PR #12004: URL: https://github.com/apache/lucene/pull/12004#discussion_r1045087956 ## lucene/core/src/java/org/apache/lucene/search/KnnByteVectorQuery.java: ## @@ -0,0 +1,124 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or mo

[GitHub] [lucene] jpountz commented on pull request #11997: Add IntField, LongField, FloatField and DoubleField

2022-12-10 Thread GitBox
jpountz commented on PR #11997: URL: https://github.com/apache/lucene/pull/11997#issuecomment-1345272269 > What if we always set the docvalue type to SORTED_NUMERIC, even if the user is just storing single values? Lucene will optimize the storage if all docs are single-valued, and it's alre

[GitHub] [lucene] gf2121 opened a new pull request, #12006: Do int compare instead of ArrayUtil#compareUnsigned4 in LatlonPointQueries

2022-12-10 Thread GitBox
gf2121 opened a new pull request, #12006: URL: https://github.com/apache/lucene/pull/12006 In LatLonPointQueries we encode query ints to bytes, and compare bytes by decode bytes back to int in `ArrayUtil#compareUnsigned4`. We can directly compare ints instead. -- This is an automated mes

[GitHub] [lucene] rmuir commented on pull request #12006: Do int compare instead of ArrayUtil#compareUnsigned4 in LatlonPointQueries

2022-12-10 Thread GitBox
rmuir commented on PR #12006: URL: https://github.com/apache/lucene/pull/12006#issuecomment-1345293418 @gf2121 does this execute faster? I think originally the reason `byte[]` was compared, was that it avoided having to "decode" values with `NumericUtils.sortableBytesToInt`. But, may

[GitHub] [lucene] gf2121 commented on pull request #12006: Do int compare instead of ArrayUtil#compareUnsigned4 in LatlonPointQueries

2022-12-10 Thread GitBox
gf2121 commented on PR #12006: URL: https://github.com/apache/lucene/pull/12006#issuecomment-1345297296 Thanks @rmuir for feedback! This is the current implementation of `ArrayUtil#compareUnsigned4`: ``` public static int compareUnsigned4(byte[] a, int aOffset, byte[] b, int bOffs

[GitHub] [lucene] gsmiller commented on a diff in pull request #12003: Some minor code cleanup in IndexSortSortedNumericDocValuesRangeQuery

2022-12-10 Thread GitBox
gsmiller commented on code in PR #12003: URL: https://github.com/apache/lucene/pull/12003#discussion_r1045104269 ## lucene/sandbox/src/java/org/apache/lucene/sandbox/search/IndexSortSortedNumericDocValuesRangeQuery.java: ## @@ -212,9 +212,9 @@ public boolean isCacheable(LeafRead

[GitHub] [lucene] gf2121 commented on pull request #12006: Do int compare instead of ArrayUtil#compareUnsigned4 in LatlonPointQueries

2022-12-10 Thread GitBox
gf2121 commented on PR #12006: URL: https://github.com/apache/lucene/pull/12006#issuecomment-1345303453 Here is the JMH result: ``` Benchmark Mode Cnt Score Error Units ReadInts24Benchmark.compareUnsigned4 thrpt 10 0.224 ± 0.003

[GitHub] [lucene] rmuir commented on pull request #12006: Do int compare instead of ArrayUtil#compareUnsigned4 in LatlonPointQueries

2022-12-10 Thread GitBox
rmuir commented on PR #12006: URL: https://github.com/apache/lucene/pull/12006#issuecomment-1345341579 makes sense to me, as numericutils is basically just varhandle fetch with an xor. thanks for testing. -- This is an automated message from the Apache Git Service. To respond to the messa

[GitHub] [lucene] gsmiller commented on a diff in pull request #11901: Github#11869: Add RangeOnRangeFacetCounts

2022-12-10 Thread GitBox
gsmiller commented on code in PR #11901: URL: https://github.com/apache/lucene/pull/11901#discussion_r1045109686 ## lucene/facet/src/java/org/apache/lucene/facet/rangeonrange/RangeOnRangeFacetCounts.java: ## @@ -0,0 +1,209 @@ +/* + * Licensed to the Apache Software Foundation (A

[GitHub] [lucene] gf2121 merged pull request #12006: Do int compare instead of ArrayUtil#compareUnsigned4 in LatlonPointQueries

2022-12-10 Thread GitBox
gf2121 merged PR #12006: URL: https://github.com/apache/lucene/pull/12006 -- 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.apac

[GitHub] [lucene] gf2121 opened a new pull request, #12007: Do int compare instead of ArrayUtil#compareUnsigned4 in LatlonPointQueries (Backport 9x)

2022-12-10 Thread GitBox
gf2121 opened a new pull request, #12007: URL: https://github.com/apache/lucene/pull/12007 Backport of https://github.com/apache/lucene/pull/12006 -- 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

[GitHub] [lucene] gf2121 merged pull request #12007: Do int compare instead of ArrayUtil#compareUnsigned4 in LatlonPointQueries (Backport 9x)

2022-12-10 Thread GitBox
gf2121 merged PR #12007: URL: https://github.com/apache/lucene/pull/12007 -- 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.apac

[GitHub] [lucene] gsmiller opened a new pull request, #12008: Remove unnecessary NaN checks from LongRange#verifyAndEncode

2022-12-10 Thread GitBox
gsmiller opened a new pull request, #12008: URL: https://github.com/apache/lucene/pull/12008 ### Description Minor tweak to logic that appears to have been copy/pasted from `DoubleRange`. -- This is an automated message from the Apache Git Service. To respond to the message, please

[GitHub] [lucene] gsmiller merged pull request #12003: Some minor code cleanup in IndexSortSortedNumericDocValuesRangeQuery

2022-12-10 Thread GitBox
gsmiller merged PR #12003: URL: https://github.com/apache/lucene/pull/12003 -- 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.ap

[GitHub] [lucene] rmuir commented on pull request #12008: Remove unnecessary NaN checks from LongRange#verifyAndEncode

2022-12-10 Thread GitBox
rmuir commented on PR #12008: URL: https://github.com/apache/lucene/pull/12008#issuecomment-1345382186 I think we should open a followup issue to look into this check. I enabled the check (without your patch) to make sure it finds this bug, and it did, and it also finds other stuff: [lo

[GitHub] [lucene] gsmiller commented on pull request #12003: Some minor code cleanup in IndexSortSortedNumericDocValuesRangeQuery

2022-12-10 Thread GitBox
gsmiller commented on PR #12003: URL: https://github.com/apache/lucene/pull/12003#issuecomment-1345428478 Thanks @jpountz. Merged/backported. -- 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 s

[GitHub] [lucene] rmuir commented on issue #12005: Should we fail retrieving doc values on the wrong type?

2022-12-10 Thread GitBox
rmuir commented on issue #12005: URL: https://github.com/apache/lucene/issues/12005#issuecomment-1345435529 Don't we have the `DocValues` class already for this? If you are writing an algorithm on string docvalues, you just call `DocValues.getSortedSet`. * If the user indexed it a