[Xapian-discuss] [Scriptindex] Exception: Key too long

Arjen van der Meijden arjen at glas.its.tudelft.nl
Wed Jul 7 12:47:52 BST 2004

On 7-7-2004 13:26, Timan Rebel wrote:

>>Are you sure there are spaces in between?
>>Anyway, the exception is about a single (unsplittable) term that is much
>>longer than 252 characters.
> I am sure it are all spaces BUT I formatted it like this:
> users=1 2 3 4 5 6 7 8 9 ... n
> The exception disappears when turning it into:
> users=1
> users=2
> ..
> users=n
> Is this the correct way of setting Boolean values?

Ah, I see the problem. You're mixing boolean-indexing with non-boolean 
usage. No, the users=1 ... n is not the correct way to index booleans, 
the entire string will be the boolean value (and therefore in some cases 
way too long).
The users=1, users=2 etc way is correct to specify multiple boolean values.

>>>I would like to search for userids, but a normal field=users index=XU
>>>not seem to work for me. After mapping user to XU in my Omega template,
>>>searching for user:1 does not return results.

I reread this now. field=users index=XU should be working and mappable 
in the Omega-template. Then, you should be able to map that and to 
search for it using a user:...-like statement as part of your searchquery.
But your last scriptindex (the one you sent in your e-mail) contained 
boolean=XU, not index=XU.

> I did.. title: works, just like start:
> Anyway, it is not important when I get the Boolean method working.

When you index them as booleans, you cannot use them in the searchquery 
itself, but you need to specify (multiple) B=XU{uid}-like cgi-values. On 
the commandline, it'd be something like this:
./omega P="your query here" B=XU1 B=XU4

Here uid 1 and 4 would be OR-ed.

Best regards,


PS, don't forget to reindex your DB when you want to change the 

More information about the Xapian-discuss mailing list