Implement SITE Queries

Description

When a SITE (term) query is detected, there should be a dedicated management in the Elasticsearch QueryAdaptor.

The scenarios we have to capture are

  • at query time the requestor can indicate a site noderef as value

In this case we can issue a term query on the “primaryHierarchy” attribute using the requested node reference.

  • at query time the requestor can indicate a site label as value (e.g. "My personal site")

In this case we need to query the Repository node cache in order to get the noderef of the site node associated to that label

Once the noderef has been retrieved, the SITE clause can be built using the "primaryHierarchy" as field and the noderef as value (basically we are in the same scenario as above)

  • at query time the requestor can indicate the special value "ALL_SITES" as value

After implementing those nodes that don't belong to a site will have a hasSite attribute set to false. In case the ALL_SITES special value is requested the following filter clause will be built:

  • at query time the requestor can indicate the special value "EVERYTHING" as value

In this case there won't be any contribution by the SITE query builder part. "Everything" means we have to return everything, regardless it belongs to a site or not

Acceptance Criteria

  • Implement the four scenarios above

  • Integration and Unit tests

  • Lucene query support

Assignee

Unassigned

Reporter

andrea gazzarini

Labels

None

Release Train

None

Delivery Team

None

Story Points

13

Epic Link

Priority

Unprioritized