On Thu, Jul 29, 2010 at 17:06, Ayende Rahien <aye...@ayende.com> wrote: > Huh? > Why not just session.Load<...>("doc/id") != null
> On Thu, Jul 29, 2010 at 10:30 PM, slav <slav....@gmail.com> wrote:
>> This is probably a simple thing, but I can't figure it out.
>> Is there an easy way to check that a document exists by document ID >> without actually loading it? Create an index by id and query it?
>> On a side note, how would I create an index by document id? I need to >> index by metadata, right? I've seen discussion, but not concrete >> example.
> -- > Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1 > 425.329.3471
> On Thu, Jul 29, 2010 at 17:06, Ayende Rahien <aye...@ayende.com> wrote:
>> Huh? >> Why not just session.Load<...>("doc/id") != null
>> On Thu, Jul 29, 2010 at 10:30 PM, slav <slav....@gmail.com> wrote:
>>> This is probably a simple thing, but I can't figure it out.
>>> Is there an easy way to check that a document exists by document ID >>> without actually loading it? Create an index by id and query it?
>>> On a side note, how would I create an index by document id? I need to >>> index by metadata, right? I've seen discussion, but not concrete >>> example.
I imagine the cost of getting a very large document that we might just
want to apply a PATCH to would be one possible scenario. In this case
we simply want to confirm that the document exists before trying to
patch in a small addition/change.
An example might be a site that has large documents with attachments,
and allows comments. Lets also assume that documents are regularly
moved off to an Archive (maybe a different DB, or different document
type). If someone tries to add a comment, I need to check that it
still exists as Active, and if so patch it there, otherwise patch it
in the Archive. Not the best example, but it demonstrates some need.
Sure you could argue that it's not the best design, or could be worked
around in different ways, but it'd be nice if the system supported an
EXISTS operation, or something.
On Jul 30, 6:10 am, Ayende Rahien <aye...@ayende.com> wrote:
> On Thu, Jul 29, 2010 at 11:07 PM, Daniel Cazzulino <dan...@cazzulino.com>wrote:
> > > without actually loading it
> > ;)
> > /kzu
> > --
> > Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1
> > 425.329.3471
> > On Thu, Jul 29, 2010 at 17:06, Ayende Rahien <aye...@ayende.com> wrote:
> >> Huh?
> >> Why not just session.Load<...>("doc/id") != null
> >> On Thu, Jul 29, 2010 at 10:30 PM, slav <slav....@gmail.com> wrote:
> >>> This is probably a simple thing, but I can't figure it out.
> >>> Is there an easy way to check that a document exists by document ID
> >>> without actually loading it? Create an index by id and query it?
> >>> On a side note, how would I create an index by document id? I need to
> >>> index by metadata, right? I've seen discussion, but not concrete
> >>> example.
> I imagine the cost of getting a very large document that we might just > want to apply a PATCH to would be one possible scenario. In this case > we simply want to confirm that the document exists before trying to > patch in a small addition/change.
> An example might be a site that has large documents with attachments, > and allows comments. Lets also assume that documents are regularly > moved off to an Archive (maybe a different DB, or different document > type). If someone tries to add a comment, I need to check that it > still exists as Active, and if so patch it there, otherwise patch it > in the Archive. Not the best example, but it demonstrates some need. > Sure you could argue that it's not the best design, or could be worked > around in different ways, but it'd be nice if the system supported an > EXISTS operation, or something.
> On Jul 30, 6:10 am, Ayende Rahien <aye...@ayende.com> wrote: > > What is _the point_.
> > On Thu, Jul 29, 2010 at 11:07 PM, Daniel Cazzulino <dan...@cazzulino.com > >wrote:
> > > > without actually loading it
> > > ;)
> > > /kzu
> > > -- > > > Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1 > > > 425.329.3471
> > > On Thu, Jul 29, 2010 at 17:06, Ayende Rahien <aye...@ayende.com> > wrote:
> > >> Huh? > > >> Why not just session.Load<...>("doc/id") != null
> > >> On Thu, Jul 29, 2010 at 10:30 PM, slav <slav....@gmail.com> wrote:
> > >>> This is probably a simple thing, but I can't figure it out.
> > >>> Is there an easy way to check that a document exists by document ID > > >>> without actually loading it? Create an index by id and query it?
> > >>> On a side note, how would I create an index by document id? I need to > > >>> index by metadata, right? I've seen discussion, but not concrete > > >>> example.
> On Fri, Jul 30, 2010 at 2:43 AM, Timothy Walters <tim.walt...@gmail.com >wrote:
>> I imagine the cost of getting a very large document that we might just >> want to apply a PATCH to would be one possible scenario. In this case >> we simply want to confirm that the document exists before trying to >> patch in a small addition/change.
>> An example might be a site that has large documents with attachments, >> and allows comments. Lets also assume that documents are regularly >> moved off to an Archive (maybe a different DB, or different document >> type). If someone tries to add a comment, I need to check that it >> still exists as Active, and if so patch it there, otherwise patch it >> in the Archive. Not the best example, but it demonstrates some need. >> Sure you could argue that it's not the best design, or could be worked >> around in different ways, but it'd be nice if the system supported an >> EXISTS operation, or something.
>> On Jul 30, 6:10 am, Ayende Rahien <aye...@ayende.com> wrote: >> > What is _the point_.
>> > On Thu, Jul 29, 2010 at 11:07 PM, Daniel Cazzulino <
>> > > -- >> > > Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1 >> > > 425.329.3471
>> > > On Thu, Jul 29, 2010 at 17:06, Ayende Rahien <aye...@ayende.com> >> wrote:
>> > >> Huh? >> > >> Why not just session.Load<...>("doc/id") != null
>> > >> On Thu, Jul 29, 2010 at 10:30 PM, slav <slav....@gmail.com> wrote:
>> > >>> This is probably a simple thing, but I can't figure it out.
>> > >>> Is there an easy way to check that a document exists by document ID >> > >>> without actually loading it? Create an index by id and query it?
>> > >>> On a side note, how would I create an index by document id? I need to >> > >>> index by metadata, right? I've seen discussion, but not concrete >> > >>> example.
In my specific case orders come into my system from 3rd party. Each
order must have unique ID. If I save all orders before forwarding them
to be handled somewhere else.
In theory order with the same ID should come in only once. In practice
if it comes in again I need to notify the 3rd party so that they could
look into it.
So, each time an order comes in, I'll try to load it to see if it
exists. Most of the time I'll get null and things will go normal.
It doesn't really matter in this case if there's no way to check for
the doc existence by ID. Most of the time I won't be loading the
document anyway so no overhead.
I was just curious, since I'm still learning the system.
> On Thu, Jul 29, 2010 at 11:07 PM, Daniel Cazzulino <dan...@cazzulino.com>wrote:
> > > without actually loading it
> > ;)
> > /kzu
> > --
> > Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1
> > 425.329.3471
> > On Thu, Jul 29, 2010 at 17:06, Ayende Rahien <aye...@ayende.com> wrote:
> >> Huh?
> >> Why not just session.Load<...>("doc/id") != null
> >> On Thu, Jul 29, 2010 at 10:30 PM, slav <slav....@gmail.com> wrote:
> >>> This is probably a simple thing, but I can't figure it out.
> >>> Is there an easy way to check that a document exists by document ID
> >>> without actually loading it? Create an index by id and query it?
> >>> On a side note, how would I create an index by document id? I need to
> >>> index by metadata, right? I've seen discussion, but not concrete
> >>> example.
On Fri, Jul 30, 2010 at 4:52 AM, slav <slav....@gmail.com> wrote: > In my specific case orders come into my system from 3rd party. Each > order must have unique ID. If I save all orders before forwarding them > to be handled somewhere else. > In theory order with the same ID should come in only once. In practice > if it comes in again I need to notify the 3rd party so that they could > look into it. > So, each time an order comes in, I'll try to load it to see if it > exists. Most of the time I'll get null and things will go normal.
> It doesn't really matter in this case if there's no way to check for > the doc existence by ID. Most of the time I won't be loading the > document anyway so no overhead. > I was just curious, since I'm still learning the system.
> On Jul 29, 4:10 pm, Ayende Rahien <aye...@ayende.com> wrote: > > What is _the point_.
> > On Thu, Jul 29, 2010 at 11:07 PM, Daniel Cazzulino <dan...@cazzulino.com > >wrote:
> > > > without actually loading it
> > > ;)
> > > /kzu
> > > -- > > > Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1 > > > 425.329.3471
> > > On Thu, Jul 29, 2010 at 17:06, Ayende Rahien <aye...@ayende.com> > wrote:
> > >> Huh? > > >> Why not just session.Load<...>("doc/id") != null
> > >> On Thu, Jul 29, 2010 at 10:30 PM, slav <slav....@gmail.com> wrote:
> > >>> This is probably a simple thing, but I can't figure it out.
> > >>> Is there an easy way to check that a document exists by document ID > > >>> without actually loading it? Create an index by id and query it?
> > >>> On a side note, how would I create an index by document id? I need to > > >>> index by metadata, right? I've seen discussion, but not concrete > > >>> example.
On Sun, Dec 25, 2011 at 12:01 PM, Damian Hickey <dhic...@gmail.com> wrote: > (Sorry for bumping an old thread but couldn't find a more recent > discussion)
> Is this funtionality exposed via the Client API?
...the documentMetadata.LastModified is ignored / omitted. Was this intentional? This means the metadata when using DocumentStoreEmbedded had a LastModied value, but DocumentStoreServer did not.
On Tue, Dec 27, 2011 at 3:50 PM, Damian Hickey <dhic...@gmail.com> wrote: > I have it implemented and tested except for one problem.. I wasn't > getting a Last-Modified value when using DocumentStoreServer.
> In Raven.Database.Server.Responders.Document.Head(), last line:
> ...the documentMetadata.LastModified is ignored / omitted. Was this > intentional? This means the metadata when using DocumentStoreEmbedded had a > LastModied value, but DocumentStoreServer did not.
I've already signed and submitted a CLA for a previous contribution. Do I need to do so again? On Dec 27, 2011 2:04 p.m., "Oren Eini (Ayende Rahien)" <aye...@ayende.com> wrote:
>> ...the documentMetadata.LastModified is ignored / omitted. Was this >> intentional? This means the metadata when using DocumentStoreEmbedded had a >> LastModied value, but DocumentStoreServer did not.
On Tue, Dec 27, 2011 at 6:22 PM, Damian Hickey <dhic...@gmail.com> wrote: > I've already signed and submitted a CLA for a previous contribution. Do I > need to do so again? > On Dec 27, 2011 2:04 p.m., "Oren Eini (Ayende Rahien)" <aye...@ayende.com> > wrote:
>>> ...the documentMetadata.LastModified is ignored / omitted. Was this >>> intentional? This means the metadata when using DocumentStoreEmbedded had a >>> LastModied value, but DocumentStoreServer did not.
aye...@ayende.com> wrote: > No, I didn't check that, thanks, I'll look at that shortly.
> On Tue, Dec 27, 2011 at 6:22 PM, Damian Hickey <dhic...@gmail.com> wrote:
>> I've already signed and submitted a CLA for a previous contribution. Do I >> need to do so again? >> On Dec 27, 2011 2:04 p.m., "Oren Eini (Ayende Rahien)" < >> aye...@ayende.com> wrote:
>>>> ...the documentMetadata.LastModified is ignored / omitted. Was this >>>> intentional? This means the metadata when using DocumentStoreEmbedded had a >>>> LastModied value, but DocumentStoreServer did not.