XF 2.0 Enhanced search variables

AndyB

Well-known member
In my Similar Threads Plus add-on for XenForo 1.5 I used the following code:

PHP:
$esServerOption = XenForo_Application::get('options')->elasticSearchServer;

$host = $esServerOption['host'];          
          
$port = $esServerOption['port'];
          
$index = XenES_Api::getInstance()->getIndex();


I would like to get equivalent code for XF2.

Thank you.
 
Last edited:
Got it.

PHP:
$configArray = $options->xfesConfig;

$host = $configArray['host'];			

$port = $configArray['port'];
		
$index = $configArray['index'];
 
Top Bottom