Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/01-usage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Using with [ElasticSearch/ElasticSearch](https://github.com/elastic/elasticsearch-php)
First we need to prepare query for what we want to search.

```php
$query = new \Spameri\ElasticQuery\ElasticQuery();
$query->query()->must()->add(
new \Spameri\ElasticQuery\Query\Match(
new \Spameri\ElasticQuery\Query\ElasticMatch(
'name',
'Avengers'
)
Expand Down
2 changes: 1 addition & 1 deletion src/Query/Match.php → src/Query/ElasticMatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html
*/
class Match implements \Spameri\ElasticQuery\Query\LeafQueryInterface
class ElasticMatch implements \Spameri\ElasticQuery\Query\LeafQueryInterface
{

private string $field;
Expand Down
2 changes: 1 addition & 1 deletion tests/SpameriTests/ElasticQuery/ElasticQuery.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ElasticQuery extends \Tester\TestCase

public function testCreate() : void
{
$match = new \Spameri\ElasticQuery\Query\Match(
$match = new \Spameri\ElasticQuery\Query\ElasticMatch(
'name',
'Avengers',
1.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace SpameriTests\ElasticQuery\Query;
require_once __DIR__ . '/../../bootstrap.php';


class Match extends \Tester\TestCase
class ElasticMatch extends \Tester\TestCase
{

private const INDEX = 'spameri_test_video_match';
Expand All @@ -26,7 +26,7 @@ class Match extends \Tester\TestCase

public function testCreate() : void
{
$match = new \Spameri\ElasticQuery\Query\Match(
$match = new \Spameri\ElasticQuery\Query\ElasticMatch(
'name',
'Avengers',
1.0,
Expand Down Expand Up @@ -101,4 +101,4 @@ class Match extends \Tester\TestCase

}

(new Match())->run();
(new ElasticMatch())->run();