lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Re: Query the doc frequency across multiple search field.
Date Wed, 20 Jul 2016 13:31:42 GMT
There is no way to get this statistic in constant-time. If you need it for
scoring, you need to make approximations. For instance, BlendedTermQuery
uses the max of the doc freqs as the aggregated doc freq.

Otherwise, you can also compute this number by running a BooleanQuery with
one SHOULD clause per field.

Le mar. 19 juil. 2016 à 19:08, Xiaolong Zheng <zhengxiaolong@gmail.com> a
écrit :

> Hi,
>
> I want to know is there any way that query the doc frequency across
> multiple search field?
>
> The existing API seems only provide the query for a single search field:
>
>
>   indexReader.docFreq(new Term(field, word))
>
>
> Any suggestions that I could get the doc frequency from multiple field?
>
> Thanks in Advance,
>
> --Xiaolong
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message