you can fool the lucene scoring fuction. override each function such as idf queryNorm lengthNorm and let them simply return 1.0f. I don't lucene 4 will expose more details. but for 2.x/3.x, lucene can only score by vector space model and the formula can't be replaced by users.
On Fri, Feb 17, 2012 at 10:47 AM, Nicholas Clark <clark...@gmail.com> wrote: > Hi, > > I'm looking for a way to sort results by the number of matching terms. > Being able to sort by the coord() value or by the overlap value that gets > passed into the coord() function would do the trick. Is there a way I can > expose those values to the sort function? > > I'd appreciate any help that points me in the right direction. I'm OK with > making basic code modifications. > > Thanks! > > -Nick >