Loading TOC...


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');
  .where(jsearch.byExample({author: 'Mark Twain'})) 

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.


  • sorry i didnt understood what is jsearch . can you elaborate ? Well i have a basic question. I have a collection with many documents in it and i want to know different types of values present for particular column, say i want to know different status are there by querying documents in collections ? Can you pls guide me
    • To learn about JSearch, you can review the <a href="http://docs.marklogic.com/guide/search-dev/javascript">JSearch documentation</a>, or see the <a href="http://developer.marklogic.com/learn/jsearch-in-5-minutes">JSearch in 5 Minutes</a> tutorial. For your specific question, asking on Stack Overflow with the MarkLogic tag will get more people to see and respond. http://stackoverflow.com/questions/ask?tags=marklogic