diff --git a/src/Manticore.php b/src/Manticore.php new file mode 100644 index 0000000..65a546c --- /dev/null +++ b/src/Manticore.php @@ -0,0 +1,66 @@ +_client = new \Manticoresearch\Client( + [ + 'host' => $host, + 'port' => $port, + ] + ); + + $this->_index = $this->_client->index( + $name + ); + + if ($drop) + { + $this->_index->drop( + true + ); + } + + if (!$this->_index->status()) + { + $this->_index->create( + [ + 'block' => + [ + 'type' => 'int' + ], + 'namespace' => + [ + 'type' => 'text' + ], + 'txid' => + [ + 'type' => 'text' + ], + 'key' => + [ + 'type' => 'text' + ], + 'value' => + [ + 'type' => 'text' + ] + ] + ); + } + } +} \ No newline at end of file