lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wei Wang <welshw...@gmail.com>
Subject Re: Filter based on the sum of values of two fields
Date Tue, 26 Mar 2013 19:09:50 GMT
Can someone give some hint on this? Or this is a tough problem.

Thanks in advance.

On Sun, Mar 24, 2013 at 2:46 AM, Wei Wang <welshwang@gmail.com> wrote:
> Hello,
>
> 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
> fields.
>
> 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?
>
> Thanks,
> Wei

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message