Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Spamercz committed Feb 24, 2022
1 parent dd4b11e commit f8e9fa0
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"php": ">=7.4",
"ext-json": "*",
"ext-curl": "*",
"spameri/elastic-query": "^v1.0.0-alpha.13",
"spameri/elastic-query": "^v1.0.0",
"elasticsearch/elasticsearch": "^7.12.0",
"nette/di": "^3.0.5",
"nette/utils": "^3.2.5",
Expand Down
6 changes: 3 additions & 3 deletions doc/00_quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public function buildQuery(?string $queryString): \Spameri\ElasticQuery\ElasticQ
{
$query = new \Spameri\ElasticQuery\ElasticQuery();
$query->addShouldQuery(
new \Spameri\ElasticQuery\Query\Match(
new \Spameri\ElasticQuery\Query\ElasticMatch(
'name',
$queryString
)
Expand All @@ -423,7 +423,7 @@ $subQuery = new \Spameri\ElasticQuery\Query\QueryCollection();

```php
$subQuery->addShouldQuery(
new \Spameri\ElasticQuery\Query\Match(
new \Spameri\ElasticQuery\Query\ElasticMatch(
'name',
$queryString,
3,
Expand All @@ -446,7 +446,7 @@ $subQuery->addShouldQuery(
)
);
$subQuery->addShouldQuery(
new \Spameri\ElasticQuery\Query\Match(
new \Spameri\ElasticQuery\Query\ElasticMatch(
'content',
$queryString,
1,
Expand Down
3 changes: 1 addition & 2 deletions doc/01_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ $result = $this->clientProvider->client()->search(
$index,
new \Spameri\ElasticQuery\Document\Body\Plain(
$elasticQuery->toArray()
),
$index
)
)
)->toArray()
);
Expand Down
2 changes: 1 addition & 1 deletion doc/09_match_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $elasticQuery->query()->must()->add(
)
);
$elasticQuery->query()->must()->add(
new \Spameri\ElasticQuery\Query\Match(
new \Spameri\ElasticQuery\Query\ElasticMatch(
'name',
'Avengers'
)
Expand Down
1 change: 0 additions & 1 deletion doc/11_entity_factory.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Entity factory

## Description
TODO
Creates entity from result hit.

## Example
Expand Down
1 change: 0 additions & 1 deletion doc/12_entity_service.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Entity service

## Description
TODO
Every service should extend BaseService which has all methods for entity manipulation. Like **Insert**, **Get**,
**GetBy**, **GetAllBy**.

Expand Down
5 changes: 1 addition & 4 deletions doc/13_advanced_get.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Advanced Get

## Description


## Example
In this example we want videos with tag **action** and are public. Also we want only first 50 sorted by year, but if
year has multiple videos sort them by score. Bonus points if movie is on beach with someone named john or here
Expand All @@ -24,7 +21,7 @@ $elasticQuery = new \Spameri\ElasticQuery\ElasticQuery(
)
),
new \Spameri\ElasticQuery\Query\ShouldCollection(
new \Spameri\ElasticQuery\Query\Match(
new \Spameri\ElasticQuery\Query\ElasticMatch(
'story.description',
'beach'
),
Expand Down

0 comments on commit f8e9fa0

Please sign in to comment.