On Mon, Dec 17, 2012 at 11:24 AM, Shai Erera <ser...@gmail.com> wrote:
> Hi
>
> While migrating code to Lucene 4.0, I noticed that I have an assert on a
> field that is indexed with DOCS_ONLY that DocsEnum.freq() == 1. This got me
> thinking ... why?

1 is pretty intuitive i think. i think of omitting freqs for things
like super-short fields where the frequency is expected to be 1
anyway.

I see your point about "lying", but if we change this, we have to
change all code using it like TermQuery to not call freqs if they are
unavailable: i think this makes the apis pretty difficult to use.

>
> But if we do keep the current behavior, can we at least
> document it?
>
> E.g., something like this patch:
>

+1 to the patch.

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

Reply via email to