xapian at catcons.co.uk
2011-Apr-27 12:30 UTC
[Xapian-discuss] Omindex: what are the default numbered indexes?
> -----Original Message----- > Date: Tue, 26 Apr 2011 13:35:20 +0100 > From: James Aylett <james-xapian at tartarus.org> > Subject: Re: [Xapian-discuss] Omindex: what are the default numbered > indexes? > To: <xapian at catcons.co.uk> <xapian at catcons.co.uk> > Cc: 'Xapian Discussion' <xapian-discuss at lists.xapian.org> > Message-ID: <A47D1904-59F6-4AD1-8700-45AA719F56DD at tartarus.org> > Content-Type: text/plain; charset=us-ascii > > On 26 Apr 2011, at 13:12, <xapian at catcons.co.uk> > <xapian at catcons.co.uk> wrote: >[snip]> Within omega, values 0, 1 and 2 are reserved (for last > modification time, 16 byte MD5 checksum and filesize in > bytes, respectively). Anything other than that can be used. > I'm not convinced this is documented anywhere useful; I've > added a note to the missing documentation wiki page about this. > > > Is there a way to interrogate the index database? Are the > default numbered > > indexes described in the documentation? > > > You can use delve to interrogate Xapian databases, such as: > > $ delve -V -r <docid> <path-to-database> > > which will display the values (and also the terms) for that document. > > J > > -- > James Aylett > talktorex.co.uk - xapian.org - devfort.comHello James :-) Thanks for correcting my terminology. The info about the reserved use of values 0-2 was exactly what was needed allowing a perfectly functional solution but one that creates two "&COLLAPSE="s in the URL; maybe the other should be an "&xCOLLAPSE="? First the solution in case it helps someone: root at CW8vDS:/var/lib/omega/templates# cat inc/duplicatesdropbox <SELECT NAME=COLLAPSE> $if{$eq{$cgi{COLLAPSE},}, <OPTION VALUE="" SELECTED>Yes <OPTION VALUE=1>No , <OPTION VALUE="">Yes <OPTION VALUE=1 SELECTED>No } </SELECT> root at CW8vDS:/var/lib/omega/templates# diff -u docoll.org docoll --- docoll.org 2011-04-24 13:27:50.435175754 +0530 +++ docoll 2011-04-27 16:48:06.625867916 +0530 @@ -55,6 +55,7 @@ Dates (YYYYMMDD). Start: <INPUT NAME=START VALUE="$cgi{START}" SIZE=8> End: <INPUT NAME=END VALUE="$cgi{END}" SIZE=8> File type: $include{inc/filenamedropbox} +Duplicates: $include{inc/duplicatesdropbox} $if{$opt{topterms}, <div title="Suggested terms to add to your query" style="text-align:left;background:#cfc;border:1px solid green;padding:2px;font:11px verdana$. arial$. helvetica$. sans-serif;"> With the above in use, after searching for "meet" initially with the default duplicates Yes, then choosing No and clicking Search then choosing Yes and clicking Search the URL displayed was http://192.168.168.51/cgi-bin/omega?P=meet&DEFAULTOP=or&START=&END=&B=&COLLA PSE=&DB=docoll&FMT=docoll&COLLAPSE=1&xP=Zmeet&xDB=docoll&xFILTERS=--O-1. The second &COLLAPSE does not seem to affect what Omega displays ... ? Is the final "-1" on the &xFILTERS normal? Best Charles
James Aylett
2011-Apr-27 21:11 UTC
[Xapian-discuss] Omindex: what are the default numbered indexes?
On 27 Apr 2011, at 13:30, <xapian at catcons.co.uk> <xapian at catcons.co.uk> wrote:> The second &COLLAPSE does not seem to affect what Omega displays ... ?In the case of COLLAPSE it may only use the first one. I'd guess there's something else in your omegascript template generating the first one that you should kill. J -- James Aylett talktorex.co.uk - xapian.org - devfort.com - spacelog.org
Olly Betts
2011-May-09 22:17 UTC
[Xapian-discuss] Omindex: what are the default numbered indexes?
On Wed, Apr 27, 2011 at 06:00:59PM +0530, xapian at catcons.co.uk wrote:> http://192.168.168.51/cgi-bin/omega?P=meet&DEFAULTOP=or&START=&END=&B=&COLLA > PSE=&DB=docoll&FMT=docoll&COLLAPSE=1&xP=Zmeet&xDB=docoll&xFILTERS=--O-1. > The second &COLLAPSE does not seem to affect what Omega displays ... ?If there are multiple instances of a parameter which can only meaningfully have one value, then it's essentially arbitrary which value is used. And collapsing on multiple values at the same time isn't supported.> Is the final "-1" on the &xFILTERS normal?Yes - this means that the previous search had a collapse on value 1. We track such things so we know when to force the first page of search results - if you're on page 6 and change the collapse setting, it doesn't make much sense to stay on page 6. Cheers, Olly