BoboBrowse.Net icon indicating copy to clipboard operation
BoboBrowse.Net copied to clipboard

How to get count of intersecting facet values?

Open Xyroid opened this issue 6 years ago • 0 comments

I have one requirement in that I have column called "party". Assume that in party there can be buyers and sellers. I have option to select multiple facet values. So there will be list of parties (i.e. buyers and sellers). There will be some transactions between seller and buyer. The transactions will be displayed if selected value is either buyer or seller. There is no requirement to display the transaction between parties but it is on individual level. Now assume there is total 2 transactions. One is between X and Y and another is between X and Z (another buyer). So initially the facet will look like this.

Parties

  • [ ] X (2)
  • [ ] Y (1)
  • [ ] Z (1)

Here the count displays the correct value. Now when I select X it will display the transaction for X. That will be two. But the count of other parties that did transaction with X is displaying wrong.

Expected count

Parties

  • [x] X (2)
  • [ ] Y (0)
  • [ ] Z (0)

Actual count

Parties

  • [x] X (2)
  • [ ] Y (1)
  • [ ] Z (1)

For above case user will think that there is some other transaction which is between Y and another party apart from X and Z but actually there is no such transaction. So how to update the count based on intersection of data or say overlapping of data?

Xyroid avatar Dec 15 '17 14:12 Xyroid