You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2021/10/19 19:26:54 UTC

[GitHub] [lucenenet] rclabo commented on issue #527: ArgumentNullException with BlendedInfixSuggester (v. 4.8.0-beta00014)

rclabo commented on issue #527:
URL: https://github.com/apache/lucenenet/issues/527#issuecomment-947038717


   I am able to reproduce the `Exception` @monco83  is observing based on the code provided.  @NightOwl888  turned that code into a unit test and that test does throw with the same stacktrace @monco83 is seeing.
   
   The next question that @NightOwl888  and I had was whether this was a issue introduced when the Java version of Lucene 4.8 was ported to C# and .NET.  To investigate this @NightOwl888 and I ported that failing unit test to Java and ran the unit test against Java Lucene 4.8 on my machine.  I can confirm that it fails the same way in Java so this is not a porting bug.
   
   When running the unit test in java (or c#) the line highlighted below is hit three time, the first two times `docTerm` is `b` or `c` and `prefixToken` is null.  These cases continue on without an `Exception`.  But the third time this line is hit, `docTerm` is `d` and `prefixToken` is null.  since `matchedTokens` contains only `b` and `c` the `startsWith` method is evaluated and produces the error.  Again this happens in both Java Lucene 4.8 and Lucene.NET 4.8.  
   
   ![image](https://user-images.githubusercontent.com/6945499/137975637-4f4f6764-f242-43e8-a009-6761cc53ea73.png)
   
   Unfortunately neither @NightOwl888  or myself have intimate knowledge of the high level workings of `BlendedInfixSuggester` so we do not currently know whether this is a bug in Lucene 4.8 or whether the class is not being used correctly.  @NightOwl888  located this document https://sease.io/2018/06/apache-lucene-blendedinfixsuggester-how-it-works-bugs-and-improvements.html which describes 3 bugs in the Suggester and workarounds, but it isn't clear any of them are this issue.
   
   At this point, since we have verified it's not a bug in the porting of Lucene to .NET it'd be great if @monco83 can do a little digging to see if perhaps there is an issue with how  `BlendedInfixSuggester` is being called/used.  We will leave this issue open, so the findings can be reported back.
   


-- 
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: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org