
DocumentsSearch.filter() as DocumentsSearch
Specifies filtering the documents by inspecting the contents of matched and ordered documents to populate the slice. The search is unfiltered by default.
// Perform a filtered search for documents where the "author" JSON
// property has the value "Mark Twain"
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.documents()
.where(jsearch.byExample({author: 'Mark Twain'}))
.filter()
.result()