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
Post a Comment