public interface RawQueryByExampleDefinition extends RawQueryDefinition
A RawQueryByExampleDefinition provides access to a simple query by example in an JSON or XML representation. For instance:
QueryManager queryMgr = databaseClient.newQueryManager();
String rawXMLQuery = "{ \"$query\": { \"author\": \"Mark Twain\" } }“; StringHandle qbeHandle = new StringHandle(rawXMLQuery).withFormat(Format.JSON); RawQueryByExampleDefinition query = queryMgr.newRawQueryByExampleDefinition(qbeHandle, ”myoptions"); SearchHandle resultsHandle = queryMgr.search(query, new SearchHandle()); QueryManager.newRawCombinedQueryDefinitionAs(Format, Object),
QueryManager.newRawCombinedQueryDefinitionAs(Format, Object, String),
QueryManager.newRawQueryByExampleDefinition(StructureWriteHandle),
QueryManager.newRawQueryByExampleDefinition(StructureWriteHandle, String),
MarkLogic Java Application Developer's Guide
> Searching
> Prototype a Query Using Query By Example| Modifier and Type | Field and Description |
|---|---|
static String |
QBE_NS
The namespace of the built-in vocabulary for an Query by Example in XML format.
|
| Modifier and Type | Method and Description |
|---|---|
RawQueryByExampleDefinition |
withHandle(StructureWriteHandle handle)
Specifies the handle for the JSON or XML representation of a query by example and returns the query definition.
|
getHandle, setHandlegetCollections, getDirectory, getOptionsName, getResponseTransform, setCollections, setDirectory, setOptionsName, setResponseTransformstatic final String QBE_NS
The namespace of the built-in vocabulary for an Query by Example in XML format.
RawQueryByExampleDefinition withHandle(StructureWriteHandle handle)
Specifies the handle for the JSON or XML representation of a query by example and returns the query definition.
handle - the JSON or XML handle.Copyright © 2013-2017 MarkLogic Corporation.