Re: [PR] Make `static final Map` constants immutable [lucene]

2024-02-14 Thread via GitHub


uschindler commented on PR #13092:
URL: https://github.com/apache/lucene/pull/13092#issuecomment-1943350917

   Hi this won't go into 9.10 because the branch is already cut and the release 
started. Please move the entry to 9.11.
   
   I don't think we will have a 9.11 release anymore, as we want to go for 
10.0, so I am not sure if it is worth to backport the changes.


-- 
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



Re: [PR] Make `static final Map` constants immutable [lucene]

2024-02-14 Thread via GitHub


dweiss commented on PR #13092:
URL: https://github.com/apache/lucene/pull/13092#issuecomment-1943480107

   If the backport has been done already, I think it's good to merge it in. I'm 
sure something will pop up to warrant 9.11...


-- 
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



Re: [PR] Make `static final Map` constants immutable [lucene]

2024-02-14 Thread via GitHub


dweiss commented on PR #13092:
URL: https://github.com/apache/lucene/pull/13092#issuecomment-1943481155

   I'll move the changes entry, my bad.


-- 
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



Re: [PR] Backport: Make `static final Map` constants immutable [lucene]

2024-02-14 Thread via GitHub


dweiss commented on PR #13100:
URL: https://github.com/apache/lucene/pull/13100#issuecomment-1943484848

   The changes.txt entry should be consistent with what's on main (same 
section).


-- 
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



Re: [PR] Fix too many open files Exception for some tests [lucene]

2024-02-14 Thread via GitHub


mikemccand commented on PR #13035:
URL: https://github.com/apache/lucene/pull/13035#issuecomment-1943499386

   This change looks great, and it looks like @rmuir's concern was addressed.  
Thank you for focusing on test reliability @easyice!  I'll merge this 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 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



Re: [PR] Backport: Make `static final Map` constants immutable [lucene]

2024-02-14 Thread via GitHub


dweiss merged PR #13100:
URL: https://github.com/apache/lucene/pull/13100


-- 
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



[PR] Fix test failure in #13057 [lucene]

2024-02-14 Thread via GitHub


benwtrent opened a new pull request, #13102:
URL: https://github.com/apache/lucene/pull/13102

   The original tests assume particular document orders & scores. To make the 
test more resilient to random flushes & merges, I adjusted the assertion 
conditions. Particularly, we verify matching ids -> score instead of relying on 
docIds.


-- 
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



[I] UnifiedHighlighter incorrectly returns field 'X' was indexed without offsets [lucene]

2024-02-14 Thread via GitHub


mayya-sharipova opened a new issue, #13103:
URL: https://github.com/apache/lucene/issues/13103

   ### Description
   
   UnifiedHighlighter based on matches incorrectly returns field 'X' was 
indexed without offsets, cannot highlight
   
   Test to reproduce:
   ```java
static final FieldType textType = new FieldType(TextField.TYPE_STORED);
   static {
   textType.setStoreTermVectors(true);
   textType.setStoreTermVectorPositions(true);
   textType.setStoreTermVectorOffsets(true);
   textType.freeze();
   }
   
   public void testHighlgiht() {
   String indexPath = "../lucene-test-indices/index1";
   Path path = Paths.get(indexPath);
   try {
   Directory directory = NIOFSDirectory.open(path);
   Analyzer analyzer = new ClassicAnalyzer();
   IndexWriterConfig config = new IndexWriterConfig(analyzer);
   
   try (IndexWriter writer = new IndexWriter(directory, config)) {
   addDoc(writer, "The quick brown fox jumps over the lazy 
dog");
   }
   
   try (IndexReader reader = DirectoryReader.open(directory)) {
   IndexSearcher searcher = new IndexSearcher(reader);
   Query query = new IntervalQuery("content",
   Intervals.analyzedText("quick brown fox jumps over 
the lazy dog", analyzer, "content", 0, true));
   TopDocs topDocs = searcher.search(query, 10);
   
   UnifiedHighlighter.Builder uhBuilder = new 
UnifiedHighlighter.Builder(searcher, analyzer)
   .withWeightMatches(true);
   UnifiedHighlighter highlighter = new 
UnifiedHighlighter(uhBuilder);
   
   String[] highlights = highlighter.highlight("content", 
query, topDocs, 1);
   System.out.println(Arrays.toString(highlights));
   }
   } catch (IOException e) {
   e.printStackTrace();
   }
   }
   
  private static void addDoc(IndexWriter writer, String content) throws 
IOException {
   Document doc = new Document();
   doc.add(new Field("content", content, textType));
   writer.addDocument(doc);
   }
   ```
   
   produces an error:
   ```
   java.lang.IllegalArgumentException: field 'content' was indexed without 
offsets, cannot highlight
   
at 
org.apache.lucene.search.uhighlight.FieldHighlighter.highlightOffsetsEnums(FieldHighlighter.java:157)
at 
org.apache.lucene.search.uhighlight.FieldHighlighter.highlightFieldForDoc(FieldHighlighter.java:83)
at 
org.apache.lucene.search.uhighlight.UnifiedHighlighter.highlightFieldsAsObjects(UnifiedHighlighter.java:944)
at 
org.apache.lucene.search.uhighlight.UnifiedHighlighter.highlightFields(UnifiedHighlighter.java:814)
at 
org.apache.lucene.search.uhighlight.UnifiedHighlighter.highlightFields(UnifiedHighlighter.java:792)
at 
org.apache.lucene.search.uhighlight.UnifiedHighlighter.highlight(UnifiedHighlighter.java:725)
   ```
   
   A workaround to disable highlighting based on matches:
   
   ```java
UnifiedHighlighter.Builder uhBuilder = new 
UnifiedHighlighter.Builder(searcher, analyzer)
   .withWeightMatches(false);
   ```
   
   
   This happens because of `ClassicAnalyzer` that removes stop words, and 
because of it usage of `ExtendedIntervalsSource` that returns -1 offsets.
   
   ### Version and environment details
   
   Lucene v 9.9.1


-- 
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.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



Re: [PR] Fix too many open files Exception for some tests [lucene]

2024-02-14 Thread via GitHub


easyice commented on PR #13035:
URL: https://github.com/apache/lucene/pull/13035#issuecomment-1944279470

   @rmuir @mikemccand Thank you for reviewing!


-- 
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



[PR] Fix NPE for TestRandomChains.testRandomChainsWithLargeStrings [lucene]

2024-02-14 Thread via GitHub


easyice opened a new pull request, #13104:
URL: https://github.com/apache/lucene/pull/13104

   Related to LUCENE-10353
   ```
   ./gradlew test --tests TestRandomChains.testRandomChainsWithLargeStrings 
-Dtests.seed=1B915D6C476F9BFE -Dtests.nightly=true -Dtests.locale=mn 
-Dtests.timezone=Canada/Mountain -Dtests.asserts=true 
-Dtests.file.encoding=UTF-8
   ```
   
   
   ```
   org.apache.lucene.analysis.tests.TestRandomChains > 
testRandomChainsWithLargeStrings FAILED
   java.lang.NullPointerException: Cannot invoke "String.equals(Object)" 
because the return value of 
"org.apache.lucene.analysis.tokenattributes.TypeAttribute.type()" is null
   at 
__randomizedtesting.SeedInfo.seed([1B915D6C476F9BFE:71CAE27D1E21BB0D]:0)
   at 
org.apache.lucene.analysis.common@10.0.0-SNAPSHOT/org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter.incrementToken(NumericPayloadTokenFilter.java:49)
   at 
org.apache.lucene.analysis.common@10.0.0-SNAPSHOT/org.apache.lucene.analysis.miscellaneous.ConditionalTokenFilter.incrementToken(ConditionalTokenFilter.java:185)
   at 
org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.analysis.ValidatingTokenFilter.incrementToken(ValidatingTokenFilter.java:81)
   at 
org.apache.lucene.analysis.common@10.0.0-SNAPSHOT/org.apache.lucene.analysis.miscellaneous.ConditionalTokenFilter$OneTimeWrapper.incrementToken(ConditionalTokenFilter.java:65)
   at 
org.apache.lucene.analysis.icu@10.0.0-SNAPSHOT/org.apache.lucene.analysis.icu.ICUNormalizer2Filter.incrementToken(ICUNormalizer2Filter.java:80)
   at 
org.apache.lucene.analysis.common@10.0.0-SNAPSHOT/org.apache.lucene.analysis.miscellaneous.ConditionalTokenFilter.incrementToken(ConditionalTokenFilter.java:203)
   at 
org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.analysis.ValidatingTokenFilter.incrementToken(ValidatingTokenFilter.java:81)
   at 
org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.analysis.BaseTokenStreamTestCase.checkResetException(BaseTokenStreamTestCase.java:926)
   at 
org.apache.lucene.test_framework@10.0.0-SNAPSHOT/org.apache.lucene.tests.analysis.BaseTokenStreamTestCase.checkRandomData(BaseTokenStreamTestCase.java:1068)
   at 
org.apache.lucene.analysis.tests@10.0.0-SNAPSHOT/org.apache.lucene.analysis.tests.TestRandomChains.testRandomChainsWithLargeStrings(TestRandomChains.java:978)
   at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   ```


-- 
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



[I] (Byte|Float)KnnVectorFieldSource unusable if segment has no vector values [lucene]

2024-02-14 Thread via GitHub


hossman opened a new issue, #13105:
URL: https://github.com/apache/lucene/issues/13105

   ### Description
   
   Like most field types in lucene, `Knn(Byte|Float)VectorField` classes do not 
require a field value for every document -- they support use cases where some 
documents are indexed w/o a field value.
   
   The `(Byte|Float)KnnVectorFieldSource` implementations _generally_ follow 
the pattern of most field based `ValueSource` impls in terms of how they behave 
when some documents do not have a value in the specified field 
(`TestKnnVectorSimilarityFunctions` even checks for this in various tests using 
the `knnFloatField3` and `knnByteField3` fields which only exist in one 
document).  
   
   **_But_** these value sources break if/when a user gets unlucky and a 
segment exists where _none_ of the documents have value in the vector field 
(and by extension: when querying an empty index)
   
   This is due to the following check...
   
   ```
final ByteVectorValues vectorValues = 
readerContext.reader().getByteVectorValues(fieldName);
   
if (vectorValues == null) {
  throw new IllegalArgumentException(
  "no byte vector value is indexed for field '" + fieldName + "'");
   ...
   ```
   
   This problem is trivial to reproduce reliably by adding an `iw.commit();` 
call to `TestKnnVectorSimilarityFunctions` between indexing the two documents.
 
   (The `RandomIndexWriter` should eventually trigger it in this test even w/o 
modifications .. not sure if it ever has in jenkins?)
   
   
   
   The appropriate way to implement this type of check is to follow the pattern 
in the `DocValues.getFoo()` methods, that use a `checkField(...)` method to 
inspect the `FieldInfos` from the `LeafReader` for consistency w/expectations 
if `reader.getFooDocValues()` returns null.  `checkField(...)` assumes 
everything is fine if no `FieldInfo` exist for this field in this reader -- 
using an "empty" impl in it's place.
   
   
   
   I'm attaching a patch that fixes these `ValueSource` classes, by returning a 
`VectorFieldFunction` that wraps `DocIdSetIterator.empty()` when `vectorValues` 
is null, as long as a new `VectorEncoding` method `checkField(reader, 
fieldName)` does not throw an exception (Adding `checkField` directly to 
`VectorEncoding` seemed like the most straightforward place to put this ... not 
sure if there is a more appropriate class?) 
   
   I also made the new `checkField` method throw `IllegalStateException` 
instead of `IllegalArgumentException` to be consistent with other "is the index 
field type consistent with the type of query you are trying to do?" checks in 
the code base (like `DocValues.checkField(...)` and updated 
`TestKnnVectorSimilarityFunctions` accordingly.
   
   Patch: 
[VectorFieldSource.fix-missing-check.patch.txt](https://github.com/apache/lucene/files/14284577/VectorFieldSource.fix-missing-check.patch.txt)
   
   
   ### Version and environment details
   
   _No response_


-- 
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.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



Re: [PR] Fix NPE for TestRandomChains.testRandomChainsWithLargeStrings [lucene]

2024-02-14 Thread via GitHub


rmuir commented on PR #13104:
URL: https://github.com/apache/lucene/pull/13104#issuecomment-1944453765

   good catch! should we move this check to `setTokenType()`? Since it is a 
`public` method, it seems like a better place to add the check?


-- 
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



Re: [PR] Cleanup TokenizedPhraseQueryNode code [lucene]

2024-02-14 Thread via GitHub


stefanvodita commented on code in PR #13041:
URL: https://github.com/apache/lucene/pull/13041#discussion_r1489984421


##
lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/TokenizedPhraseQueryNode.java:
##
@@ -70,10 +70,8 @@ public QueryNode cloneTree() throws 
CloneNotSupportedException {
   @Override
   public CharSequence getField() {
 List children = getChildren();
-
-if (children == null || children.size() == 0) {
+if (children == null || children.isEmpty()) {
   return null;
-
 } else {
   return ((FieldableNode) children.get(0)).getField();

Review Comment:
   I think having the two methods aligned, the way they are in your latest 
commit, makes sense.



-- 
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



Re: [PR] Cleanup TokenizedPhraseQueryNode code [lucene]

2024-02-14 Thread via GitHub


stefanvodita commented on code in PR #13041:
URL: https://github.com/apache/lucene/pull/13041#discussion_r1489985337


##
lucene/CHANGES.txt:
##
@@ -258,6 +258,8 @@ Improvements
   Tests are running with random byte order to ensure that the order does not 
affect correctness
   of code. Native order was enabled for LZ4 compression.  (Uwe Schindler)
 
+* GITHUB#13041: TokenizedPhraseQueryNode code cleanup (Dmitry Cherniachenko)

Review Comment:
   This would have to move up to version 9.11 because 9.10 is already in the 
release process.



-- 
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



Re: [PR] Remove redundant field initializers [lucene]

2024-02-14 Thread via GitHub


stefanvodita commented on code in PR #13060:
URL: https://github.com/apache/lucene/pull/13060#discussion_r1490019625


##
lucene/analysis/phonetic/src/java/org/apache/lucene/analysis/phonetic/DaitchMokotoffSoundexFilter.java:
##
@@ -32,10 +32,10 @@
  */
 public final class DaitchMokotoffSoundexFilter extends TokenFilter {
   /** true if encoded tokens should be added as synonyms */
-  protected boolean inject = true;
+  final boolean inject;

Review Comment:
   Since this class is marked with `@lucene.experimental`, we can make the 
change.



##
lucene/analysis/phonetic/src/java/org/apache/lucene/analysis/phonetic/PhoneticFilter.java:
##
@@ -32,13 +32,13 @@
  */
 public final class PhoneticFilter extends TokenFilter {
   /** true if encoded tokens should be added as synonyms */
-  protected boolean inject = true;
+  final boolean inject;

Review Comment:
   It's a strange case. We're not really breaking backwards compatibility, 
since no one could have accessed this field anyway with the class being final.



-- 
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



Re: [PR] Fix addBackcompatIndexes.py to properly generate missing versions [lucene]

2024-02-14 Thread via GitHub


s1monw commented on PR #13095:
URL: https://github.com/apache/lucene/pull/13095#issuecomment-1944559092

   > P.S.: I don't know if we still need those 4 special case indexes. They 
seem to be a relic from earlier times. As we only check that the indexes throw 
an Exception on loading, the already existing 5.x and 4.x indexes are enough.
   
   true, I will merge this one and open a new pr to remove these


-- 
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



Re: [PR] Fix addBackcompatIndexes.py to properly generate missing versions [lucene]

2024-02-14 Thread via GitHub


s1monw merged PR #13095:
URL: https://github.com/apache/lucene/pull/13095


-- 
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



Re: [PR] Fix addBackcompatIndexes.py to properly generate missing versions [lucene]

2024-02-14 Thread via GitHub


uschindler commented on PR #13095:
URL: https://github.com/apache/lucene/pull/13095#issuecomment-1944578996

   This was merged to 9.x only. Should we not have it in main, too?


-- 
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



Re: [I] Python backward compat scripts need updating [lucene]

2024-02-14 Thread via GitHub


s1monw closed issue #13094: Python backward compat scripts need updating
URL: https://github.com/apache/lucene/issues/13094


-- 
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



Re: [PR] Fix NPE for TestRandomChains.testRandomChainsWithLargeStrings [lucene]

2024-02-14 Thread via GitHub


uschindler commented on PR #13104:
URL: https://github.com/apache/lucene/pull/13104#issuecomment-1944583551

   I wonder why the token stream has a setter at all. The field should be 
final. 
   
   I thought we want to have those settings all final and only set on 
construction.


-- 
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



Re: [PR] Fix addBackcompatIndexes.py to properly generate missing versions [lucene]

2024-02-14 Thread via GitHub


s1monw commented on PR #13095:
URL: https://github.com/apache/lucene/pull/13095#issuecomment-1944584231

   @uschindler dude I need to press buttons it took me 14 mins to port I guess 
that's ok?


-- 
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



Re: [PR] Fix addBackcompatIndexes.py to properly generate missing versions [lucene]

2024-02-14 Thread via GitHub


uschindler commented on PR #13095:
URL: https://github.com/apache/lucene/pull/13095#issuecomment-1944599169

   Sorry, I was just irritated, because the original PR was opened against 
stable branch. 😜


-- 
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



Re: [I] No static method version() crash in android project [lucene]

2024-02-14 Thread via GitHub


uschindler commented on issue #13078:
URL: https://github.com/apache/lucene/issues/13078#issuecomment-1944674586

   Android is not a supported platform. The official `java.lang.Runtime` class 
has a static `version()` method. So your setup does not follow the Java 
specification and we won't change this.
   
   Reference: 
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runtime.html#version()
   
   Please report this to the Dalvik runtime.


-- 
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



Re: [I] No static method version() crash in android project [lucene]

2024-02-14 Thread via GitHub


uschindler closed issue #13078: No static method version()  crash in android 
project
URL: https://github.com/apache/lucene/issues/13078


-- 
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



Re: [I] AnalysisSPILoader should refresh cached service when a different classloader is used [lucene]

2024-02-14 Thread via GitHub


uschindler commented on issue #13101:
URL: https://github.com/apache/lucene/issues/13101#issuecomment-1944717416

   This is a general problem of Service providers in Java.
   
   As Lucene only has a single instance in the parent classloader (Lucene is 
part of Solr's classloader) it only has a single lookup to find analysis 
components.
   
   Your proposal will cause the same problem if other cores. If you unload a 
core and it removes it's analysis components, the anal is in another core will 
fail from that point on.
   
   To fix this correctly, Solr would need to have a separate Lucene impl per 
core. This is undoable. In general the per core classpaths in Solr are strange. 
Codecs, PostingsFormats, DocvaluesFormats and analysis components should be 
loaded in same classloader like Solr and Lucene itself.
   
   There is no solution to this well known problem.


-- 
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



Re: [PR] Move `brToString(BytesRef)` to `ToStringUtils` [lucene]

2024-02-14 Thread via GitHub


uschindler commented on PR #13068:
URL: https://github.com/apache/lucene/pull/13068#issuecomment-1944770945

   Please move entry to 9.11.0


-- 
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



Re: [PR] Move `brToString(BytesRef)` to `ToStringUtils` [lucene]

2024-02-14 Thread via GitHub


uschindler commented on PR #13068:
URL: https://github.com/apache/lucene/pull/13068#issuecomment-1944773941

   Will take care of this tomorrow. Sorry for delay.


-- 
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



Re: [I] (Byte|Float)KnnVectorFieldSource unusable if segment has no vector values [lucene]

2024-02-14 Thread via GitHub


hossman commented on issue #13105:
URL: https://github.com/apache/lucene/issues/13105#issuecomment-1945211363

   > ... as long as a new VectorEncoding method checkField(reader, fieldName) 
does not throw an exception (Adding checkField directly to VectorEncoding 
seemed like the most straightforward place to put this ... not sure if there is 
a more appropriate class?)
   
   The fact that this new method (in an otherwise bare bones `enum` class) had 
to be public kept gnawing at me -- so instead I refactored it into a package 
protected static method in `VectorFieldFunction`.
   
   I also added a simple test of the "field exists, but was not indexed with 
vectors" situation, and was surprised to discover that 
`FieldInfo.getVectorEncoding()` seems to default to `FLOAT32` (instead of null) 
when a field has no vectors -- so I added an explicit check of 
`FieldInfo.hasVectorValues()`
   
   Updated Patch: 
[VectorFieldSource.fix-missing-check.patch.txt](https://github.com/apache/lucene/files/14290130/VectorFieldSource.fix-missing-check.patch.txt)
   


-- 
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



Re: [I] AnalysisSPILoader should refresh cached service when a different classloader is used [lucene]

2024-02-14 Thread via GitHub


AndreyBozhko commented on issue #13101:
URL: https://github.com/apache/lucene/issues/13101#issuecomment-1945225900

   Thanks for taking a look @uschindler - I have to admit that I didn't fully 
grasp your comment about having a separate Lucene per core.
   
   My original understanding was that for the example I described, the loading 
and reloading of SPI occurs during the Solr node (and not core) startup. So 
very early in Solr node's lifecycle, it would load all Lucene classes (makes 
total sense that these are per-node), and also load other libraries 
(user-provided plugins) shared at the node level. But even if we only deal with 
shared classes, users can still encounter a `ClassNotFoundException` similar to 
the example above.
   
   @HoustonPutman Please correct me if there's something that I misinterpreted 
about the issue from our initial discussion.


-- 
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



Re: [I] AnalysisSPILoader should refresh cached service when a different classloader is used [lucene]

2024-02-14 Thread via GitHub


AndreyBozhko commented on issue #13101:
URL: https://github.com/apache/lucene/issues/13101#issuecomment-1945226818

   I do realize that the issue title may have sounded too prescriptive - I 
certainly didn't mean that. But I would definitely like to have a discussion on 
what path forward (if any) makes the most sense.
   
   I realize that the feedback may be along the lines of _"The behavior of 
Lucene's AnalysisSPILoader is set in stone, and Solr should just work around 
that"_.
   
   Or, as a hypothetical alternative, Lucene could expose a way to invalidate 
the SPI cache, and applications like Solr may choose to use that (having full 
control, but also full responsibility over what they're doing).
   
   Or perhaps there are other ways to go about this.
   
   What are your thoughts?


-- 
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