Skip to content

Commit

Permalink
Fixed documentation for changing index and type name
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo authored Apr 19, 2018
1 parent 1f93301 commit 80865f9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,22 @@ class CommentsIndex extends Index
/**
* The name of index in Elasticsearch
*
* @type string
* @return string
*/
public $name = 'comments';
public function getName()
{
return 'comments';
}

/**
* The name of mapping type in Elasticsearch
*
* @type string
* @return string
*/
public $type = 'comments';
public function getType()
{
return 'comments';
}
}
```

Expand Down

0 comments on commit 80865f9

Please sign in to comment.