Jim
2007-Feb-13 18:19 UTC
[Xapian-discuss] Using scriptindex with omega and date searches.
I was attempting to incorporate the START and END cgi parameters to omega to limit my query but it wasn't working. I noticed that the generated query consisted of a bunch of filter terms such as: M200110 OR M200111 OR D20011201 OR D20011202 however when I went into godmode I saw the D terms but no M terms. I reasoned that omnindex must generate something to put in the DB like month: field=month index=M I didn't find that documented anywhere, but when I added that to my index file and added a term such as month=200110 to each document, the search with START and END seemed to work. Am I correct that I had to do it myself? Or was there some way I could have modified the index to automatically generate the M terms? If the former, I'm going to write it up and put it on the wiki 'cause it's really not as well documented as I would have liked. Perhaps a note in the cgi discussion near the START, END and SPAN that says these are only valid if you use omindex would be helpful. Jim.
Olly Betts
2007-Feb-13 18:33 UTC
[Xapian-discuss] Using scriptindex with omega and date searches.
On Tue, Feb 13, 2007 at 01:19:12PM -0500, Jim wrote:> Am I correct that I had to do it myself? Or was there some way I could > have modified the index to automatically generate the M terms?Just use the scriptindex "date" action - it can produce the required terms from either a Unix time_t value or a string of the format YYYYMMDD. It's documented in docs/scriptindex.txt. Cheers, Olly