Kamahl19 wrote:Guys, could you put all RIGHT edits to one post please?Thanks
I reinstalled sphinx on a new server with all the edits and now it works like it should.. Above worked also but then you dont have recent searches. (bottom search.php) Now all works fine!!baller1234 wrote:Kamahl19 wrote:Guys, could you put all RIGHT edits to one post please?Thanks
Well in the beginning this did not work for me so i tried the edits from some posts i found.. Then it worked ok but only for results on 1 page. the rest of the pages did not work. THen i just copied the file from figvam over again to start fresh. ( fulltext_sphinx.php) and did this edit: http://www.phpbb.com/community/viewtopi ... #p13146451
Now it seems to work very good!
Greetz
Code: Select all
*/1 * * * * /usr/local/bin/indexer --config /home/sphinx/conf/sphinx.conf --merge index_114a_main index_114a_delta --quiet --rotate
*/1 * * * * /usr/local/bin/indexer --config /home/sphinx/conf/sphinx.conf index_114a_delta --quiet --rotate
##start searchd with reboot
@reboot /usr/local/bin/searchd --config /home/sphinx/conf/sphinx.conf
Code: Select all
/usr/local/bin/searchd --config /home/sphinx/conf/sphinx.conf
Code: Select all
WARNING: key 'address' is deprecated in /home/sphinx/conf/sphinx.conf line 9
8; use 'listen' instead.
Code: Select all
address = 127.0.0.1
port = 3312
Code: Select all
listen = 127.0.0.1:3312
Code: Select all
fulltext_sphinx.php
Code: Select all
require($phpbb_root_path . "includes/sphinxapi-0.9.8." . $phpEx);
Code: Select all
include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
Code: Select all
class fulltext_sphinx
Code: Select all
class fulltext_sphinx extends search_backend
Code: Select all
// No keywords? No posts.
if (!strlen($this->search_query) && !sizeof($author_ary))
{
return false;
}
Code: Select all
// (c) Pandora
// generate a search_key from all the options to identify the results
$search_key = md5(implode('#', array(
$this->search_query,
$type,
$fields,
$terms,
$sort_days,
$sort_key,
$topic_id,
implode(',', $ex_fid_ary),
implode(',', $m_approve_fid_ary),
implode(',', $author_ary)
)));
// try reading the results from cache
$result_count = 0;
if (false && $this->obtain_ids($search_key, $result_count, $id_ary, $start, $per_page, $sort_dir) == SEARCH_RESULT_IN_CACHE)
{
return $result_count;
}
// (c) Pandora
Code: Select all
$result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes);
// could be connection to localhost:3312 failed (errno=111, msg=Connection refused) during rotate, retry if so
$retries = CONNECT_RETRIES;
while (!$result && (strpos($this->sphinx->_error, "errno=111,") !== false) && $retries--)
{
usleep(CONNECT_WAIT_TIME);
$result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes);
}
Code: Select all
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('"', '"', $this->search_query)), $this->indexes);
// could be connection to localhost:3312 failed (errno=111, msg=Connection refused) during rotate, retry if so
$retries = CONNECT_RETRIES;
while (!$result && (strpos($this->sphinx->_error, "errno=111,") !== false) && $retries--)
{
usleep(CONNECT_WAIT_TIME);
$result = $this->sphinx->Query($search_query_prefix . $this->sphinx->EscapeString(str_replace('"', '"', $this->search_query)), $this->indexes);
}
Code: Select all
$result_count = $result['total_found'];
Code: Select all
// store the ids, from start on then delete anything that isn't on the current page because we only need ids for one page
$this->save_ids($search_key, $this->search_query, $author_ary, $result_count, $id_ary, $start, $sort_dir);
Yes you can.. just follow what i wroteSuperFedya wrote:Is this module works fine with 3.0.10? Can I install the last version of Sphinx 2.0.4?
Thanks
Code: Select all
$this->sphinx->SetFilter('deleted', array(0));
Code: Select all
if( $sort_days ) $this-> sphinx-> SetFilterRange( 'post_time', time()- $sort_days* 86400, PHP_INT_MAX );
what if $sort_days == 0 (by default). There is no search result.AmigoJack wrote:Code: Select all
$this->sphinx->SetFilterRange('post_time', time()- $sort_days* 86400, PHP_INT_MAX);
should be ok.AmigoJack wrote:True. Fixed my post by adding a condition.
I am also interested in this question. Does it consider which forums and sub-forums a user have access to when showing the results?Holger wrote:Could someone please explain how this mod handles the phpBB permissions?