In RavenDB can I retrieve all document Id's for a document type -


my scenario: have few thousand documents want alter (rename & add properties), have written a patchrequest alter document takes document id.

i'm looking way list of document id's documents of specific type, ideas?

if possible i'd avoid retrieving document server.

i have written patchrequest alter document takes document id.

no, .patch takes document id, not patchrequest.

since want update whole swath of documents, you'll want use .updatebyindex method:

documentstore.databasecommands.updatebyindex("indexname",       new indexquery {query = "title:ravendb"},       new []       {          new patchrequest          {             type = patchcommandtype.add,             name = "comments",             value = "new automatic comment added programmatically"          }       }, allowstale: false); 

this allow patch documents matching index. index can whatever please.

for more information, see set-based operations in raven docs.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -