• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Refactor Search Data Handlers

xf_phantom

Well-known member
#1
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
 

Xon

Well-known member
#3
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.