On Thursday 19 Dec 2013 18:20:59 François K. wrote: > > I'm not sure I get it properly. > I clearly understand that the URL can't be used as identifier since it can > change. > > But if SQLite is used to map the URL and the id, it means that we'll have to > update the mapping each time the file URL changes, right ? Then what value > does the mapping add ? >
We need to update the url each time the url changes, but its identifier stays the same. Eg - /home/vishesh/a = file:5. If this file is moved/renamed, the identifier file:5 does not need to be changed. > Wouldn't it be possible to : > * drop SQLite, > * build a unique identifier upon the file URL (md5, UUID, or whatever > suitable) and update it directly in Xapian whenever the file URL changes ? > > Also, wouldn't it be possible to use the inode number of the file as id ? If > I remember well, the inode number isn't supposed to change when you mv a > file (as long as it remains on the same filesystem). I'm not really sure > about this, I'm really far from being a FS expert ! Just thought it might > be an elegant solution. > The main problem is two way mapping. Here is what we need - 1. Given a url, return a unique identifier 2. Given a unique identifier, return the url inodes satisfy (1), but not (2). > > Okay, I'll try to take some time to have a look at it. And maybe take some > more to dive into the code and see if I can give some feedback about the > whole project. I certainly don't have the necessary knowledge to have > something interesting to say, but, yep, we'll see. I'm looking forward to it. -- Vishesh Handa >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<