You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Ferenc Pápai <fp...@gmail.com> on 2009/11/30 13:39:36 UTC

collection.getCollectionMeta().getLastModifiedTime()

Hello,

collection.getCollectionMeta().getLastModifiedTime()  method returns the
time instant when the last NEW entry has been added to a collection.
It does not cover case when the collection is updated (existent data is
changed).

As a user I'd be more interested when *anything* has been changed in a given
collection.

Is there a reason behind the current behavior?

thanks,
Ferenc

Re: collection.getCollectionMeta().getLastModifiedTime()

Posted by Natalia Shilenkova <ns...@gmail.com>.
Ferenc, 

You are correct, Xindice uses separate collection to store all metadata as XML, but vanilla metadata is pretty small, adding a little bit of information won't affect performance (getCollectionMeta().getLastModifiedTime() will read this document, too). However, if you need modification time often, getting it by some other means, without querying the database, can be a better choice.

Regards,
Natalia

 
On Dec 7, 2009, at 10:28 AM, Ferenc Pápai wrote:

> Hello Natalia,
> 
> I have implemented my own external solution to track last modification time, ..before receiving your email.
> thanks
> 
> I could use custom meta-data for this as you mentioned, but 
> I wasn't 100% sure how metadata mechanism is implemented in Xindice.
> From the code I read and from the Xindice webpage I understood that is is stored as one XML document.
> Thus any change in it should mean loading it in memory(it might be cached) and saved back to disc.
> If metadata contains more data it might have an impact on performance.
> 
> 
> thanks for your time,
> Ferenc
> 
> 
> 
> 
> 
> On Thu, Dec 3, 2009 at 01:42, Natalia Shilenkova <ns...@gmail.com> wrote:
> Well, my guess is that last modified time for collection works similarly to file system directory -- it gets updated whenever an entry added or deleted, but modifying existing file does not change directory last modified time.
> 
> Interestingly enough, right now this behavior is inconsistent -- core.Collection has updateDocument() method that changes collection's last modified time.
> 
> Can you use custom meta data for collection to track the changes?
> 
> Regards,
> Natalia
> 
> On Nov 30, 2009, at 7:39 AM, Ferenc Pápai wrote:
> 
> > Hello,
> >
> > collection.getCollectionMeta().getLastModifiedTime()  method returns the time instant when the last NEW entry has been added to a collection.
> > It does not cover case when the collection is updated (existent data is changed).
> >
> > As a user I'd be more interested when *anything* has been changed in a given collection.
> >
> > Is there a reason behind the current behavior?
> >
> > thanks,
> > Ferenc
> >
> 
> 


Re: collection.getCollectionMeta().getLastModifiedTime()

Posted by Ferenc Pápai <fp...@gmail.com>.
Hello Natalia,

I have implemented my own external solution to track last modification time,
..before receiving your email.
thanks

I could use custom meta-data for this as you mentioned, but
I wasn't 100% sure how metadata mechanism is implemented in Xindice.
>From the code I read and from the Xindice webpage I understood that is is
stored as one XML document.
Thus any change in it should mean loading it in memory(it might be cached)
and saved back to disc.
If metadata contains more data it might have an impact on performance.


thanks for your time,
Ferenc





On Thu, Dec 3, 2009 at 01:42, Natalia Shilenkova <ns...@gmail.com>wrote:

> Well, my guess is that last modified time for collection works similarly to
> file system directory -- it gets updated whenever an entry added or deleted,
> but modifying existing file does not change directory last modified time.
>
> Interestingly enough, right now this behavior is inconsistent --
> core.Collection has updateDocument() method that changes collection's last
> modified time.
>
> Can you use custom meta data for collection to track the changes?
>
> Regards,
> Natalia
>
> On Nov 30, 2009, at 7:39 AM, Ferenc Pápai wrote:
>
> > Hello,
> >
> > collection.getCollectionMeta().getLastModifiedTime()  method returns the
> time instant when the last NEW entry has been added to a collection.
> > It does not cover case when the collection is updated (existent data is
> changed).
> >
> > As a user I'd be more interested when *anything* has been changed in a
> given collection.
> >
> > Is there a reason behind the current behavior?
> >
> > thanks,
> > Ferenc
> >
>
>

Re: collection.getCollectionMeta().getLastModifiedTime()

Posted by Natalia Shilenkova <ns...@gmail.com>.
Well, my guess is that last modified time for collection works similarly to file system directory -- it gets updated whenever an entry added or deleted, but modifying existing file does not change directory last modified time. 

Interestingly enough, right now this behavior is inconsistent -- core.Collection has updateDocument() method that changes collection's last modified time.

Can you use custom meta data for collection to track the changes?

Regards,
Natalia 

On Nov 30, 2009, at 7:39 AM, Ferenc Pápai wrote:

> Hello,
> 
> collection.getCollectionMeta().getLastModifiedTime()  method returns the time instant when the last NEW entry has been added to a collection.
> It does not cover case when the collection is updated (existent data is changed).
> 
> As a user I'd be more interested when *anything* has been changed in a given collection.
> 
> Is there a reason behind the current behavior?
> 
> thanks,
> Ferenc
>