Skip to content

Commit

Permalink
allow more mapping settings from config file
Browse files Browse the repository at this point in the history
  • Loading branch information
basemkhirat committed Apr 27, 2017
1 parent 5b14df1 commit 98d583f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,12 @@ $documents = $connection->search("hello")->get();
"number_of_replicas" => 0,
],
'mappings' => [
'posts' => [
'title' => [
'type' => 'string'
]
"properties" => [
'posts' => [
'title' => [
'type' => 'string'
]
]
]
]
]
Expand Down
5 changes: 1 addition & 4 deletions src/Commands/CreateIndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,7 @@ public function handle()
$client->indices()->putMapping([
'index' => $index,
'type' => $type,
'body' => [
'properties' => $mapping
]

'body' => $mapping
]);

}
Expand Down
5 changes: 1 addition & 4 deletions src/Commands/UpdateIndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@ public function handle()
$client->indices()->putMapping([
'index' => $index,
'type' => $type,
'body' => [
'properties' => $mapping
]

'body' => $mapping
]);

}
Expand Down
10 changes: 6 additions & 4 deletions src/config/es.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@
],

'mappings' => [
'posts' => [
'title' => [
'type' => 'string'
]
"properties" => [
'posts' => [
'title' => [
'type' => 'string'
]

]
]
]

Expand Down

0 comments on commit 98d583f

Please sign in to comment.