the reason why you can't omit it today is that $num_position ==
$term_frequency ie. we need to store it anyways. Yet, I kind of agree
that this is an impl detail so we could in theory return 1 as the TF
from the DocsAndPosEnum but this would break our APIs as well since
DocsAndPositionsEnum requires you to call nextPos() up to freq() times
otherwise the behaviour is undefined. So essentially if you dont' want
to take the TF into account in your scoring model you kind of left
with changing your similarity.

simon

On Tue, Aug 6, 2013 at 1:41 AM, Ivan Brusic <i...@brusic.com> wrote:
> As the subject says, is it possible to omit the term frequencies for a
> field, but still keep positions? Term frequencies are omitted for better
> scoring under our model, but positions are required for span queries. Are
> the two concepts related? Are they indexed in the same data structure?
>
> One option is to use a custom similarity that ignores term frequencies, but
> I was wondering if there was a cleaner solution.
>
> Cheers,
>
> Ivan

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to