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 <zhengxiaol...@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 >