We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to FAQ / ReadME
class SBSearch { ... ... somewhere above is init() method public static function createConnection() { $conn = new Connection(); $conn->setParams([ 'host' => self::$sphinx_connection_host, 'port' => self::$sphinx_connection_port ]); return (new SphinxQL($conn)); } public static function rt_ReplaceIndex(string $index_name, array $updateset) { if (empty($updateset)) return null; return self::createConnection() ->replace() ->into($index_name) ->set($updateset) ->execute(); } ...
I am adding data to my index.
$dataset = [ 'id' => $id, 'title' => $item['title'], 'short' => $item['short'], 'text' => $item['text_bb'], 'date_added' => date_format( date_create_from_format('Y-m-d H:i:s', $item['cdate']), 'U' ), 'type' => 1, 'photo' => ((@$item['photo']['file'] != "") ? 1 : 0), 'author' => $item['author'], 'districts_all' => $item['districts_all'], ]; $status = SBSearch::rt_ReplaceIndex($sphinx_target_index, $dataset);
How to add MVA attribute 'rubrics' and 'districts'? This fields described as
rt_attr_multi = rubrics rt_attr_multi = districts
Easy:
'rubrics' => array_keys($item['rubrics']), 'districts' => array_keys($item['districts'])
Just send to dataset field ARRAY of values.
The text was updated successfully, but these errors were encountered:
Not sure what the ask is. I think adding a single line under https://github.com/FoolCode/SphinxQL-Query-Builder#insert-replace mentioning MVA attribute support would be enough. Would welcome a PR for it.
Sorry, something went wrong.
it is not a PR. but a HINT for someone looking answer for this
No branches or pull requests
Add to FAQ / ReadME
I am adding data to my index.
How to add MVA attribute 'rubrics' and 'districts'?
This fields described as
Easy:
Just send to dataset field ARRAY of values.
The text was updated successfully, but these errors were encountered: