You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`->query(string $collection, string $bucket, string $terms): array`| Returns an array of matched object identifiers |
19
-
|`->suggest(string $collection, string $bucket, string $terms): array`| Returns an array of strings of autosuggestions |
18
+
|`->query(string $collection, string $bucket, string $terms, [string <locale>]): array`| Returns an array of matched object identifiers, locale is optional, which should be a valid [ISO 639-3](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) locale (eng = English), if set to `none` lexing will be disabled |
19
+
|`->suggest(string $collection, string $bucket, string $terms, [string <locale>]): array`| Returns an array of strings of autosuggestions, locale is optional, which should be a valid [ISO 639-3](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) locale (eng = English), if set to `none` lexing will be disabled |
20
20
|`->ping(): string`| Pings the server, should return _PONG_|
21
21
|`->disconnect()`| Disconnects the channel |
22
22
@@ -26,16 +26,16 @@ You need to instantiate the Psonic/Ingest class to do the indexing operations on
26
26
27
27
```php
28
28
<?php
29
-
30
-
$ingest = new Psonic/Ingest(new Psonic/Client($host, $port, $password, $timeout));
31
-
echo $ingest->connect();
29
+
$password = 'SecretPassword';
30
+
$ingest = new Psonic/Ingest(new Psonic/Client($host, $port, $timeout));
31
+
echo $ingest->connect($password);
32
32
```
33
33
34
34
after connecting to Ingest channel you can call the following methods on it
|`->push(string $collection,string $bucket, string $object_id, string "data"`| Add an item to index and Returns a Sonic Response|
38
+
|`->push(string $collection,string $bucket, string $object_id, string "data", [string <locale>])`| Add an item to index and Returns a Sonic Response, locale is optional, which should be a valid [ISO 639-3](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) locale (eng = English), if set to `none` lexing will be disabled|
39
39
|`->pop(string $collection,string $bucket, string $object_id, string "data"`| pops an item out of index and returns a Sonic Response |
40
40
|`->count(string $collection,[string $bucket, [string $object_id]]): int`| counts the number of items in collection, bucket or object |
41
41
|`->flushc(string $collection):int`| Flushes the buckets from a collection, returns a integer saying the number of items flushed |
@@ -50,9 +50,9 @@ You need to instantiate the Psonic/Control class to do the control operations on
50
50
51
51
```php
52
52
<?php
53
-
54
-
$control = new Psonic/Control(new Psonic/Client($host, $port, $password, $timeout));
55
-
echo $control->connect();
53
+
$password = 'SecretPassword';
54
+
$control = new Psonic/Control(new Psonic/Client($host, $port, $timeout));
55
+
echo $control->connect($password);
56
56
```
57
57
58
58
after connecting to control channel you can call the following methods on it
@@ -62,4 +62,5 @@ after connecting to control channel you can call the following methods on it
62
62
|`->trigger(string $command)`| Trigger a control command |
63
63
|`->consolidate()`|**Saves the data to disk**, when a certain number of items are pushed to index, depending on the configuration it can happen automatically. But to be on the safe side you could call this command manually |
64
64
|`->ping(): string`| Pings the server, should return _PONG_|
65
+
|`->info()`| Get the information about the server |
0 commit comments