grtjn / ml-constraints

Custom MarkLogic constraints that go beyond what Search API provides out of the box

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add other-where constraint

grtjn opened this issue · comments

commented

A custom constraint that suppressed sub-queries for facet itself when calculating facet numbers, as a way to show alternatives, and allow UI to append those to the facet filters with an OR condition.

commented

It resembles the othersWhere feature of JSearch, but for REST-api instead. See also:

https://docs.marklogic.com/guide/search-dev/javascript#id_88888

commented

Initial copy was pushed to master, but is buggy..

commented

bugfixes have been pushed, but impl:parse seems to no longer work properly in latest ML version. Need to push a fix that uses the more traditional search:parse instead. Using cts:parse is an option too, but it would require, re-inventing the logic to analyze the constraint def, and produce the appropriate ref..