[Xapian-discuss] Processing the Xapian results

Arjen van der Meijden acmmailing at tweakers.net
Mon Oct 1 14:16:51 BST 2007


Afaik you pre-process your form-input data using php?

In that case you can construct a list of all forums a user is allowed to 
see. That list can be easily combined with the forums the user wants to 
include in the search.

On the indexing-site you can add a boolean-term indicating the topic's 
forumid.

And in the search-code you can than add a boolean-OR-construction for 
that list of forums a user may see. (in SQL-terms you'd add something 
like: AND topic.forumId IN (f1, f2, f3) which you'll have to expand to:
AND (topic.forumId = f1 OR topic.forumId = f2 OR topic.forumId = f3)).

Best regards,

Arjen

Simon de la Court wrote:
> Dear Xapian list members,
> 
> My first post ever on this list, so please don't go hard on me ;)
> 
> I have recently started to work with Xapian, I run a forum for an 
> opensource game project, and we have trouble with searching in our 
> topics. MySQLs fulltext does not give the right results, very easy to 
> setup though, and Google did not index older topics. So I read the 
> xapian docs and it looked pretty cool to me, a lot more precise than 
> fulltext and can index everything I want.
> 
> But I've got a problem, indexing is easy (well, not entirely, instead of 
> indexing single messages I have to index whole topics). Not everybody is 
> allowed to see every topic. And topics are in different subfora. And I 
> have not yet found a way to get Xapian showing me only the topics I 
> want, so only the topics for one subforum (if asked) and only the topics 
> my visitor is allowed to see. Xapian just gives me the results of all 
> the results found.
> 
> The other option for me is to process these results in PHP, but that 
> would take quite some processing power, and would require caching the 
> results, because I want these to be spread over several pages.
> 
> Has anyone here done a similar implementation of Xapian? I hope you can 
> help me out.
> 
> Thanks in advance and greetings,
> 
> Simon de la Court
> 
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
> 



More information about the Xapian-discuss mailing list