Skip to content

Commit 407878b

Browse files
committed
[STORE] Minor text tweaks and fixes to the elasticsearch-persistence README
1 parent 055c06b commit 407878b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

elasticsearch-persistence/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ class Article
492492
end
493493
```
494494

495-
Attribute validations works like for any other _ActiveModel_-compatible implementation:
495+
Attribute validations work like for any other _ActiveModel_-compatible implementation:
496496

497497
```ruby
498498
article = Article.new # => #<Article { ... }>
@@ -535,7 +535,7 @@ To update the model, either update the attribute and save the model:
535535
article.title = 'Updated'
536536

537537
article.save
538-
=> {"_index"=>"articles", "_type"=>"article", "_id"=>"1", "_version"=>2, "created"=>false}
538+
# => {"_index"=>"articles", "_type"=>"article", "_id"=>"1", "_version"=>2, "created"=>false}
539539
```
540540

541541
... or use the `update_attributes` method:
@@ -571,7 +571,7 @@ article.save
571571
```
572572

573573
The model also supports familiar `find_in_batches` and `find_each` methods to efficiently
574-
retrieve big collections of model instance, using the Elasticsearch's _Scan API_:
574+
retrieve big collections of model instances, using the Elasticsearch's _Scan API_:
575575

576576
```ruby
577577
Article.find_each(_source_include: 'title') { |a| puts "===> #{a.title.upcase}" }
@@ -604,7 +604,7 @@ puts results.response.aggregations.authors.buckets.each { |b| puts "#{b['key']}
604604

605605
#### Accessing the Repository Gateway
606606

607-
The Elasticsearch integration is implemented by embedding the repository object in the model.
607+
The integration with Elasticsearch is implemented by embedding the repository object in the model.
608608
You can access it through the `gateway` method:
609609

610610
```ruby
@@ -634,7 +634,7 @@ article.published.iso8601
634634
# => "2014-01-01"
635635
```
636636

637-
The library provides a Rails ORM generator:
637+
The library provides a Rails ORM generator to facilitate building the application scaffolding:
638638

639639
```bash
640640
rails generate scaffold Person name:String email:String birthday:Date --orm=elasticsearch
@@ -645,16 +645,16 @@ rails generate scaffold Person name:String email:String birthday:Date --orm=elas
645645
A fully working Ruby on Rails application can be generated with the following command:
646646

647647
```bash
648-
rails new music --force --skip --skip-bundle --skip-active-record --template https://raw.githubusercontent.com/elasticsearch/elasticsearch-rails/persistence-model/elasticsearch-persistence/examples/music/template.rb
648+
rails new music --force --skip --skip-bundle --skip-active-record --template https://raw.githubusercontent.com/elasticsearch/elasticsearch-rails/master/elasticsearch-persistence/examples/music/template.rb
649649
```
650650

651651
The application demonstrates:
652652

653653
* How to set up model attributes with custom mappings
654-
* How to configure model relationships with Elasticsearch's parent/child
654+
* How to define model relationships with Elasticsearch's parent/child
655655
* How to configure models to use a common index, and create the index with proper mappings
656656
* How to use Elasticsearch's completion suggester to drive auto-complete functionality
657-
* How to use Elasticsearch-persisted model in Rails' views and forms
657+
* How to use Elasticsearch-persisted models in Rails' views and forms
658658
* How to write controller tests
659659

660660
The source files for the application are available in the [`examples/music`](examples/music) folder.

0 commit comments

Comments
 (0)