public interface IDatabaseCommands extends IHoldProfilingInformation
Modifier and Type | Method and Description |
---|---|
BatchResult[] |
batch(List<ICommandData> commandDatas)
Sends multiple operations in a single request, reducing the number of remote calls and allowing several operations to share same transaction
|
HttpJsonRequest |
createRequest(HttpMethods method,
String requestUrl)
Internal use
|
HttpJsonRequest |
createRequest(HttpMethods method,
String requestUrl,
boolean disableRequestCompression,
boolean disableAuthentication,
Long timeout) |
void |
delete(String key,
Etag etag)
Deletes the document with the specified key
|
void |
deleteAttachment(String key,
Etag etag)
Deprecated.
Use RavenFS instead.
|
Operation |
deleteByIndex(String indexName,
IndexQuery queryToDelete)
Perform a set based deletes using the specified index
|
Operation |
deleteByIndex(String indexName,
IndexQuery queryToDelete,
BulkOperationOptions options)
Perform a set based deletes using the specified index
|
void |
deleteIndex(String name)
Deletes the specified index
|
void |
deleteTransformer(String name)
Deletes the specified transformer
|
CleanCloseable |
disableAllCaching()
Disable all caching within the given scope
|
CleanCloseable |
forceReadFromMaster()
Force the database commands to read directly from the master, unless there has been a failover.
|
IDatabaseCommands |
forDatabase(String database)
Create a new instance of
IDatabaseCommands that will interacts with the specified database |
IDatabaseCommands |
forSystemDatabase()
Creates a new instance of
IDatabaseCommands that will interacts with the default database. |
JsonDocument |
get(String key)
Retrieve a single document for a specified key.
|
MultiLoadResult |
get(String[] ids,
String[] includes)
Retrieves documents with the specified ids, optionally specifying includes to fetch along and also optionally the transformer.
|
MultiLoadResult |
get(String[] ids,
String[] includes,
String transformer)
Retrieves documents with the specified ids, optionally specifying includes to fetch along and also optionally the transformer.
|
MultiLoadResult |
get(String[] ids,
String[] includes,
String transformer,
Map<String,RavenJToken> transformerParameters)
Retrieves documents with the specified ids, optionally specifying includes to fetch along and also optionally the transformer.
|
MultiLoadResult |
get(String[] ids,
String[] includes,
String transformer,
Map<String,RavenJToken> transformerParameters,
boolean metadataOnly)
Retrieves documents with the specified ids, optionally specifying includes to fetch along and also optionally the transformer.
|
IAdminDatabaseCommands |
getAdmin()
Admin operations for current database
|
Attachment |
getAttachment(String key)
Deprecated.
Use RavenFS instead.
|
List<Attachment> |
getAttachmentHeadersStartingWith(String idPrefix,
int start,
int pageSize)
Deprecated.
Use RavenFS instead.
|
AttachmentInformation[] |
getAttachments(int start,
Etag startEtag,
int pageSize)
Deprecated.
Use RavenFS instead.
|
BuildNumber |
getBuildNumber()
Gets the build number
|
ILowLevelBulkInsertOperation |
getBulkInsertOperation(BulkInsertOptions options,
IDatabaseChanges changes)
Get the low level bulk insert operation
|
List<JsonDocument> |
getDocuments(Etag fromEtag,
int pageSize)
Retrieves multiple documents.
|
List<JsonDocument> |
getDocuments(Etag fromEtag,
int pageSize,
boolean metadataOnly)
Retrieves multiple documents.
|
List<JsonDocument> |
getDocuments(int start,
int pageSize)
Retrieves multiple documents.
|
List<JsonDocument> |
getDocuments(int start,
int pageSize,
boolean metadataOnly)
Retrieves multiple documents.
|
FacetResults |
getFacets(String index,
IndexQuery query,
List<Facet> facets)
Using the given Index, calculate the facets as per the specified doc with the given start and pageSize
|
FacetResults |
getFacets(String index,
IndexQuery query,
List<Facet> facets,
int start)
Using the given Index, calculate the facets as per the specified doc with the given start and pageSize
|
FacetResults |
getFacets(String index,
IndexQuery query,
List<Facet> facets,
int start,
Integer pageSize)
Using the given Index, calculate the facets as per the specified doc with the given start and pageSize
|
FacetResults |
getFacets(String index,
IndexQuery query,
String facetSetupDoc)
Using the given Index, calculate the facets as per the specified doc with the given start and pageSize
|
FacetResults |
getFacets(String index,
IndexQuery query,
String facetSetupDoc,
int start)
Using the given Index, calculate the facets as per the specified doc with the given start and pageSize
|
FacetResults |
getFacets(String index,
IndexQuery query,
String facetSetupDoc,
int start,
Integer pageSize)
Using the given Index, calculate the facets as per the specified doc with the given start and pageSize
|
IGlobalAdminDatabaseCommands |
getGlobalAdmin()
Admin operations performed against system database, like create/delete database
|
IndexDefinition |
getIndex(String name)
Retrieves an index definition from a database.
|
Collection<IndexDefinition> |
getIndexes(int start,
int pageSize)
Retrieves multiple index definitions from a database
|
IndexMergeResults |
getIndexMergeSuggestions()
Retrieves all suggestions for an index merging
|
Collection<String> |
getIndexNames(int start,
int pageSize)
Retrieves multiple index names from a database.
|
LicensingStatus |
getLicenseStatus()
Gets the license status
|
LogItem[] |
getLogs(boolean errorsOnly)
Gets the Logs
|
FacetResults[] |
getMultiFacets(FacetQuery[] facetedQueries)
Sends a multiple faceted queries in a single request and calculates the facet results for each of them
|
Map<String,String> |
getOperationsHeaders()
Gets the operations headers
|
OperationCredentials |
getPrimaryCredentials()
Primary credentials for access.
|
ReplicationStatistics |
getReplicationInfo()
Get replication info
|
DatabaseStatistics |
getStatistics()
Retrieve the statistics for the database
|
List<String> |
getTerms(String index,
String field,
String fromValue,
int pageSize)
Get the all terms stored in the index for the specified field
You can page through the results by use fromValue parameter as the
starting point for the next query
|
TransformerDefinition |
getTransformer(String name)
Gets the transformer definition for the specified name
|
List<TransformerDefinition> |
getTransformers(int start,
int pageSize)
Gets the transformers from the server
|
JsonDocumentMetadata |
head(String key)
Retrieves the document metadata for the specified document key.
|
Attachment |
headAttachment(String key)
Deprecated.
|
boolean |
indexHasChanged(String name,
IndexDefinition indexDef)
Lets you check if the given index definition differs from the one on a server.
|
MultiLoadResult |
moreLikeThis(MoreLikeThisQuery query)
Return a list of documents that based on the MoreLikeThisQuery.
|
GetResponse[] |
multiGet(GetRequest[] requests)
Perform a single POST request containing multiple nested GET requests
|
Long |
nextIdentityFor(String name)
Generate the next identity value from the server
|
RavenJObject |
patch(String key,
PatchRequest[] patches)
Sends a patch request for a specific document, ignoring the document's Etag and if the document is missing
|
RavenJObject |
patch(String key,
PatchRequest[] patches,
boolean ignoreMissing)
Sends a patch request for a specific document, ignoring the document's Etag
|
RavenJObject |
patch(String key,
PatchRequest[] patches,
Etag etag)
Sends a patch request for a specific document
|
RavenJObject |
patch(String key,
PatchRequest[] patchesToExisting,
PatchRequest[] patchesToDefault,
RavenJObject defaultMetadata)
Sends a patch request for a specific document which may or may not currently exist
|
RavenJObject |
patch(String key,
ScriptedPatchRequest patch)
Sends a patch request for a specific document, ignoring the document's Etag and if the document is missing
|
RavenJObject |
patch(String key,
ScriptedPatchRequest patch,
boolean ignoreMissing)
Sends a patch request for a specific document, ignoring the document's Etag
|
RavenJObject |
patch(String key,
ScriptedPatchRequest patch,
Etag etag)
Sends a patch request for a specific document
|
RavenJObject |
patch(String key,
ScriptedPatchRequest patchExisting,
ScriptedPatchRequest patchDefault,
RavenJObject defaultMetadata)
Sends a patch request for a specific document which may or may not currently exist
|
PutResult |
put(String key,
Etag guid,
RavenJObject document,
RavenJObject metadata)
Puts the document in the database with the specified key.
|
void |
putAttachment(String key,
Etag etag,
InputStream data,
RavenJObject metadata)
Deprecated.
Use RavenFS instead.
|
String |
putIndex(String name,
IndexDefinition definition)
Creates an index with the specified name, based on an index definition
|
String |
putIndex(String name,
IndexDefinition definition,
boolean overwrite)
Creates an index with the specified name, based on an index definition
|
String |
putIndex(String name,
IndexDefinition definition,
boolean overwrite,
Reference<Operation> precomputeBatchOperation)
Creates an index with the specified name, based on an index definition
|
String |
putIndex(String name,
IndexDefinitionBuilder indexDef)
Creates an index with the specified name, based on an index definition that is created by the supplied IndexDefinitionBuilder
|
String |
putIndex(String name,
IndexDefinitionBuilder indexDef,
boolean overwrite)
Creates an index with the specified name, based on an index definition that is created by the supplied IndexDefinitionBuilder
|
String[] |
putIndexes(IndexToAdd[] indexesToAdd)
Creates multiple indexes with the specified name, using given index definitions and priorities
|
String[] |
putSideBySideIndexes(IndexToAdd[] indexesToAdd)
Creates multiple side by side indexes with the specified name, using given index definitions and priorities
|
String[] |
putSideBySideIndexes(IndexToAdd[] indexesToAdd,
Etag minimumEtagBeforeReplace,
Date replaceTimeUtc)
Creates multiple side by side indexes with the specified name, using given index definitions and priorities
|
String |
putTransformer(String name,
TransformerDefinition transformerDef)
Creates a transformer with the specified name, based on an transformer definition
|
QueryResult |
query(String index,
IndexQuery query)
Queries the specified index in the Raven-flavored Lucene query syntax
|
QueryResult |
query(String index,
IndexQuery query,
String[] includes)
Queries the specified index in the Raven-flavored Lucene query syntax
|
QueryResult |
query(String index,
IndexQuery query,
String[] includes,
boolean metadataOnly)
Queries the specified index in the Raven-flavored Lucene query syntax
|
QueryResult |
query(String index,
IndexQuery query,
String[] includes,
boolean metadataOnly,
boolean indexEntriesOnly)
Queries the specified index in the Raven-flavored Lucene query syntax
|
void |
resetIndex(String name)
Removes all indexing data from a server for a given index so the indexation can start from scratch for that index.
|
long |
seedIdentityFor(String name,
long value)
Seeds the next identity value on the server
|
void |
setIndexLock(String name,
IndexLockMode lockMode)
Sets the index lock mode
|
void |
setIndexPriority(String name,
IndexStats.IndexingPriority priority)
Sets the index priority
|
void |
setOperationsHeaders(Map<String,String> operationsHeaders)
Sets the operations headers
|
void |
setTransformerLock(String name,
TransformerLockMode lockMode)
Sets the transformer's lock mode
|
List<JsonDocument> |
startsWith(String keyPrefix,
String matches,
int start,
int pageSize)
Retrieves documents for the specified key prefix.
|
List<JsonDocument> |
startsWith(String keyPrefix,
String matches,
int start,
int pageSize,
boolean metadataOnly)
Retrieves documents for the specified key prefix.
|
List<JsonDocument> |
startsWith(String keyPrefix,
String matches,
int start,
int pageSize,
boolean metadataOnly,
String exclude)
Retrieves documents for the specified key prefix.
|
List<JsonDocument> |
startsWith(String keyPrefix,
String matches,
int start,
int pageSize,
boolean metadataOnly,
String exclude,
RavenPagingInformation pagingInformation)
Retrieves documents for the specified key prefix.
|
List<JsonDocument> |
startsWith(String keyPrefix,
String matches,
int start,
int pageSize,
boolean metadataOnly,
String exclude,
RavenPagingInformation pagingInformation,
String transformer,
Map<String,RavenJToken> transformerParameters)
Retrieves documents for the specified key prefix.
|
List<JsonDocument> |
startsWith(String keyPrefix,
String matches,
int start,
int pageSize,
boolean metadataOnly,
String exclude,
RavenPagingInformation pagingInformation,
String transformer,
Map<String,RavenJToken> transformerParameters,
String skipAfter)
Retrieves documents for the specified key prefix.
|
CloseableIterator<RavenJObject> |
streamDocs()
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamDocs(Etag fromEtag)
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamDocs(Etag fromEtag,
String startsWith)
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamDocs(Etag fromEtag,
String startsWith,
String matches)
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamDocs(Etag fromEtag,
String startsWith,
String matches,
int start)
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamDocs(Etag fromEtag,
String startsWith,
String matches,
int start,
int pageSize)
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamDocs(Etag fromEtag,
String startsWith,
String matches,
int start,
int pageSize,
String exclude)
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamDocs(Etag fromEtag,
String startsWith,
String matches,
int start,
int pageSize,
String exclude,
RavenPagingInformation pagingInformation)
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamDocs(Etag fromEtag,
String startsWith,
String matches,
int start,
int pageSize,
String exclude,
RavenPagingInformation pagingInformation,
String skipAfter)
Streams the documents by etag OR starts with the prefix and match the matches
Will return *all* results, regardless of the number of items that might be returned.
|
CloseableIterator<RavenJObject> |
streamQuery(String index,
IndexQuery query,
Reference<QueryHeaderInformation> queryHeaderInfo)
Queries the specified index in the Raven flavored Lucene query syntax.
|
SuggestionQueryResult |
suggest(String index,
SuggestionQuery suggestionQuery)
Returns a list of suggestions based on the specified suggestion query
|
Boolean |
tryResolveConflictByUsingRegisteredListeners(OperationMetadata operationMetadata,
String key,
Etag etag,
List<String> conflictedIds,
OperationMetadata opUrl)
Tries to resolve conflict using registered listeners
|
void |
updateAttachmentMetadata(String key,
Etag etag,
RavenJObject metadata)
Deprecated.
Use RavenFS instead.
|
Operation |
updateByIndex(String indexName,
IndexQuery queryToUpdate,
PatchRequest[] patchRequests)
Perform a set based update using the specified index
|
Operation |
updateByIndex(String indexName,
IndexQuery queryToUpdate,
PatchRequest[] patchRequests,
BulkOperationOptions options)
Perform a set based update using the specified index
|
Operation |
updateByIndex(String indexName,
IndexQuery queryToUpdate,
ScriptedPatchRequest patch)
Perform a set based update using the specified index
|
Operation |
updateByIndex(String indexName,
IndexQuery queryToUpdate,
ScriptedPatchRequest patch,
BulkOperationOptions options)
Perform a set based update using the specified index
|
String |
urlFor(String documentKey)
Get the full URL for the given document key
|
getProfilingInformation, isExpect100Continue
void setOperationsHeaders(Map<String,String> operationsHeaders)
operationsHeaders
- IGlobalAdminDatabaseCommands getGlobalAdmin()
OperationCredentials getPrimaryCredentials()
IAdminDatabaseCommands getAdmin()
JsonDocument get(String key)
key
- Key of the document you want to retrieveMultiLoadResult get(String[] ids, String[] includes)
ids
- Array of keys of the documents you want to retrieveincludes
- Array of paths in documents in which server should look for a 'referenced' documentMultiLoadResult get(String[] ids, String[] includes, String transformer)
ids
- Array of keys of the documents you want to retrieveincludes
- Array of paths in documents in which server should look for a 'referenced' documenttransformer
- Name of a transformer that should be used to transform the resultsMultiLoadResult get(String[] ids, String[] includes, String transformer, Map<String,RavenJToken> transformerParameters)
ids
- Array of keys of the documents you want to retrieveincludes
- Array of paths in documents in which server should look for a 'referenced' documenttransformer
- Name of a transformer that should be used to transform the resultstransformerParameters
- Parameters that will be passed to transformerMultiLoadResult get(String[] ids, String[] includes, String transformer, Map<String,RavenJToken> transformerParameters, boolean metadataOnly)
ids
- Array of keys of the documents you want to retrieveincludes
- Array of paths in documents in which server should look for a 'referenced' documenttransformer
- Name of a transformer that should be used to transform the resultstransformerParameters
- Parameters that will be passed to transformermetadataOnly
- Specifies if only document metadata should be returnedList<JsonDocument> getDocuments(int start, int pageSize)
start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedList<JsonDocument> getDocuments(int start, int pageSize, boolean metadataOnly)
start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedmetadataOnly
- Specifies if only document metadata should be returnedList<JsonDocument> getDocuments(Etag fromEtag, int pageSize)
fromEtag
- Etag from which documents should startpageSize
- Maximum number of documents that will be retrievedList<JsonDocument> getDocuments(Etag fromEtag, int pageSize, boolean metadataOnly)
fromEtag
- Etag from which documents should startpageSize
- Maximum number of documents that will be retrievedmetadataOnly
- Specifies if only document metadata should be returnedQueryResult query(String index, IndexQuery query)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexQueryResult query(String index, IndexQuery query, String[] includes)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexincludes
- An array of relative paths that specify related documents ids which should be included in a query resultQueryResult query(String index, IndexQuery query, String[] includes, boolean metadataOnly)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexincludes
- An array of relative paths that specify related documents ids which should be included in a query resultmetadataOnly
- True if returned documents should include only metadata without a document body.QueryResult query(String index, IndexQuery query, String[] includes, boolean metadataOnly, boolean indexEntriesOnly)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexincludes
- An array of relative paths that specify related documents ids which should be included in a query resultmetadataOnly
- True if returned documents should include only metadata without a document body.indexEntriesOnly
- True if query results should contain only index entries.BatchResult[] batch(List<ICommandData> commandDatas)
commandDatas
- Commands to processIOException
SuggestionQueryResult suggest(String index, SuggestionQuery suggestionQuery)
index
- Name of an index to querysuggestionQuery
- Suggestion query definition containing all information required to query a specified indexCollection<String> getIndexNames(int start, int pageSize)
start
- Number of index names that should be skippedpageSize
- Maximum number of index names that will be retrievedCollection<IndexDefinition> getIndexes(int start, int pageSize)
start
- Number of indexes that should be skippedpageSize
- Maximum number of indexes that will be retrievedList<TransformerDefinition> getTransformers(int start, int pageSize)
start
- Number of transformers that should be skippedpageSize
- Maximum number of transformers that will be retrievedvoid setTransformerLock(String name, TransformerLockMode lockMode)
name
- The name of the transformerlockMode
- The lock mode to be setvoid resetIndex(String name)
name
- Name of an index to resetvoid setIndexLock(String name, IndexLockMode lockMode)
name
- lockMode
- void setIndexPriority(String name, IndexStats.IndexingPriority priority)
name
- priority
- IndexDefinition getIndex(String name)
name
- Name of an indexTransformerDefinition getTransformer(String name)
name
- Transformer nameString putIndex(String name, IndexDefinition definition)
name
- Name of an indexdefinition
- Definition of an indexString putTransformer(String name, TransformerDefinition transformerDef)
name
- Name of a transformertransformerDef
- Definition of a transformerString putIndex(String name, IndexDefinition definition, boolean overwrite)
name
- Name of an indexdefinition
- Definition of an indexoverwrite
- If set to true [overwrite]String putIndex(String name, IndexDefinition definition, boolean overwrite, Reference<Operation> precomputeBatchOperation)
name
- Name of the indexdefinition
- Definition of an indexprecomputeBatchOperation
- Operation of first time index populationString putIndex(String name, IndexDefinitionBuilder indexDef)
name
- Name of an indexindexDef
- Definition of an indexString putIndex(String name, IndexDefinitionBuilder indexDef, boolean overwrite)
name
- Name of an indexindexDef
- Definition of an indexoverwrite
- If set to true [overwrite]String[] putIndexes(IndexToAdd[] indexesToAdd)
String[] putSideBySideIndexes(IndexToAdd[] indexesToAdd)
String[] putSideBySideIndexes(IndexToAdd[] indexesToAdd, Etag minimumEtagBeforeReplace, Date replaceTimeUtc)
boolean indexHasChanged(String name, IndexDefinition indexDef)
name
- Name of an index to checkindexDef
- Index definitionvoid deleteIndex(String name)
name
- Name of an index to deleteOperation deleteByIndex(String indexName, IndexQuery queryToDelete, BulkOperationOptions options)
indexName
- Name of an index to perform a query onqueryToDelete
- Query that will be performedoptions
- Various operation options e.g. AllowStale or MaxOpsPerSecOperation deleteByIndex(String indexName, IndexQuery queryToDelete)
indexName
- Name of an index to perform a query onqueryToDelete
- Query that will be performedvoid deleteTransformer(String name)
name
- Name of a transformer to deletePutResult put(String key, Etag guid, RavenJObject document, RavenJObject metadata)
key
- Unique key under which document will be storedguid
- Current document etag, used for concurrency checks (null to skip check)document
- Document datametadata
- Document metadataRavenJObject patch(String key, PatchRequest[] patches)
key
- Id of the document to patchpatches
- Array of patch requestsRavenJObject patch(String key, PatchRequest[] patches, boolean ignoreMissing)
key
- Id of the document to patchpatches
- Array of patch requestsignoreMissing
- True if the patch request should ignore a missing document, false to throw DocumentDoesNotExistExceptionRavenJObject patch(String key, ScriptedPatchRequest patch)
key
- Id of the document to patchpatch
- The patch request to use (using JavaScript)RavenJObject patch(String key, ScriptedPatchRequest patch, boolean ignoreMissing)
key
- Id of the document to patchpatch
- The patch request to use (using JavaScript)ignoreMissing
- true if the patch request should ignore a missing document, false to throw DocumentDoesNotExistExceptionRavenJObject patch(String key, PatchRequest[] patches, Etag etag)
key
- Id of the document to patchpatches
- Array of patch requestsetag
- Require specific Etag [null to ignore]RavenJObject patch(String key, PatchRequest[] patchesToExisting, PatchRequest[] patchesToDefault, RavenJObject defaultMetadata)
key
- Id of the document to patchpatchesToExisting
- Array of patch requests to apply to an existing documentpatchesToDefault
- Array of patch requests to apply to a default document when the document is missingdefaultMetadata
- The metadata for the default document when the document is missingRavenJObject patch(String key, ScriptedPatchRequest patch, Etag etag)
key
- Id of the document to patchpatch
- The patch request to use (using JavaScript)etag
- Require specific Etag [null to ignore]RavenJObject patch(String key, ScriptedPatchRequest patchExisting, ScriptedPatchRequest patchDefault, RavenJObject defaultMetadata)
key
- Id of the document to patchpatchExisting
- The patch request to use (using JavaScript) to an existing documentpatchDefault
- The patch request to use (using JavaScript) to a default document when the document is missingdefaultMetadata
- The metadata for the default document when the document is missingIDatabaseCommands forDatabase(String database)
IDatabaseCommands
that will interacts with the specified databasedatabase
- IDatabaseCommands forSystemDatabase()
IDatabaseCommands
that will interacts with the default database.DatabaseStatistics getStatistics()
@Deprecated Attachment getAttachment(String key)
key
- Key of the attachment you want to download@Deprecated AttachmentInformation[] getAttachments(int start, Etag startEtag, int pageSize)
start
- Indicates how many attachments should be skippedstartEtag
- ETag from which to startpageSize
- Maximum number of attachments that will be downloaded@Deprecated Attachment headAttachment(String key)
key
- Key of the attachment you want to download metadata for@Deprecated void deleteAttachment(String key, Etag etag)
key
- Key of an attachment to deleteetag
- Current attachment etag, used for concurrency checks (null to skip check)List<String> getTerms(String index, String field, String fromValue, int pageSize)
index
- Name of an indexfield
- Index fieldfromValue
- Starting point for a query, used for pagingpageSize
- Maximum number of terms that will be returnedCleanCloseable disableAllCaching()
GetResponse[] multiGet(GetRequest[] requests)
requests
- Operation updateByIndex(String indexName, IndexQuery queryToUpdate, PatchRequest[] patchRequests)
indexName
- Name of an index to perform a query onqueryToUpdate
- Query that will be performedpatchRequests
- Array of patches that will be executed on a query resultsOperation updateByIndex(String indexName, IndexQuery queryToUpdate, ScriptedPatchRequest patch)
indexName
- Name of an index to perform a query onqueryToUpdate
- Query that will be performedpatch
- JavaScript patch that will be executed on query resultsOperation updateByIndex(String indexName, IndexQuery queryToUpdate, PatchRequest[] patchRequests, BulkOperationOptions options)
indexName
- Name of an index to perform a query onqueryToUpdate
- Query that will be performedpatchRequests
- Array of patches that will be executed on a query resultsoptions
- Various operation options e.g. AllowStale or MaxOpsPerSecOperation updateByIndex(String indexName, IndexQuery queryToUpdate, ScriptedPatchRequest patch, BulkOperationOptions options)
indexName
- Name of an index to perform a query onqueryToUpdate
- Query that will be performedpatch
- JavaScript patch that will be executed on query resultsoptions
- Various operation options e.g. AllowStale or MaxOpsPerSecFacetResults getFacets(String index, IndexQuery query, String facetSetupDoc)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexfacetSetupDoc
- Document key that contains predefined FacetSetupFacetResults getFacets(String index, IndexQuery query, String facetSetupDoc, int start)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexfacetSetupDoc
- Document key that contains predefined FacetSetupstart
- Number of results that should be skipped. Default: 0FacetResults getFacets(String index, IndexQuery query, String facetSetupDoc, int start, Integer pageSize)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexfacetSetupDoc
- Document key that contains predefined FacetSetupstart
- Number of results that should be skipped. Default: 0pageSize
- Maximum number of results that will be retrieved. Default: null. If set, overrides Facet.MaxResultsFacetResults getFacets(String index, IndexQuery query, List<Facet> facets)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexfacets
- List of facets required to perform a facet queryFacetResults getFacets(String index, IndexQuery query, List<Facet> facets, int start)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexfacets
- List of facets required to perform a facet querystart
- Number of results that should be skipped. Default: 0FacetResults getFacets(String index, IndexQuery query, List<Facet> facets, int start, Integer pageSize)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexfacets
- List of facets required to perform a facet querystart
- Number of results that should be skipped. Default: 0pageSize
- Maximum number of results that will be retrieved. Default: null. If set, overrides Facet.MaxResultsList<JsonDocument> startsWith(String keyPrefix, String matches, int start, int pageSize)
keyPrefix
- Prefix for which documents should be returned e.g. "products/"matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedList<JsonDocument> startsWith(String keyPrefix, String matches, int start, int pageSize, boolean metadataOnly)
keyPrefix
- Prefix for which documents should be returned e.g. "products/"matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedmetadataOnly
- Specifies if only document metadata should be returnedList<JsonDocument> startsWith(String keyPrefix, String matches, int start, int pageSize, boolean metadataOnly, String exclude)
keyPrefix
- Prefix for which documents should be returned e.g. "products/"matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedmetadataOnly
- Specifies if only document metadata should be returnedexclude
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters)List<JsonDocument> startsWith(String keyPrefix, String matches, int start, int pageSize, boolean metadataOnly, String exclude, RavenPagingInformation pagingInformation)
keyPrefix
- Prefix for which documents should be returned e.g. "products/"matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedmetadataOnly
- Specifies if only document metadata should be returnedexclude
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters)pagingInformation
- Used to perform rapid pagination on a server sideList<JsonDocument> startsWith(String keyPrefix, String matches, int start, int pageSize, boolean metadataOnly, String exclude, RavenPagingInformation pagingInformation, String transformer, Map<String,RavenJToken> transformerParameters)
keyPrefix
- Prefix for which documents should be returned e.g. "products/"matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedmetadataOnly
- Specifies if only document metadata should be returnedexclude
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters)pagingInformation
- Used to perform rapid pagination on a server sidetransformer
- Name of a transformer that should be used to transform the resultstransformerParameters
- Parameters that will be passed to transformerList<JsonDocument> startsWith(String keyPrefix, String matches, int start, int pageSize, boolean metadataOnly, String exclude, RavenPagingInformation pagingInformation, String transformer, Map<String,RavenJToken> transformerParameters, String skipAfter)
keyPrefix
- Prefix for which documents should be returned e.g. "products/"matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedmetadataOnly
- Specifies if only document metadata should be returnedexclude
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters)pagingInformation
- Used to perform rapid pagination on a server sidetransformer
- Name of a transformer that should be used to transform the resultstransformerParameters
- Parameters that will be passed to transformerskipAfter
- Skip document fetching until given key is found and return documents after that key (default: null)long seedIdentityFor(String name, long value)
name
- value
- void delete(String key, Etag etag)
key
- The key of a document to be deletedetag
- current document etag, used for concurrency checks (null to skip check)@Deprecated void putAttachment(String key, Etag etag, InputStream data, RavenJObject metadata)
key
- Unique key under which attachment will be storedetag
- Current attachment etag, used for concurrency checks (null to skip check)data
- Attachment datametadata
- Attachment metadata@Deprecated void updateAttachmentMetadata(String key, Etag etag, RavenJObject metadata)
key
- Key under which attachment is storedetag
- Current attachment etag, used for concurrency checks (null to skip check)metadata
- Attachment metadata@Deprecated List<Attachment> getAttachmentHeadersStartingWith(String idPrefix, int start, int pageSize)
idPrefix
- Prefix for which attachments should be returnedstart
- Number of attachments that should be skippedpageSize
- Maximum number of attachments that will be returnedCloseableIterator<RavenJObject> streamQuery(String index, IndexQuery query, Reference<QueryHeaderInformation> queryHeaderInfo)
index
- Name of an index to queryquery
- Query definition containing all information required to query a specified indexqueryHeaderInfo
- Information about performed queryCloseableIterator<RavenJObject> streamDocs()
CloseableIterator<RavenJObject> streamDocs(Etag fromEtag)
fromEtag
- ETag of a document from which stream should start (mutually exclusive with 'startsWith')CloseableIterator<RavenJObject> streamDocs(Etag fromEtag, String startsWith)
fromEtag
- ETag of a document from which stream should start (mutually exclusive with 'startsWith')startsWith
- Prefix for which documents should be streamed (mutually exclusive with 'fromEtag')CloseableIterator<RavenJObject> streamDocs(Etag fromEtag, String startsWith, String matches)
fromEtag
- ETag of a document from which stream should start (mutually exclusive with 'startsWith')startsWith
- Prefix for which documents should be streamed (mutually exclusive with 'fromEtag')matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)CloseableIterator<RavenJObject> streamDocs(Etag fromEtag, String startsWith, String matches, int start)
fromEtag
- ETag of a document from which stream should start (mutually exclusive with 'startsWith')startsWith
- Prefix for which documents should be streamed (mutually exclusive with 'fromEtag')matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedCloseableIterator<RavenJObject> streamDocs(Etag fromEtag, String startsWith, String matches, int start, int pageSize)
fromEtag
- ETag of a document from which stream should start (mutually exclusive with 'startsWith')startsWith
- Prefix for which documents should be streamed (mutually exclusive with 'fromEtag')matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedCloseableIterator<RavenJObject> streamDocs(Etag fromEtag, String startsWith, String matches, int start, int pageSize, String exclude)
fromEtag
- ETag of a document from which stream should start (mutually exclusive with 'startsWith')startsWith
- Prefix for which documents should be streamed (mutually exclusive with 'fromEtag')matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedexclude
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters)CloseableIterator<RavenJObject> streamDocs(Etag fromEtag, String startsWith, String matches, int start, int pageSize, String exclude, RavenPagingInformation pagingInformation)
fromEtag
- ETag of a document from which stream should start (mutually exclusive with 'startsWith')startsWith
- Prefix for which documents should be streamed (mutually exclusive with 'fromEtag')matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedexclude
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters)pagingInformation
- Used to perform rapid pagination on a server sideCloseableIterator<RavenJObject> streamDocs(Etag fromEtag, String startsWith, String matches, int start, int pageSize, String exclude, RavenPagingInformation pagingInformation, String skipAfter)
fromEtag
- ETag of a document from which stream should start (mutually exclusive with 'startsWith')startsWith
- Prefix for which documents should be streamed (mutually exclusive with 'fromEtag')matches
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should be matched ('?' any single character, '*' any characters)start
- Number of documents that should be skippedpageSize
- Maximum number of documents that will be retrievedexclude
- Pipe ('|') separated values for which document keys (after 'keyPrefix') should not be matched ('?' any single character, '*' any characters)pagingInformation
- Used to perform rapid pagination on a server sideskipAfter
- Skip document fetching until given key is found and return documents after that key (default: null)MultiLoadResult moreLikeThis(MoreLikeThisQuery query)
query
- More like this query definition that will be executedFacetResults[] getMultiFacets(FacetQuery[] facetedQueries)
facetedQueries
- List of the faceted queries that will be executed on the server-sideLicensingStatus getLicenseStatus()
LogItem[] getLogs(boolean errorsOnly)
ReplicationStatistics getReplicationInfo()
JsonDocumentMetadata head(String key)
key
- Key of a document to get metadata forLong nextIdentityFor(String name)
name
- String urlFor(String documentKey)
documentKey
- CleanCloseable forceReadFromMaster()
ILowLevelBulkInsertOperation getBulkInsertOperation(BulkInsertOptions options, IDatabaseChanges changes)
options
- changes
- IndexMergeResults getIndexMergeSuggestions()
Boolean tryResolveConflictByUsingRegisteredListeners(OperationMetadata operationMetadata, String key, Etag etag, List<String> conflictedIds, OperationMetadata opUrl)
key
- etag
- conflictedIds
- opUrl
- HttpJsonRequest createRequest(HttpMethods method, String requestUrl)
HttpJsonRequest createRequest(HttpMethods method, String requestUrl, boolean disableRequestCompression, boolean disableAuthentication, Long timeout)
BuildNumber getBuildNumber()
IOException
Copyright © 2016. All Rights Reserved.