[aur-dev] JSON - search options

eliott eliott at cactuswax.net
Sat Apr 5 05:14:16 EDT 2008


On 4/5/08, Piotr Husiatyński <phusiatynski at gmail.com> wrote:
> I was wondering about searching with more than one argument. For example, if I
>  want to find PKGBUILDs that name contain `pac` and `man` words, I have to
>  search for all `pac` PKGBUILDs and then, grep that to show only those with
>  `man`.
>  But it would be easyier for AUR, to get more complex SQL question, and less
>  data will be transfered.
>
>  What do you think about it?

My original implementation used mysql full text searching (type
boolean if I recall).
http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html

I don't remember why it was changed to `like` style matching... maybe
because it required adding a full text search index, or because the
load difference was an unknown quantity with full text searches. I
don't recall offhand.

It would have allowed queries like..
    +pac +man -aur

I think some testing would need to be done to determine the 'expense'
of full text indexing with regard to the aur. Note also, that I think
the default min word length for full text queries is 4 characters. I
believe this is a tunable, but I really wouldn't recommend going lower
than minlength of 3 probably.

More info here on fulltext searching with mysql:
http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html


More information about the aur-dev mailing list