开发者

Zend Search Lucene Document - Conditional Searching

开发者 https://www.devze.com 2023-04-12 01:28 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消