Re: [PR] Made the UnifiedHighlighter's hasUnrecognizedQuery function processes FunctionQuery the same way as MatchAllDocsQuery and MatchNoDocsQuery queries for performance reasons. [lucene]

2024-03-23 Thread via GitHub
github-actions[bot] commented on PR #13165: URL: https://github.com/apache/lucene/pull/13165#issuecomment-2016641610 This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the d...@lucene.apache.org list. Thank you for your contributi

Re: [PR] Reduce some unnecessary ArrayUtil#grow calls [lucene]

2024-03-23 Thread via GitHub
github-actions[bot] commented on PR #13171: URL: https://github.com/apache/lucene/pull/13171#issuecomment-2016641599 This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the d...@lucene.apache.org list. Thank you for your contributi

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2016638471 I would still like to see some benchmark before merging this. Adding the enum for the MADV constants can be a followup. -- This is an automated message from the Apache Git Service.

Re: [PR] Convert IOContext, MergeInfo, and FlushInfo to record classes [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13205: URL: https://github.com/apache/lucene/pull/13205#issuecomment-2016637454 > thanks for fixing the missing-doclet to deal with records! This was a requirement, because building Javadocs failed without that fix. It is really nice that the code throws an

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
rmuir commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2016627004 I agree, wasn't trying to hold up the change, was just thinking out loud! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub a

Re: [PR] Add timeout support to AbstractKnnVectorQuery [lucene]

2024-03-23 Thread via GitHub
kaivalnp commented on PR #13202: URL: https://github.com/apache/lucene/pull/13202#issuecomment-2016595864 Exactly! This issue is also visible from the above benchmarks, where the `baseline` (having no early termination in `#rewrite`) performs the entire graph search (same number of nodes vi

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
ChrisHegarty commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2016589340 > At a later stage we can ... > > I can do this later. OK? This seems quite reasonable to me. Native access should be as close to a wrapper around the native functions

Re: [PR] Add timeout support to AbstractKnnVectorQuery [lucene]

2024-03-23 Thread via GitHub
vigyasharma commented on PR #13202: URL: https://github.com/apache/lucene/pull/13202#issuecomment-2016566261 > If we had set a timeout, and HNSW searches turned out too expensive -- we would not return results even after the search completes (because the timeout is [checked before attemptin

[PR] Subtract deleted file size from the cache size of NRTCachingDirectory. [lucene]

2024-03-23 Thread via GitHub
jfboeuf opened a new pull request, #13206: URL: https://github.com/apache/lucene/pull/13206 The size of deleted files is not subtracted from the cache size of NRTCachingDirectory. As a consequence, the cache eventually appears to be full preventing new files from being cached despite there

Re: [PR] Convert IOContext, MergeInfo, and FlushInfo to record classes [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13205: URL: https://github.com/apache/lucene/pull/13205#issuecomment-2016498420 I also converted the MergeInfo and FlushInfo classes to records. Very clean now. -- This is an automated message from the Apache Git Service. To respond to the message, please log o

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2016496447 Let's meet in the center: - I will add a public enum `PosixMFAdvise` to store package with enum constants named as the POSIX_MADV / POSIX_FADV constants (they are same, just differ

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
rmuir commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2016483109 > We need an abstraction anyways, because not all platforms have same constants. Things can have the same names at least. -- This is an automated message from the Apache Git Servi

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2016481753 > It's not the fault of the PR, but it's almost impossible for me to follow what-happens-when thru the iocontext. Maybe we can overhaul it in trunk... I don't think we should add our

Re: [PR] Convert IOContext to record class [lucene]

2024-03-23 Thread via GitHub
uschindler commented on code in PR #13205: URL: https://github.com/apache/lucene/pull/13205#discussion_r1536624588 ## lucene/core/src/java/org/apache/lucene/store/IOContext.java: ## @@ -111,42 +94,6 @@ private IOContext(Context context, MergeInfo mergeInfo) { * @param readOn

Re: [PR] Convert IOContext to record class [lucene]

2024-03-23 Thread via GitHub
uschindler commented on code in PR #13205: URL: https://github.com/apache/lucene/pull/13205#discussion_r1536623095 ## lucene/core/src/java/org/apache/lucene/store/IOContext.java: ## @@ -111,42 +94,6 @@ private IOContext(Context context, MergeInfo mergeInfo) { * @param readOn

Re: [PR] Convert IOContext to record class [lucene]

2024-03-23 Thread via GitHub
uschindler commented on code in PR #13205: URL: https://github.com/apache/lucene/pull/13205#discussion_r1536622909 ## lucene/core/src/java/org/apache/lucene/store/IOContext.java: ## @@ -111,42 +94,6 @@ private IOContext(Context context, MergeInfo mergeInfo) { * @param readOn

Re: [PR] Convert IOContext to record class [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13205: URL: https://github.com/apache/lucene/pull/13205#issuecomment-2016469572 I had to fix the missing-doclet javadoc parser to understand records. The easy fix was to treat them as "classes". -- This is an automated message from the Apache Git Service. To re

Re: [PR] Convert IOContext to record class [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13205: URL: https://github.com/apache/lucene/pull/13205#issuecomment-2016465439 We should possibly convert other classes to records, too (like FlushInfo or MergeInfo if they are immutable). -- This is an automated message from the Apache Git Service. To respond

Re: [PR] Convert IOContext to record class [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13205: URL: https://github.com/apache/lucene/pull/13205#issuecomment-2016465326 I needed to change some consumers to call the getter methods instead of accessing fields (which are now hidden). -- This is an automated message from the Apache Git Service. To resp

[PR] Convert IOContext to record class [lucene]

2024-03-23 Thread via GitHub
uschindler opened a new pull request, #13205: URL: https://github.com/apache/lucene/pull/13205 Followup to #13204: This converts IOContext to a record class. This has several positive effects: - equals, hashCode and toString are autogenerated by an invokedynamic, so we can't forget to ha

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
rmuir commented on PR #13196: URL: https://github.com/apache/lucene/pull/13196#issuecomment-2016455406 It's not the fault of the PR, but it's almost impossible for me to follow what-happens-when thru the iocontext. Maybe we can overhaul it in trunk... I don't think we should add our own lay

Re: [PR] Fix equals/hashcode of IOContext [lucene]

2024-03-23 Thread via GitHub
uschindler merged PR #13204: URL: https://github.com/apache/lucene/pull/13204 -- 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.

Re: [PR] Fix equals/hashcode of IOContext [lucene]

2024-03-23 Thread via GitHub
uschindler commented on PR #13204: URL: https://github.com/apache/lucene/pull/13204#issuecomment-2016450251 Will open a PR directly after this was merged. The change to "record" kills almost half of the code. I just have to restore the missing ctors. -- This is an automated message from t

Re: [PR] Fix equals/hashcode of IOContext [lucene]

2024-03-23 Thread via GitHub
ChrisHegarty commented on PR #13204: URL: https://github.com/apache/lucene/pull/13204#issuecomment-2016449070 Looks like a good candidate for a record class alright, but that can come separate to the bug fix. -- This is an automated message from the Apache Git Service. To respond to the m

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
uschindler commented on code in PR #13196: URL: https://github.com/apache/lucene/pull/13196#discussion_r1536612333 ## lucene/core/src/java/org/apache/lucene/store/IOContext.java: ## @@ -124,6 +142,7 @@ public int hashCode() { result = prime * result + ((flushInfo == null) ?

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
uschindler commented on code in PR #13196: URL: https://github.com/apache/lucene/pull/13196#discussion_r1536612274 ## lucene/core/src/java/org/apache/lucene/store/IOContext.java: ## @@ -124,6 +142,7 @@ public int hashCode() { result = prime * result + ((flushInfo == null) ?

[PR] This fixes equals/hashcode of IOContext [lucene]

2024-03-23 Thread via GitHub
uschindler opened a new pull request, #13204: URL: https://github.com/apache/lucene/pull/13204 It also modernizes it. Actualy this class should be changed to be "record", then equals/hashCode is autogenerated and more performant by using invokedynamic. This was found by @rmuir in #13

Re: [PR] DRAFT: Add support for posix_madvise to Java 21 MMapDirectory [lucene]

2024-03-23 Thread via GitHub
uschindler commented on code in PR #13196: URL: https://github.com/apache/lucene/pull/13196#discussion_r1536595324 ## lucene/core/src/java/org/apache/lucene/store/IOContext.java: ## @@ -124,6 +142,7 @@ public int hashCode() { result = prime * result + ((flushInfo == null) ?