I have a CMS that I want to add search functionality to. There are items that I want to index, but want to exclude from the results conditionally.
For example, there is content that is in a 开发者_开发知识库member's only area that I want to include in the results if a member is logged in.
How can something like this be accomplished with Zend Search Lucene?
you can add Subquery to query. You can use:
Zend_Search_Lucene_Search_Query_Boolean
or
Zend_Search_Lucene_Search_Query_Term
or
Zend_Search_Lucene_Search_Query_Range
refs: http://framework.zend.com/manual/en/zend.search.lucene.query-language.html
精彩评论