grtjn / ml-constraints

Custom MarkLogic constraints that go beyond what Search API provides out of the box
Apache License 2.0
0 stars 1 forks source link

Add other-where constraint #15

Open grtjn opened 4 years ago

grtjn commented 4 years ago

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.

grtjn commented 4 years ago

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

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

grtjn commented 4 years ago

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

grtjn commented 4 years ago

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..