开发者

Reading directly from the Doctrine Searchable index table

开发者 https://www.devze.com 2022-12-25 05:59 出处:网络
I\'ve got a Doctrine table with the Searchable behavior enabled. Whenever a record is created, an index is made in another table. I have a model called Entry and the behavior automatically created th

I've got a Doctrine table with the Searchable behavior enabled.

Whenever a record is created, an index is made in another table. I have a model called Entry and the behavior automatically created the table entry_index.

My question now is: How can I - without using the search(...) methods 开发者_StackOverflow社区of my model use the data from this table?

I want to create a tag cloud of the words most used, and the data in the index table is exactly what I need.


Doctrine generates table EntryIndex that should be available from Doctrine::getTable('EntryIndex').

Additionally Entry has EntryIndex relation that refers to index table and EntryIndex has Entry relation. The relation is standard one-to-many (1-n) relation between Entry and EntryIndex.

0

精彩评论

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