On Sat, Apr 28, 2007 at 09:25:59PM +0200, M.J. van der Veen
wrote:> I'm unsure how to use the xP and xDB parameters.
They're of use if you want Omega to automatically reset to the first
page of hits when the user changes the query or the database. If you
don't want that functionality, you don't need to set them.
> For xDB is always use the same database as the DB parameter.
> For xP I use the value I get from the previous query result:
> <previous>$html{$queryterms}</previous
> and I also tried:
> <previous>$html{$list{$queryterms,,.,.}}</previous>
>
> in which I use the value from the XML result as a value of a FORM
> field with name=xP.
> Both examples are from the xapian template examples in de subversion
> repository.
>
> If I use either of the two above variables in the xP variable, then I
> get the same results from omega for each page: #=1, #=2, #=3.
Omega apparently thinks that the values you're passing for xDB and xP
don't correspond with the values in DB and P. It's rather hard to
diagnose why without a concrete example, as this has always worked OK
for me. It might be this is an issue with XML escaping and/or
unescaping.
> If I skip the xP and xDB variables from the query then the pages work,
> but the number of results change as I change pages.
That's entirely unconnected - the number of results is just an estimate
based on the information the matcher sees while doing the minimum work
required to get the results you ask for. To find hits 11-20 requires
a little more work than just finding 1-10, so you can get a different
(and generally slightly more accurate) estimate.
If you want to avoid this effect, see the MINHITS CGI parameter. But
setting it does mean Xapian will need to do a bit more work.
Cheers,
Olly