Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit 526cf10

Browse files
authored
Merge branch 'master' into add-relation-to-whereGeoShape
2 parents 93087e4 + d412590 commit 526cf10

File tree

76 files changed

+1058
-3729
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1058
-3729
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.yml]
15+
indent_size = 2

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto
2+
3+
/docker export-ignore
4+
/tests export-ignore
5+
.codecov.yml export-ignore
6+
.editorconfig export-ignore
7+
.gitattributes export-ignore
8+
.gitignore export-ignore
9+
.styleci.yml export-ignore
10+
_config.yml export-ignore
11+
phpunit.xml export-ignore

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: 🐛 Bug report
3+
about: Report a bug related to scout-elastic-driver. Please ensure you are using the latest version.
4+
5+
---
6+
7+
<!--
8+
Please fill up this template in order to help us to reproduce,
9+
investigate and possibly fix your bug report. Issues that doesn't
10+
follow this template will be closed.
11+
-->
12+
13+
**Versions**
14+
15+
- scout-elastic-driver: #.#.#
16+
- laravel/framwork: #.#.#
17+
- php: #.#.#
18+
- elasticsearch: #.#.#
19+
20+
**Description**
21+
22+
<!-- Describe the bug you are reporting. Try to do your best here -->
23+
24+
**Steps to reproduce**
25+
26+
<!--
27+
Describe the steps to reproduce the bug. Remember that if we can't reproduce,
28+
we will not be able to fix the issue. So this step is also very important.
29+
-->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: 💡 Feature request
3+
about: Ask for features.
4+
5+
---
6+
7+
<!--
8+
Please fill up this template in order to help us to understand
9+
your feature request.
10+
-->
11+
12+
**Short Description**
13+
14+
<!-- Describe the feature you are requesting in a few words. Try to do your best here -->
15+
16+
**Use cases**
17+
18+
<!--
19+
Describe some sittuation that this is helpful.
20+
-->

.github/ISSUE_TEMPLATE/help_wanted.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: "🧐 Help question"
3+
about: 'Questions about usage of this package.'
4+
5+
---
6+
7+
<!--
8+
Use this template for questions about this package usage, they will receive the `help wanted`
9+
and `question` tags, and the community can help you here.
10+
11+
Also, if the problem is related to the Elasticsearch itself, eg. index mapping, search rules
12+
and environment setup, please try to search first on the official elasticsearch docs and on
13+
Stack Overflow community:
14+
15+
- https://stackoverflow.com/questions/tagged/elasticsearch
16+
- https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html
17+
18+
If you decide to create your question here, please try do your best to explain your question,
19+
and if possible provide some code samples. When the question is answered, fell free to close
20+
the issue yourself.
21+
-->

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea
22
vendor
3-
!.gitkeep
3+
!.gitkeep
4+
composer.lock
5+
phpunit.xml

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: laravel

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
sudo: required
2+
3+
services:
4+
- docker
5+
6+
before_script:
7+
- docker-compose -f docker-compose.yml up --build --force-recreate -d
8+
- sh ./travis/connection_check.sh elastic 9200
9+
- sh ./travis/connection_check.sh mysql 3306
10+
- sh ./travis/dependencies_check.sh
11+
12+
script:
13+
- docker-compose -f docker-compose.yml exec php /app/driver/vendor/bin/phpunit -c /app/driver/phpunit.xml.dist

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Scout Elasticsearch Driver
22

3+
:exclamation: **If you are interested in being a collaborator, please fill in [this form](https://goo.gl/forms/hcB8LPQCyDpNRt9u2).** :exclamation:
4+
5+
---
6+
37
[![Packagist](https://img.shields.io/packagist/v/babenkoivan/scout-elasticsearch-driver.svg)](https://packagist.org/packages/babenkoivan/scout-elasticsearch-driver)
48
[![Packagist](https://img.shields.io/packagist/dt/babenkoivan/scout-elasticsearch-driver.svg)](https://packagist.org/packages/babenkoivan/scout-elasticsearch-driver)
9+
[![Build Status](https://travis-ci.com/babenkoivan/scout-elasticsearch-driver.svg?branch=master)](https://travis-ci.com/babenkoivan/scout-elasticsearch-driver)
510
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/scout-elasticsearch-driver/Lobby)
611
[![Donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.me/ivanbabenko)
712

@@ -129,7 +134,7 @@ More about index settings you can find in the [index management section](https:/
129134
To create an index just run the artisan command:
130135

131136
```
132-
php artisan elastic:create-index App\\MyIndexConfigurator
137+
php artisan elastic:create-index "App\MyIndexConfigurator"
133138
```
134139

135140
Note, that every searchable model requires its own index configurator.
@@ -166,11 +171,12 @@ class MyModel extends Model
166171
//
167172
];
168173

169-
// Here you can specify a mapping for a model fields.
174+
// Here you can specify a mapping for model fields
170175
protected $mapping = [
171176
'properties' => [
172-
'text' => [
177+
'title' => [
173178
'type' => 'text',
179+
// Also you can configure multi-fields, more details you can find here https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html
174180
'fields' => [
175181
'raw' => [
176182
'type' => 'keyword',
@@ -194,7 +200,7 @@ We'll take a closer look at it in [the search rules section](#search-rules).
194200
After setting up a mapping in your model you can update an Elasticsearch type mapping:
195201

196202
```
197-
php artisan elastic:update-mapping App\\MyModel
203+
php artisan elastic:update-mapping "App\MyModel"
198204
```
199205

200206
## Usage
@@ -455,13 +461,13 @@ Before you run the command, make sure that your index configurator uses the `Sco
455461
If it's not, add the trait and run the artisan `elastic:update-index` command using your index configurator class name as an argument:
456462

457463
```
458-
php artisan elastic:update-index App\\MyIndexConfigurator
464+
php artisan elastic:update-index "App\MyIndexConfigurator"
459465
```
460466

461467
When you are ready, make changes in the model mapping and run the `elastic:migrate` command using the model class as the first argument and desired index name as the second argument:
462468

463469
```
464-
php artisan elastic:migrate App\\MyModel my_index_v2
470+
php artisan elastic:migrate "App\MyModel" my_index_v2
465471
```
466472

467473
Note, that if you need just to add new fields in your mapping, use the `elastic:update-mapping` command.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"require": {
2424
"php": ">=7.1.3",
2525
"elasticsearch/elasticsearch": "6.*",
26-
"laravel/scout": "6.*"
26+
"laravel/scout": "7.*"
2727
},
2828
"require-dev": {
2929
"phpunit/phpunit": "7.*",

0 commit comments

Comments
 (0)