Permalink
Browse files

Use proper capitalization: Elasticsearch

  • Loading branch information...
karmi committed Jan 6, 2013
1 parent aa4db63 commit 22bb1c763eaee8552ea89afd73228b4c79c6979c
View
@@ -1,10 +1,10 @@
Tire
=========
-_Tire_ is a Ruby (1.8 or 1.9) client for the [ElasticSearch](http://www.elasticsearch.org/)
+_Tire_ is a Ruby (1.8 or 1.9) client for the [Elasticsearch](http://www.elasticsearch.org/)
search engine/database.
-_ElasticSearch_ is a scalable, distributed, cloud-ready, highly-available,
+_Elasticsearch_ is a scalable, distributed, cloud-ready, highly-available,
full-text search engine and database with
[powerfull aggregation features](http://www.elasticsearch.org/guide/reference/api/search/facets/),
communicating by JSON over RESTful HTTP, based on [Lucene](http://lucene.apache.org/), written in Java.
@@ -17,7 +17,7 @@ and [issues](https://github.com/karmi/tire/issues).
Installation
------------
-OK. First, you need a running _ElasticSearch_ server. Thankfully, it's easy. Let's define easy:
+OK. First, you need a running _Elasticsearch_ server. Thankfully, it's easy. Let's define easy:
$ curl -k -L -o elasticsearch-0.20.2.tar.gz http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.2.tar.gz
$ tar -zxvf elasticsearch-0.20.2.tar.gz
@@ -41,11 +41,11 @@ Of course, you can install it from the source as well:
Usage
-----
-_Tire_ exposes easy-to-use domain specific language for fluent communication with _ElasticSearch_.
+_Tire_ exposes easy-to-use domain specific language for fluent communication with _Elasticsearch_.
It easily blends with your _ActiveModel_/_ActiveRecord_ classes for convenient usage in _Rails_ applications.
-To test-drive the core _ElasticSearch_ functionality, let's require the gem:
+To test-drive the core _Elasticsearch_ functionality, let's require the gem:
```ruby
require 'rubygems'
@@ -102,7 +102,7 @@ for a specific document type:
```
Of course, we may have large amounts of data, and it may be impossible or impractical to add them to the index
-one by one. We can use _ElasticSearch's_
+one by one. We can use _Elasticsearch's_
[bulk storage](http://www.elasticsearch.org/guide/reference/api/bulk.html).
Notice, that collection items must have an `id` property or method,
and should have a `type` property, if you've set any specific mapping for the index.
@@ -344,7 +344,7 @@ When you set the log level to _debug_:
the JSON responses are logged as well. This is not a great idea for production environment,
but it's priceless when you want to paste a complicated transaction to the mailing list or IRC channel.
-The _Tire_ DSL tries hard to provide a strong Ruby-like API for the main _ElasticSearch_ features.
+The _Tire_ DSL tries hard to provide a strong Ruby-like API for the main _Elasticsearch_ features.
By default, _Tire_ wraps the results collection in a enumerable `Results::Collection` class,
and result items in a `Results::Item` class, which looks like a child of `Hash` and `Openstruct`,
@@ -357,15 +357,15 @@ If that seems like a great idea to you, there's a big chance you already have su
One would bet it's an `ActiveRecord` or `ActiveModel` class, containing model of your Rails application.
-Fortunately, _Tire_ makes blending _ElasticSearch_ features into your models trivially possible.
+Fortunately, _Tire_ makes blending _Elasticsearch_ features into your models trivially possible.
ActiveModel Integration
-----------------------
If you're the type with no time for lengthy introductions, you can generate a fully working
example Rails application, with an `ActiveRecord` model and a search form, to play with
-(it even downloads _ElasticSearch_ itself, generates the application skeleton and leaves you with
+(it even downloads _Elasticsearch_ itself, generates the application skeleton and leaves you with
a _Git_ repository to explore the steps and the code):
$ rails new searchapp -m https://raw.github.com/karmi/tire/master/examples/rails-application-template.rb
@@ -384,7 +384,7 @@ To make it searchable with _Tire_, just `include` it:
When you now save a record:
```ruby
- Article.create :title => "I Love ElasticSearch",
+ Article.create :title => "I Love Elasticsearch",
:content => "...",
:author => "Captain Nemo",
:published_on => Time.now
@@ -575,8 +575,8 @@ control on how the documents are added to or removed from the index:
```
The results returned by `Article.search` are wrapped in the aforementioned `Item` class, by default.
-This way, we have a fast and flexible access to the properties returned from _ElasticSearch_ (via the
-`_source` or `fields` JSON properties). This way, we can index whatever JSON we like in _ElasticSearch_,
+This way, we have a fast and flexible access to the properties returned from _Elasticsearch_ (via the
+`_source` or `fields` JSON properties). This way, we can index whatever JSON we like in _Elasticsearch_,
and retrieve it, simply, via the dot notation:
```ruby
@@ -588,18 +588,18 @@ and retrieve it, simply, via the dot notation:
```
The `Item` instances masquerade themselves as instances of your model within a _Rails_ application
-(based on the `_type` property retrieved from _ElasticSearch_), so you can use them carefree;
+(based on the `_type` property retrieved from _Elasticsearch_), so you can use them carefree;
all the `url_for` or `dom_id` helpers work as expected.
If you need to access the “real” model (eg. to access its assocations or methods not
-stored in _ElasticSearch_), just load it from the database:
+stored in _Elasticsearch_), just load it from the database:
```ruby
puts article.load(:include => 'comments').comments.size
```
You can see that _Tire_ stays as far from the database as possible. That's because it believes
-you have most of the data you want to display stored in _ElasticSearch_. When you need
+you have most of the data you want to display stored in _Elasticsearch_. When you need
to eagerly load the records from the database itself, for whatever reason,
you can do it with the `:load` option when searching:
@@ -636,14 +636,14 @@ so you can pass all the usual parameters to the `search` method in the controlle
@articles = Article.search params[:q], :page => (params[:page] || 1)
```
-OK. Chances are, you have lots of records stored in your database. How will you get them to _ElasticSearch_? Easy:
+OK. Chances are, you have lots of records stored in your database. How will you get them to _Elasticsearch_? Easy:
```ruby
Article.index.import Article.all
```
This way, however, all your records are loaded into memory, serialized into JSON,
-and sent down the wire to _ElasticSearch_. Not practical, you say? You're right.
+and sent down the wire to _Elasticsearch_. Not practical, you say? You're right.
Provided your model implements some sort of _pagination_ — and it probably does —, you can just run:
@@ -674,7 +674,7 @@ provided by the `mapping` block in your model):
$ rake environment tire:import CLASS='Article' FORCE=true
```
-When you'll spend more time with _ElasticSearch_, you'll notice how
+When you'll spend more time with _Elasticsearch_, you'll notice how
[index aliases](http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases.html)
are the best idea since the invention of inverted index.
You can index your data into a fresh index (and possibly update an alias once everything's fine):
@@ -708,7 +708,7 @@ Well, things stay mostly the same:
end
- Article.create :title => 'I Love ElasticSearch'
+ Article.create :title => 'I Love Elasticsearch'
Article.tire.search 'love'
```
@@ -723,9 +723,9 @@ database to store stuff like `{ :name => 'Tire', :tags => [ 'ruby', 'search' ] }
Because all you need, really, is to just dump a JSON-representation of your data into a database and load it back again.
Because you've noticed that _searching_ your data is a much more effective way of retrieval
then constructing elaborate database query conditions.
-Because you have _lots_ of data and want to use _ElasticSearch's_ advanced distributed features.
+Because you have _lots_ of data and want to use _Elasticsearch's_ advanced distributed features.
-All good reasons to use _ElasticSearch_ as a schema-free and highly-scalable storage and retrieval/aggregation engine for your data.
+All good reasons to use _Elasticsearch_ as a schema-free and highly-scalable storage and retrieval/aggregation engine for your data.
To use the persistence mode, we'll include the `Tire::Persistence` module in our class and define its properties;
we can add the standard mapping declarations, set default values, or define casting for the property to create
@@ -759,7 +759,7 @@ and extensions to the core _Tire_ functionality — be sure to check them out.
Other Clients
-------------
-Check out [other _ElasticSearch_ clients](http://www.elasticsearch.org/guide/appendix/clients.html).
+Check out [other _Elasticsearch_ clients](http://www.elasticsearch.org/guide/appendix/clients.html).
Feedback
@@ -1,8 +1,8 @@
# ===================================================================================================================
-# Template for generating a no-frills Rails application with support for ElasticSearch full-text search via Tire
+# Template for generating a no-frills Rails application with support for Elasticsearch full-text search via Tire
# ===================================================================================================================
#
-# This file creates a basic, fully working Rails application with support for ElasticSearch full-text search
+# This file creates a basic, fully working Rails application with support for Elasticsearch full-text search
# via the Tire gem [http://github.com/karmi/tire].
#
# You DON'T NEED ELASTICSEARCH INSTALLED, it is installed and launched automatically by this script.
@@ -14,7 +14,7 @@
# * Ruby >= 1.8.7
# * Rubygems
# * Rails >= 3.0.7
-# * Sun Java 6 (for ElasticSearch)
+# * Sun Java 6 (for Elasticsearch)
#
#
# Usage
@@ -46,7 +46,7 @@
at_exit do
pid = File.read("#{destination_root}/tmp/pids/elasticsearch.pid") rescue nil
if pid
- say_status "Stop", "ElasticSearch", :yellow
+ say_status "Stop", "Elasticsearch", :yellow
run "kill #{pid}"
end
end
@@ -79,24 +79,24 @@
COMMAND
puts "\n"
- say_status "ERROR", "ElasticSearch not running!\n", :red
+ say_status "ERROR", "Elasticsearch not running!\n", :red
puts '-'*80
- say_status '', "It appears that ElasticSearch is not running on this machine."
+ say_status '', "It appears that Elasticsearch is not running on this machine."
say_status '', "Is it installed? Do you want me to install it for you with this command?\n\n"
COMMAND.each_line { |l| say_status '', "$ #{l}" }
puts
say_status '', "(To uninstall, just remove the generated application directory.)"
puts '-'*80, ''
- if yes?("Install ElasticSearch?", :bold)
+ if yes?("Install Elasticsearch?", :bold)
puts
- say_status "Install", "ElasticSearch", :yellow
+ say_status "Install", "Elasticsearch", :yellow
commands = COMMAND.split("\n")
exec = commands.pop
inside("vendor") do
commands.each { |command| run command }
- run "(#{exec})" # Launch ElasticSearch in subshell
+ run "(#{exec})" # Launch Elasticsearch in subshell
end
end
end
Oops, something went wrong.

0 comments on commit 22bb1c7

Please sign in to comment.