lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wei Wang <>
Subject Filter based on the sum of values of two fields
Date Sun, 24 Mar 2013 09:46:57 GMT

We have documents with many numerical fields. In some search scenario,
we would like to create a filter based on the sum of the values of two

For example, assume we have fields F1 and F2, we would like to find
all documents with condition F1+F2 > 5.0. This filter may be combined
with other filters to form a BooleanFilter.

The question is, is there any way to construct an efficient filter to do this?

We know it is possible to pre-compute another field F3 with sums of
corresponding F1 and F2 values and then filter based on the values of
F3. However, we have too many possible combination of pairs of
numerical fields which leads to large number of aggregated fields such
as F3. Can we directly use the values of F1 and F2 to create a filter?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message