Lack of interest Refactor Search Data Handlers

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

xf_phantom

Well-known member
The Handlers need to be more flexible and allow addons to manipulate the metadata.
E.g. i've replaced the _insert methods in the handlers with


PHP:
protected function _insertIntoIndex(XenForo_Search_Indexer $indexer, array $data, array $parentData = null)
   {
     $threadModel = $this->_getThreadModel();

     if ($threadModel->isRedirect($data) || !$threadModel->isVisible($data))
     {
       return;
     }

     $metadata = $this->getMetaDataArray($data, $parentData);
    

     $indexer->insertIntoIndex(
       'thread', $data['thread_id'],
       $data['title'], '',
       $data['post_date'], $data['user_id'], $data['thread_id'], $metadata
     );
   }



protected function getMetaDataArray(array $data, array $parentData){
...
}


this way i can use the proxy system to extend the handler and add own metadata with several other addons, without any overhead
 
Upvote 3
This suggestion has been closed. Votes are no longer accepted.
I'ld definitely agree that the Search Data Handlers could do with some restructuring.

It is also somewhat limiting about the lack of OR constraints.
 
Top Bottom