From 02311ef2d108d33d6badd9489ee599cbfa062c78 Mon Sep 17 00:00:00 2001 From: mximos Date: Mon, 14 Oct 2013 03:05:21 -0700 Subject: [PATCH 1/2] fixed deadlinks --- examples/tire-dsl.rb | 48 +++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/examples/tire-dsl.rb b/examples/tire-dsl.rb index cf214a94..2005c336 100644 --- a/examples/tire-dsl.rb +++ b/examples/tire-dsl.rb @@ -117,7 +117,7 @@ def to_indexed_json refresh end -# We may want to define a specific [mapping](http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index.html) +# We may want to define a specific [mapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-create-index.html) # for the index. Tire.index 'articles' do @@ -154,7 +154,7 @@ def to_indexed_json #### Bulk Indexing # Of course, we may have large amounts of data, and adding them to the index one by one really isn't the best idea. -# We can use _Elasticsearch's_ [bulk API](http://www.elasticsearch.org/guide/reference/api/bulk.html) +# We can use _Elasticsearch's_ [bulk API](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-bulk.html) # for importing the data. # So, for demonstration purposes, let's suppose we have a simple collection of hashes to store. @@ -410,7 +410,7 @@ def self.search # Quite often, we need complex queries with boolean logic. # Instead of composing long query strings such as `tags:ruby OR tags:java AND NOT tags:python`, -# we can use the [_bool_](http://www.elasticsearch.org/guide/reference/query-dsl/bool-query.html) +# we can use the [_bool_](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html) # query. s = Tire.search('articles') do @@ -475,15 +475,15 @@ def self.search # # Eventually, _Tire_ will support all of them. So far, only these are supported: # -# * [string](http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query.html) -# * [text](http://www.elasticsearch.org/guide/reference/query-dsl/text-query.html) -# * [term](http://elasticsearch.org/guide/reference/query-dsl/term-query.html) -# * [terms](http://elasticsearch.org/guide/reference/query-dsl/terms-query.html) -# * [bool](http://www.elasticsearch.org/guide/reference/query-dsl/bool-query.html) -# * [custom_score](http://www.elasticsearch.org/guide/reference/query-dsl/custom-score-query.html) -# * [fuzzy](http://www.elasticsearch.org/guide/reference/query-dsl/fuzzy-query.html) -# * [all](http://www.elasticsearch.org/guide/reference/query-dsl/match-all-query.html) -# * [ids](http://www.elasticsearch.org/guide/reference/query-dsl/ids-query.html) +# * [string](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html) +# * [text](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-text-query.html) +# * [term](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-term-query.html) +# * [terms](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html) +# * [bool](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html) +# * [custom_score](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-custom-score-query.html) +# * [fuzzy](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-fuzzy-query.html) +# * [all](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-all-query.html) +# * [ids](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-ids-query.html) #### Faceted Search @@ -583,13 +583,15 @@ def self.search # # Eventually, _Tire_ will support all of them. So far, only these are supported: # -# * [terms](http://www.elasticsearch.org/guide/reference/api/search/facets/terms-facet.html) -# * [date](http://www.elasticsearch.org/guide/reference/api/search/facets/date-histogram-facet.html) -# * [range](http://www.elasticsearch.org/guide/reference/api/search/facets/range-facet.html) -# * [histogram](http://www.elasticsearch.org/guide/reference/api/search/facets/histogram-facet.html) -# * [statistical](http://www.elasticsearch.org/guide/reference/api/search/facets/statistical-facet.html) -# * [terms_stats](http://www.elasticsearch.org/guide/reference/api/search/facets/terms-stats-facet.html) -# * [query](http://www.elasticsearch.org/guide/reference/api/search/facets/query-facet.html) +# * [terms](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-terms-facet.html) +# * [range](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-range-facet.html) +# * [histogram](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-histogram-facet.html) +# * [date_histogram](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-date-histogram-facet.html) +# * [filter](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-filter-facet.html) +# * [query](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-query-facet.html) +# * [statistical](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-statistical-facet.html) +# * [terms_stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-terms-stats-facet.html) +# * [geo_distance](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-geo-distance-facet.html) # We have seen that _Elasticsearch_ facets enable us to fetch complex aggregations from our data. # @@ -732,8 +734,8 @@ def self.search # We need to query parts of the document as if they were separate entities. # _Elasticsearch_ provides a specific `nested` -# [field type](http://www.elasticsearch.org/guide/reference/mapping/nested-type.html) and -# [query](http://www.elasticsearch.org/guide/reference/query-dsl/nested-query.html) +# [field type](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html) and +# [query](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html) # for working with "embedded" documents like these. # So, let's update the mapping for the index first, adding the `comments` property as a `nested` type: @@ -778,7 +780,7 @@ def self.search # Often, we want to highlight the snippets matching our query in the displayed results. # _Elasticsearch_ provides rich -# [highlighting](http://www.elasticsearch.org/guide/reference/api/search/highlighting.html) +# [highlighting](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html) # features, and _Tire_ makes them trivial to use. # s = Tire.search 'articles' do @@ -819,7 +821,7 @@ def self.search #### Percolation # _Elasticsearch_ comes with one very interesting, and rather unique feature: -# [_percolation_](http://www.elasticsearch.org/guide/reference/api/percolate.html). +# [_percolation_](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html). # It works in a „reverse search“ manner to regular search workflow of adding # documents to the index and then querying them. From 731365c20a30da16c4eb71de3b1894b85ff50034 Mon Sep 17 00:00:00 2001 From: Sushil Damdhere Date: Mon, 21 Oct 2013 15:13:29 +0530 Subject: [PATCH 2/2] Corrected dsl file link in README file --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index e3af9b28..0eb31d77 100644 --- a/README.markdown +++ b/README.markdown @@ -63,7 +63,7 @@ To test-drive the core _Elasticsearch_ functionality, let's require the gem: ``` Please note that you can copy these snippets from the much more extensive and heavily annotated file -in [examples/tire-dsl.rb](http://karmi.github.com/retire/). +in [examples/tire-dsl.rb](https://github.com/karmi/retire/blob/master/examples/tire-dsl.rb). Also, note that we're doing some heavy JSON lifting here. _Tire_ uses the [_multi_json_](https://github.com/intridea/multi_json) gem as a generic JSON wrapper,