Setting up IDE for Lucene dev - error importing JUnit

2021-07-09 Thread TK Solr
I'm trying to set up Lucene development environment. I pulled the latest to branch_8x branch and I am using the latest Idea. https://cwiki.apache.org/confluence/display/SOLR/Building+Solr+with+Gradle says 8x is now gradle based and there is not special setup is needed. But I am seeing Idea is no

TermPositions (Lucene 3.3) replacement?

2021-07-08 Thread TK Solr
Hi, I'm porting a piece of code that uses TermPositions of Lucene 3.3 to 8.9. https://lucene.apache.org/core/4_0_0/MIGRATE.html reads: * TermPositions is renamed to DocsAndPositionsEnum, and no longer extends the docs only enumerator (DocsEnum). But DocsAndPositionsEnum doesn't exist in

Re: Tuning MoreLikeThis scoring algorithm

2021-06-01 Thread TK Solr
just doesn't work the way you think. Don't try to interpret it as an absolute value, it is a relative one. On Fri, May 28, 2021 at 1:36 PM TK Solr wrote: I'd like to have suggestions on changing the scoring algorithm of MoreLikeThis. When I feed the identical string as the content

Tuning MoreLikeThis scoring algorithm

2021-05-28 Thread TK Solr
I'd like to have suggestions on changing the scoring algorithm of MoreLikeThis. When I feed the identical string as the content of a document in the index to MoreLikeThis.like("field", new StringReader(docContent)), I get a score less than 1.0 (0.944 in one of my test cases) that I expect. What

Re: MLTQuery not working; seeking debugging tips

2021-05-21 Thread TK Solr
n() as: Explanation expl = indexSearcher.explain(mltQuery, docId); System.out.printf("docId=%d; expl=%s\n", docId, expl.toString()); If there are better ways to debug, please let me know. TK On 5/20/21 9:51 PM, TK Solr wrote: I am having difficulty using MoreLikeThisQuery with an n-gram

MLTQuery not working; seeking debugging tips

2021-05-20 Thread TK Solr
I am having difficulty using MoreLikeThisQuery with an n-gram analyzer as its analyzer. A test query isn't hitting any document in a unit test case. Is there any debugging method to use to understand why there is not hit? Because the test code uses a RAMDirectory, I cannot use Luke to see if the