Skip to content

Commit

Permalink
Merge pull request #6 from Hilsonxhero/dev
Browse files Browse the repository at this point in the history
chore : update docs
Hilsonxhero authored Mar 31, 2023
2 parents 4adc34f + 55007f4 commit eb6cd17
Showing 7 changed files with 597 additions and 120 deletions.
2 changes: 2 additions & 0 deletions docs/advanced-queries.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ From the Elasticsearch [documentation](https://www.elastic.co/guide/en/elasticse

**must**: The query must appear in matching documents and will contribute to the score.

**must_not**: The query must_not appear in matching documents and will contribute to the score.

**should**: The query should appear in the matching document.

**filter**: The query must appear in matching documents. However unlike must the score of the query will be ignored.
18 changes: 9 additions & 9 deletions docs/connection.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ The most basic connection is with http without authorization.
```php
return [
'connection' => [
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9200',
'scheme' => 'http',
],
@@ -36,7 +36,7 @@ To specify a username and password use the `auth` key with a `username` and a `p
```php
return [
'connection' => [
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9200',
'scheme' => 'http',
'auth' => [
@@ -54,7 +54,7 @@ Replace the auth part with API and give it your key and id.
```php
return [
'connection' => [
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9200',
'scheme' => 'http',
'api' => [
@@ -75,7 +75,7 @@ From Elastic 8 and upwards TLS is becoming the default, even in development. Thi
```php
return [
'connection' => [
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9200',
'scheme' => 'http',
'ssl' => [
@@ -90,7 +90,7 @@ To disable TLS verification set it to `false`. **NOT recommended for production*
```php
return [
'connection' => [
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9200',
'scheme' => 'http',
'ssl' => [
@@ -105,7 +105,7 @@ To disable TLS verification set it to `false`. **NOT recommended for production*
```
return [
'connection' => [
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9200',
'scheme' => 'https',
'ssl' => [
@@ -125,7 +125,7 @@ Elastic can also have multiple possible connections

return [
'connection' => [
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9200',
'scheme' => 'http',
'ssl' => [
@@ -135,12 +135,12 @@ Elastic can also have multiple possible connections
],
'additionalConnections' => [
[
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9201',
'scheme' => 'http',
],
[
'host' => 'localhost',
'host' => 'elasticsearch',
'port' => '9202',
'scheme' => 'http',
]
11 changes: 1 addition & 10 deletions docs/index-aliases.md
Original file line number Diff line number Diff line change
@@ -40,16 +40,7 @@ class Post extends Model implements Explored, Aliased
```php
return [
'indexes' => [
'posts' => [
'aliased' => true,
'properties' => [
'id' => 'keyword',
'title' => 'text',
'created_at' => 'date',
'published' => 'boolean',
'author' => 'nested',
],
],
\App\Models\Product::class,
],
];
```
21 changes: 1 addition & 20 deletions docs/index-settings.md
Original file line number Diff line number Diff line change
@@ -59,26 +59,7 @@ If you want to use the configuration array notation (see [mapping](mapping.md)),
```php
return [
'indexes' => [
'posts' => [
'settings' => [
'analysis' => [
'analyzer' => [
'standard_lowercase' => [
'type' => 'custom',
'tokenizer' => 'standard',
'filter' => ['lowercase'],
],
],
],
],
'properties' => [
'id' => 'keyword',
'title' => 'text',
'created_at' => 'date',
'published' => 'boolean',
'author' => 'nested',
],
],
\App\Models\Product::class,
],
];
```
26 changes: 1 addition & 25 deletions docs/mapping.md
Original file line number Diff line number Diff line change
@@ -21,23 +21,7 @@ any other types will be inferred by Elasticsearch.
```php
return [
'indexes' => [
'posts' => [
'properties' => [
'id' => 'keyword',
'title' => 'text',
'created_at' => 'date',
'published' => 'boolean',
'author' => 'nested',
],
],
'subscribers' => [
'properties' => [
'id' => 'keyword',
'firstname' => 'text',
'email' => 'text',
'subscribed_at' => 'date',
],
],
\App\Models\Product::class,
],
];
```
@@ -97,14 +81,6 @@ Perhaps interesting, you may combine the two mapping methods:
return [
'indexes' => [
\App\Models\Post::class,
'subscribers' => [
'properties' => [
'id' => 'keyword',
'firstname' => 'text',
'email' => 'text',
'subscribed_at' => 'date',
],
],
],
];
```
11 changes: 3 additions & 8 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -163,14 +163,9 @@ The only point where you should diverge from the docs is the driver for scout (i
After that, you can define your first index in config/elasticvision.php:

```php
'indexes' => [
'posts_index' => [
'properties' => [
'id' => 'keyword',
'title' => 'text',
],
]
]
'indexes' => [
\App\Models\Product::class,
],
```

Upon saving the file, run `php artisan scout:import "App\Models\Post"` to add your posts as documents to the index.
Loading

0 comments on commit eb6cd17

Please sign in to comment.