在查询时,我几乎总是得到SpanQuery匹配,并且想知道如何预先计算窗口共同出现的统计数据。 ?在查询时执行此操作似乎会减慢搜索时间。
SpanTermQuery[] span_query = new SpanTermQuery[3]
span_query[0] = new SpanTermQuery(new Term("text", "united"));
span_query[1] = new SpanTermQuery(new Term("text", "states"));
span_query[2] = new SpanTermQuery(new Term("text", "department"));
// find a match in unordered window and window-span is 12.
SpanNearQuery span_near_query = new SpanNearQuery(span_query, 12, false);