Questions tagged [tire]

Tire is a Ruby client for the ElasticSearch search engine/database. It provides Ruby-like API for fluent communication with the ElasticSearch server and blends with ActiveModel classes for convenient usage in Rails applications.

Tire is a Ruby client for the ElasticSearch search engine/database. It provides Ruby-like API for fluent communication with the ElasticSearch server and blends with ActiveModel classes for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results. Please check the documentation at http://karmi.github.com/tire/.

509 questions
8
votes
1 answer

elasticsearch-rails VS (re)tire gem (Elasticsearch and Rails 3.2)

I want to integrate Elasticsearch with my Rails 3.2 app. I used Tire before and it was perfect and straight forward, now it is retired based on its documentation NOTICE: This library has been renamed and retired in September 2013 (read the…
Brary
  • 984
  • 1
  • 9
  • 25
8
votes
1 answer

Elastic search Query terms and scoring

I have a request using terms looking like : { "query": { "bool": { "should": [ { "terms": { "subjects.id": [ 1, 2, 3 ], boost: 3 } }, { "terms":…
momo
  • 83
  • 1
  • 1
  • 4
8
votes
1 answer

Array field in elasticsearch returning only matching elements

I have an index in elasticsearch (tire) with an array field and custom analyzer for ngram with min_ngram = 1 and max_ngram = 10. Field example field1: [foo, bar, bof] I construct a query with value of the field1 'f' and it returns the documents…
smolnar
  • 736
  • 1
  • 7
  • 14
7
votes
2 answers

Elasticsearch highlight with nested objects

I have a question about highlighting nested object fields. Consider record like this: _source: { id: 286 translations: [ { id: 568 language: lang1 value: foo1 bar1 } { …
smolnar
  • 736
  • 1
  • 7
  • 14
7
votes
2 answers

How to wait for ES indexing to finish in Rspec and Capybara?

How to avoid using sleep 1 in that example for wait until ES indexing will be finished? describe Question do before do create :question, content: "Some test question", app: @app create :question, content: "Some other…
tomekfranek
  • 6,852
  • 8
  • 45
  • 80
7
votes
1 answer

How to limit the total returned results when using ElasticSearch with Tire (A Ruby on Rails Gem)?

I tried to use Post.search(keyword, :size => 10) and Post.search(keyword).size(10). but non of these will work.
silent
  • 3,964
  • 5
  • 27
  • 29
7
votes
1 answer

Elasticsearch: Highlighting hits from within attachment

I'm having trouble getting the highlighting to work with Elasticsearch (and Tire) in a Rails app. I can successfully index PDF attachments and query them but I cannot get the highlighting to work. Not that familiar with ES so not sure where to look…
Meltemi
  • 37,979
  • 50
  • 195
  • 293
6
votes
1 answer

Find open Shops through Timetable with Elasticsearch/Tire

I have model Shop each has relation with Timetable which could contain something like: shop_id: 1, day: 5, open_hour: 7, open_minutes: 0, close_hour: 13, close_minute: 30 shop_id: 1, day: 5, open_hour: 14, open_minutes: 30, close_hour: 18,…
Igor Guzak
  • 2,155
  • 1
  • 13
  • 20
6
votes
1 answer

How to calculate the score based on number of query terms in elasticsearch?

I want the queries to return a score that gets calculated like: occurrence of each query term in title + description / number of query terms for example EbSearch.add [ new_job( id: 1, title: "Java Programmierer", description: "Java…
outsmartin
  • 403
  • 2
  • 8
6
votes
1 answer

Fuzzy String Matching with Rails (Tire) and ElasticSearch

I have a Rails application that is now set up with ElasticSearch and the Tire gem to do searching on a model and I was wondering how I should set up my application to do fuzzy string matching on certain indexes in the model. I have my model set up…
nobody
  • 7,803
  • 11
  • 56
  • 91
6
votes
2 answers

Remove/Delete an indexed document in ElasticSearch with Tire (with soft delete via ActsAsParanoid)

I have an ElasticSearch server running that indexes and searched documents using the excellent Tire gem. Everything works great, except I'm not sure how to go about manually removing documents from the search index. I have poured over the RDoc and…
thoughtpunch
  • 1,907
  • 4
  • 25
  • 41
6
votes
5 answers

Ruby: ElasticSearch + Tire error Tire::Search::SearchRequestFailed - IndexMissingException?

I want to use ElasticSearch + Tire to search stored in MongoDB. However, I'm getting the following error when I try to perform a search: Tire::Search::SearchRequestFailed in SearchController#index 404 : {"error":"IndexMissingException[[events]…
gabriel
  • 1,787
  • 2
  • 19
  • 24
5
votes
1 answer

ElasticSearch/Tire only returning results for one index

Right now I have the following code: search = Tire.search ['object1_index', 'object2_index'] do |search| search.query { string params[:q] } end @results = search.results The results right now are all coming from just object1, however, if I…
Lindsey B
  • 556
  • 3
  • 15
5
votes
3 answers

The new elasticsearch-ruby gem integrating with rails

there is any way to integrate the new Elasticsearch gem for ruby to rails, the tire was great but retired since two month and replaced by the new gem, however, no integrating functions with rails yet. all the tutorial use tire, but now, how we can…
beyfort
  • 53
  • 2
  • 10
5
votes
3 answers

How to implement tire map in java?

I want a tire map like blow: Map map = new TireMap(); map.put("com","1"); map.put("com.aa","2"); map.put("com.aa.bb","3"); map.get("com");// return ["1","2","3"] map.get("com.a"); //return ["2","3"] map.get("com.aa"); //return…
lichengwu
  • 4,277
  • 6
  • 29
  • 42
1
2
3
33 34