TF in MoreLikeThis

2022-03-31 Thread Petko Minkov
Hi, I was looking at Lucene's code for MoreLikeThis, specifically this line: https://github.com/apache/lucene/blob/69b040fc6292ac47d7f7fc8bc3b7fd601794e54b/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java#L640 It looks like in ClassicSimilarity, TF is a square root, but in

Re: TF in MoreLikeThis

2022-04-01 Thread Petko Minkov
can find contributing > guidelines here: > https://github.com/apache/lucene/blob/main/CONTRIBUTING.md. > > On Thu, Mar 31, 2022 at 11:46 PM Petko Minkov wrote: > > > > Hi, > > > > I was looking at Lucene's code for MoreLikeThis, spec

Re: TF in MoreLikeThis

2022-06-01 Thread Petko Minkov
Sorry for the delay, but better late than never :). I put up a PR here: https://github.com/apache/lucene/pull/940. --Petko On Fri, Apr 1, 2022 at 10:11 AM Petko Minkov wrote: > Yeah, I'll be happy to. I'll try to get a patch out soon. > > On Fri, Apr 1, 2022 at 9:31 AM

Sort by numeric field, order missing values before anything else

2022-11-16 Thread Petko Minkov
Hello, When sorting documents by a NumericDocValuesField, how can documents be ordered such that those with missing values can come before anything else in ascending sorts? SortField allows to set a missing value: var sortField = new SortField("price", SortField.Type.LONG); sortField.setM

Re: Sort by numeric field, order missing values before anything else

2022-11-18 Thread Petko Minkov
r existing values. The benefit of this approach is that you > would automatically benefit from some not-so-trivial features of Lucene's > comparator such as dynamic pruning. > > On Wed, Nov 16, 2022 at 9:16 PM Petko Minkov wrote: > > > Hello, > > > > When sortin

Re: Sort by numeric field, order missing values before anything else

2022-11-22 Thread Petko Minkov
he comparator > > for > > > longs with MIN_VALUE / MAX_VALUE for missing values depending on > whether > > > you want missing values sorted first or last, and chain it with another > > > comparator (via a FieldComparatorSource) which would sort missing > va