Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-05-14 Thread via GitHub
jpountz merged PR #13319: URL: https://github.com/apache/lucene/pull/13319 -- 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.apa

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-05-02 Thread via GitHub
iamsanjay commented on PR #13319: URL: https://github.com/apache/lucene/pull/13319#issuecomment-2092337036 I also changed scorerSupplier in few classes to delegate it to scorerSupplier instead of scorer. -- This is an automated message from the Apache Git Service. To respond to the messa

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-05-02 Thread via GitHub
iamsanjay commented on PR #13319: URL: https://github.com/apache/lucene/pull/13319#issuecomment-2092322936 > In general yes, there may be a few exceptions though like `JustCompileSearch` where we want to keep these methods since it's about detecting API changes. Okay in that case, le

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-05-02 Thread via GitHub
jpountz commented on PR #13319: URL: https://github.com/apache/lucene/pull/13319#issuecomment-2091034684 > Instead of both get() and cost() throwing the exception, Can make scorerSupplier throw UnsupportedOperationException()? In general yes, there may be a few exceptions though like

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-05-02 Thread via GitHub
iamsanjay commented on code in PR #13319: URL: https://github.com/apache/lucene/pull/13319#discussion_r1587434132 ## lucene/queries/src/java/org/apache/lucene/queries/spans/SpanWeight.java: ## @@ -135,16 +135,6 @@ private Similarity.SimScorer buildSimWeight( public abstract S

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-05-02 Thread via GitHub
iamsanjay commented on PR #13319: URL: https://github.com/apache/lucene/pull/13319#issuecomment-2090140897 Instead of both get() and cost() throwing the exception, Can make scorerSupplier throw `UnsupportedOperationException()`? ``` @Override public ScorerSupplier scorerSupplie

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-05-02 Thread via GitHub
iamsanjay commented on code in PR #13319: URL: https://github.com/apache/lucene/pull/13319#discussion_r1587404169 ## lucene/core/src/java/org/apache/lucene/search/FilterWeight.java: ## @@ -58,11 +58,6 @@ public Explanation explain(LeafReaderContext context, int doc) throws IOEx

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-05-01 Thread via GitHub
iamsanjay commented on code in PR #13319: URL: https://github.com/apache/lucene/pull/13319#discussion_r1587080630 ## lucene/core/src/java/org/apache/lucene/document/BinaryRangeFieldRangeQuery.java: ## @@ -136,7 +136,18 @@ public float matchCost() { }

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-04-28 Thread via GitHub
jpountz commented on code in PR #13319: URL: https://github.com/apache/lucene/pull/13319#discussion_r1582371473 ## lucene/core/src/java/org/apache/lucene/document/BinaryRangeFieldRangeQuery.java: ## @@ -136,7 +136,18 @@ public float matchCost() { } };

Re: [PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-04-20 Thread via GitHub
iamsanjay commented on PR #13319: URL: https://github.com/apache/lucene/pull/13319#issuecomment-2067645897 scorerSupplier has to be null if scorer is null. Therefore scorer was initialized inside the scorerSupplier, instead of scorerSupplier.get method. And if scorer evaluates to null then

[PR] Make Weight#scorerSupplier abstract, Weight#scorer final [lucene]

2024-04-20 Thread via GitHub
iamsanjay opened a new pull request, #13319: URL: https://github.com/apache/lucene/pull/13319 ### Description #13180 This PR would declare the scoreSupplier method abstract and marked scorer final. The nature of the change itself is not complex, however the large numbe