Answer the question
In order to leave comments, you need to log in
sphinx + php. Why is the Weight in the response calculated incorrectly?
Sphinx is installed and more or less configured. When executed,
displays the correct answers, and specifies the weight and sorts by it.
Downloaded, configured the library to work with php. Connection and call code:seacrh "проект"
$this->_cl = new \SphinxClient();
$this->_cl->SetServer( "localhost", 9312 );
$this->_cl->SetConnectTimeout( 1 );
$this->_cl->SetMaxQueryTime(1000);
$this->_cl->SetRankingMode( SPH_RANK_BM25 ) ;
$this->_cl->SetMatchMode( SPH_MATCH_ALL );
$this->_cl->SetSortMode( SPH_SORT_RELEVANCE ) ;
$result = $this->_cl->Query( $this->_q, $this->_indexName );
Answer the question
In order to leave comments, you need to log in
$this->_cl = new \SphinxClient();
$this->_cl->SetServer( "localhost", 9312 );
$this->_cl->SetConnectTimeout( 1 );
$this->_cl->SetMaxQueryTime(1000);
$this->_cl->SetMatchMode( SPH_MATCH_EXTENDED ); // <--------
$this->_cl->SetSortMode( SPH_SORT_RELEVANCE ) ;
$result = $this->_cl->Query( $this->_q, $this->_indexName );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question