1. 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

Discussion in 'Closed Suggestions' started by xf_phantom, Aug 27, 2013.

  1. xf_phantom

    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

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

         if (
    $threadModel->isRedirect($data) || !$threadModel->isVisible($data))

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

    $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, Bob and HWS like this.
  2. xf_phantom

    xf_phantom Well-Known Member

  3. Xon

    Xon Well-Known Member

    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.

Share This Page