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

Improve extensibility of Enhanced Search

Discussion in 'Enhanced Search Suggestions' started by Xon, Oct 7, 2015.

  1. Xon

    Xon Well-Known Member

    Currently the ability to inject new behaviour into XenES_Search_SourceHandler_ElasticSearch::executeSearch() in a standard re0usable way is highly limited.

    There isn't any easy way to inspect & modify the content of the DSL before it is sent to Elastic Search (Xen_Api is annoyingly poor at extensibility). And the functionality of executeSearch is one large block of code rather than discrete functions which can be hooked to introduce new behaviour.
  2. Daniel Hood

    Daniel Hood Well-Known Member

    Judging by the bug reports, it seems that a new version should be coming soon. I'd greatly appreciate if this was addressed in some way.
    Xon likes this.
  3. Xon

    Xon Well-Known Member

    It isn't like it would be a massive backwards compatibility change either. Given how much of the XFES add-on is basically an opaque blob w.r.t to extendibility by 3rd party add-ons
  4. Xon

    Xon Well-Known Member

    Please make how XenForo Enhanced Search determines if a content type is optimizable content types extendable.


    Currently XenES_Model_Elasticsearch::getOptimizableMappings uses a generic mapping for every type, I want to be able to extend it per type like so:

    if (!$mappings || !isset($mappings->$type)) // no index or no mapping
         $optimize = true;
        $expectedMapping = array_merge(static::$optimizedGenericMapping, $this->getOptimizableMappingFor($type));
        $optimize = $this->_verifyMapping($mappings->$type, $expectedMapping);
    _ doesn't contain the verifyMapping $type, so it can't be used.
    NixFifty likes this.
  5. Xon

    Xon Well-Known Member

Share This Page