Loading TOC...

DocumentsSearch.filter

DocumentsSearch.filter() as DocumentsSearch

Summary

Specifies filtering the documents by inspecting the contents of matched and ordered documents to populate the slice. The search is unfiltered by default.

Example


// 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()
   

Comments

  • 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
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy