Hi, I have a directory which has thousands of subdirectories (/dir_top/dir_sub[n]). I am trying to use omindex to index a few of the subdirectories to see if it works before I spend the time to index everything. So, I do: omindex --db /var/lib/omega/data/default --url /top /top_dir sub_dir[i] omindex --db /var/lib/omega/data/default --url /top /top_dir sub_dir[j] However, after the second command is done, it deletes the results from the first index, so all that's left is an index for sub_dir[j]. My impression from docs/overview.txt (product - large example) was that the above commands should each add on to the existing index, but I guess that's not the case. Is there a way to incrementally index different subdirectories under the same tree? I also just tried the following, but that did the same thing: omindex --db /var/lib/omega/data/default --url /top/sub_dir[i] \ /top_dir/sub_dir[i] omindex --db /var/lib/omega/data/default --url /top/sub_dir[j] \ /top_dir/sub_dir[j] Many thanks for any advice/pointers. -- Arshavir Grigorian Systems Administrator/Engineer
Hi Arshavir, Which version of Omega are you using? It is indeed the normal behaviour to add to the index rather than overwrite it. But afaik older versions (pre 0.8.x?) did it the other way around. The omindex-tool is pretty simple to understand I think, from what I read from its main-method it really shouldn't overwrite the database when it is not called with -o or --overwrite. http://svn.xapian.org/trunk/xapian-applications/omega/omindex.cc?view=markup Best regards, Arjen On 19-7-2005 22:16, Arshavir Grigorian wrote:> Hi, > > I have a directory which has thousands of subdirectories > > (/dir_top/dir_sub[n]). > > I am trying to use omindex to index a few of the subdirectories to see > if it works before I spend the time to index everything. So, I do: > > omindex --db /var/lib/omega/data/default --url /top /top_dir sub_dir[i] > omindex --db /var/lib/omega/data/default --url /top /top_dir sub_dir[j] > > However, after the second command is done, it deletes the results from > the first index, so all that's left is an index for sub_dir[j]. My > impression from docs/overview.txt (product - large example) was that the > above commands should each add on to the existing index, but I guess > that's not the case. > Is there a way to incrementally index different subdirectories under the > same tree? > > I also just tried the following, but that did the same thing: > > omindex --db /var/lib/omega/data/default --url /top/sub_dir[i] \ > /top_dir/sub_dir[i] > > omindex --db /var/lib/omega/data/default --url /top/sub_dir[j] \ > /top_dir/sub_dir[j] > > > Many thanks for any advice/pointers. > > >
On Tue, 2005-07-19 at 16:16 -0400, Arshavir Grigorian wrote:> Is there a way to incrementally index different subdirectories under the > same tree?Yes, omindex should do this by default. The behaviour was changed with the 0.8.0 release of omega (before this, the default was to overwrite, as you describe). Are you sure you're using an up-to-date copy of Omega? The latest release is 0.9.2 - run "omindex --version" to check which version you're using. -- Richard Boulton <richard@tartarus.org>
>Cool, thanks. It wasn't what I thought it might be, but that did push>> me to check the source code :-) . >> >> Basically, there's a bug in omindex (effectively) that means that >> incremental operation currently isn't supported, despite what the >> overview document says. >> >> I've attached an untested patch which should help here. You have to >> pass a new command line switch, -p, to get the behaviour you want >> (docs updated in the patch also). The patch seems to have worked fine. Many thanks. If you would like me to do any more tests, do let me know. Arshavir