Skip to content

Instantly share code, notes, and snippets.

@eedeebee
Created February 1, 2014 05:33
Show Gist options
  • Save eedeebee/8748419 to your computer and use it in GitHub Desktop.
Save eedeebee/8748419 to your computer and use it in GitHub Desktop.
MarkLogic Java API QBE for JSON
// create a search definition
StringHandle handle = new StringHandle(
"{ \"$query\": { \"plenary\": true } }"
).withFormat(Format.JSON);
RawQueryByExampleDefinition query = queryMgr.newRawQueryByExampleDefinition(handle);
// create a handle for the search results
StringHandle resultsHandle = new StringHandle().withFormat(Format.JSON);
// run the search
queryMgr.search(query, resultsHandle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment