: Date: Wed, 3 Jun 2009 10:19:06 -0700 (PDT) : From: Otis Gospodnetic : Subject: Re: Keyword Density
: > > But I don't need to sort using this value. I need to cut results, where : > > this value (for particular term of query!) not in some range. : I don't think this is possible without changing Solr. Or maybe it's : possible with a custom Search Component that looks at all hits and : checks the "df" (document frequency) for a term in each document? : Sounds like a very costly operation... FWIW: The best place to try and tackle something like this would probably be to write a new subclass of FilteredTermDocs that only returned docs/frequncies where the the freq was in the range you were interested in. Then use your new FilteredTermDocs class in a subclass of TermQuery when constructing a TermScorer. *then* use your new TermQuery subclass in a custom Solr QParser. It can be done efficiently, but it definitely requires making some low level changes to the code. -Hoss