[Xapian-discuss] Trying to get omegascript configured to support multiple dbs

Jim Lynch jim at fayettedigital.com
Sat Jan 7 14:32:18 GMT 2006


Olly Betts wrote:

>On Fri, Jan 06, 2006 at 11:40:52AM -0500, Jim Lynch wrote:
>  
>
>>Well it does sort of.  Two problems.  It always looks for the default 
>>even if I've got it unchecked.  The other problem is if I have both of 
>>them checked, when I return from the query, it resets the test 
>>checkbox.  I suspect that's because the cgi parameter, DB is a list and 
>>I don't know how to say "if tst.db is in the DB list, then ...".
>>    
>>
>
>Note that $cgi{DB} will pick an arbitrary DB parameter if there's more
>than one.  You want $cgilist{DB} which will return all the values, as
>a tab-separated list.
>
>But there's no obvious way to see if a list contains a particular value
>which is what you then need to be able to do.  Something like
>$find{LIST,STRING} to return the offset into the list, or the empty
>string if not present.  I'll see if I can manage to implement that
>before the next release.
>
>A related issue to bear in mind is what happens if there's no DB
>parameter (in which case Omega will search the database "default").
>
>Cheers,
>    Olly
>
>
>
>  
>
Perhaps, but here is the url generated when I check only the test DB 
selection:

http://localhost/cgi-bin/omega?P=yifan+ram&DB=tst.db&DEFAULTOP=or&DB=tst.db%2Fdefault&FMT=query&xP=yifan.ram.&xDB=tst.db%2Fdefault&xFILTERS=--O
Something in there is doing something strange.  There are two DB 
parameters and they both list both DBs.  It's obvious from the output it 
is searching the default DB anyway from the data that was found. 

Thanks,
Jim.




More information about the Xapian-discuss mailing list