[Xapian-discuss] locate and omega: how to index file names?

James Aylett james-xapian at tartarus.org
Tue May 6 11:55:24 BST 2008


On Tue, May 06, 2008 at 12:31:13PM +0200, tindal wrote:

> url=/full/url/of/the/file.txt
> path=
> =full
> =url
> =of
> =the
> name=file
> format=txt
> size=436110
> modtime=2008-05-06

modtime should be a Unix timestamp (number of seconds since midnight,
1st January 1970).

> omega reads the size wrong, as it says, in this example, "436 bytes": why?

That's not obvious to me. If you pull out the document data for that
document, what does it look like?

> for the search I'd like to be able to choose between the "default" 
> database (made with omindex) and my "filelist" database, but I end up 
> searching both databases
> 
> the relevant code in the template is:
> <INPUT TYPE=radio NAME="DB" VALUE="default" 
> $if{$eq{$dbname,default},CHECKED}>Search the contents<br>
> <INPUT TYPE=radio NAME="DB" VALUE="filelist" 
> $if{$eq{$dbname,filelist},CHECKED}>Search the names<br>
> 
> I find that after the first change of database $dbname contains 
> "default/filelist" or "filelist/default": how can I reset it?

Are you setting it elsewhere? eg, do you have a hidden field which
contains the previous value?

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list