diff options
Diffstat (limited to 'db/item.php')
-rw-r--r-- | db/item.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/item.php b/db/item.php index 24cc45de1..8c555db86 100644 --- a/db/item.php +++ b/db/item.php @@ -57,6 +57,7 @@ class Item extends Entity implements IAPI, \JsonSerializable { protected $feedId; protected $status = 0; protected $lastModified; + protected $searchIndex; public function __construct(){ $this->addType('pubDate', 'integer'); @@ -196,6 +197,16 @@ class Item extends Entity implements IAPI, \JsonSerializable { parent::setTitle(strip_tags($title)); } + public function generateSearchIndex() { + $this->setSearchIndex( + strtolower( + strip_tags($this->getBody()) . + $this->getAuthor() . + $this->getTitle() . + $this->getUrl() + ) + ); + } public function setUrl($url) { $url = trim($url); |