Search Criteria and Sort Clauses¶
Search Criteria and Sort Clauses are the building blocks of a search query: Criteria select which content is returned, and Sort Clauses order the results. Cohesivo provides a number of standard Search Criteria and Sort Clauses that cover the majority of use cases.
For the full list, see the Search Criteria reference and the Sort Clause reference.
Content and Location search¶
There are two basic types of search: you can search for content items, or for locations.
All Criteria and Sort Clauses are accepted by Location search, but not all of them can be used with Content search. The reason is that while one location always has exactly one content item, one content item can have several locations. In that context some Criteria and Sort Clauses would produce ambiguous queries, so Content search refuses the Criteria and Sort Clauses that apply specifically to locations.
Search using a custom Field Criterion¶
REST search can be performed by calling the POST /views method with a custom FieldCriterion.
This allows you to build custom content logic queries with nested logical operators OR/AND/NOT.
Example of custom Content Query¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |