Jason Tackaberry wrote:
> On Mon, 2006-03-27 at 11:31 +0200, Dirk Meyer wrote:
>> Again, what is case sensitive and what not? Only keyword searches?
>
> By default, queries are case-sensitive except for keyword searches.
>
> If you want to allow case-insensitive searches on attributes then
> specify ATTR_IGNORE_CASE in the flags for that attribute definition.
> e.g.
>
> db.register_object_type_attrs("video", name = (str, ATTR_KEYWORDS), 
>       director = (unicode, ATTR_SEARCHABLE | ATTR_IGNORE_CASE))
>
> db.register_object_type_attrs("music", name = (str, ATTR_KEYWORDS), 
>      artist = (unicode, ATTR_INDEXED | ATTR_IGNORE_CASE))
>
> (Note that both ATTR_KEYWORDS and ATTR_INDEXED imply ATTR_SEARCHABLE.)
>
> Right now there's a bit of a NYI in kaa.db: if you modify the flags or
> type of an existing attribute, it doesn't actually do anything.  It
> should rebuild the db but it doesn't.  So if you add ATTR_IGNORE_CASE to
> your code you'll need to delete the db.

OK, thanks. Maybe you can check all ATTR settings in server.py and
db.py? You know better what the attributes do.

>> What did you do? Please give me the full list of commands you did
>> after you created the db. This looks like smething in the db with a
>> missing parent. That should not happen. And do you have softlinks
>> somewhere in that test case?
>
> I did a dirname=/data/mp3 and it began indexing all my mp3s recursively.
> Then I did a keyword search as it was building and noticed that for any
> keyword that should exist, it raised this exception.  For keywords that
> don't return results, it didn't.
>
> It could be something I broke in kaa.db.  After work today I'll see if I
> can reproduce this again, and I'll poke through the source and see if I
> can explain it.

Try again with a new db. And read "Hidden features" in the REAMDE :)
The hidden features are only a hack to help developing but I need them
since I removed the "auto add directory"-stuff from the
crawler. Inotify is also integrated.

>> I don't see a reason in bin/beacon why not. Strange. But the search
>> parameters have to come after all parameter (a python getopt
>> thing). So it is beacon --search --monitor keywords=foo.
>
> Yeah I was trying beacon --search keywords=foo --monitor.  I guess that
> won't work.

No, that is a bug / missing feature in Python getopt. But I don't
think it is important, the client part of the beacon script is more or
less only for testing.


Dischi

-- 
Freedom of speech is wonderful - right up there with the freedom not to
listen.

Attachment: pgpCBljWftlFU.pgp
Description: PGP signature

Reply via email to