File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,11 @@ $bookIndex->add([
6666``` php-inline
6767$result = $bookIndex->search('two cities');
6868
69- $result->count (); // Number of documents.
70- $result->documents (); // Array of matches.
69+ $result->getCount (); // Number of documents.
70+ $result->getDocuments (); // Array of matches.
7171
7272// Documents are returned as objects by default.
73- $firstResult = $result->documents ()[0];
73+ $firstResult = $result->getDocuments ()[0];
7474$firstResult->title;
7575$firstResult->author;
7676```
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ $document->title->setValue('How to be awesome.');
6363$document->author->setValue('Jack');
6464$document->price->setValue(9.99);
6565$document->place->setValue(new GeoLocation(-77.0366, 38.8977));
66+ $document->color->setValue(new Tag('red'));
6667
6768$this->add($document);
6869```
You can’t perform that action at this time.
0 commit comments