[Xapian-discuss] Filtering documents by permissions in PHP

Víťa Plšek plsek at qcm.cz
Wed Jul 15 09:16:27 BST 2009


Hello all

I have small problems with filtering document by permissions in PHP.

I have learn that best way is to use MatchDeciders, but I realised that
there arent directors for PHP in SWIG so I cant subclass it and define
my own accept method which would solve my problem.

I have installed Xapian version 1.1.1 from SVN because there is wrapped
XapianValueSetMatchDecider which allows me to filter document's value by
given array of values.

But in this case I have to prepare all ids which should or shouldn't be
showed in result before search and it could take a long time and
dramatically increase search latency.

Is somehow possible to subclass Deciders or overide theirs accept method
or define some callback in PHP?

Has someone solved this problem? Or how do you filter documents by
permissions?

I will appreciate all you advices or comments.
Thank you very much.
Winsik



More information about the Xapian-discuss mailing list