Vikas Saurabh created OAK-7898:
----------------------------------
Summary: Facet queries with UNION should do trivial merge of
facets from sub-queries
Key: OAK-7898
URL: https://issues.apache.org/jira/browse/OAK-7898
Project: Jackrabbit Oak
Issue Type: Sub-task
Components: lucene
Reporter: Vikas Saurabh
Assignee: Vikas Saurabh
Queries such as {noformat} //*[@name = 'Node1' or @text =
't2']/(rep:facet(text)) {noformat} get split into 2 sub-queries such as
# {noformat} //*[@name = 'Node1']/(rep:facet(text)) {noformat}
# {noformat} //*[@test = 't2']/(rep:facet(text)) {noformat}
Trivially merging facets (union of labels and sum of counts for same labels)
across sub-queries in generally wrong because of potential intersection rows.
But, in common practical cases, intersections aren't a big majority so, albeit
incorrect, trivial merge shouldn't be off huge amount. Note that usual path
restrictions and node type restrictions are the most common case with {{OR}}
and they do have have no intersection in almost all cases.
That said, since it's going to give incorrect result by design, we need to very
explicit in our documentation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)