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
3
votes
0 answers

ElasticSearch matching nested document with boost

I have a User model, and user can have multiple interests with a numeric degree of how interested this person is in the subject matter. A sample user.to_indexed_json is: { // user attributes interests: [ {category_id: 1, degree: 1} …
Alex Le
  • 499
  • 2
  • 14
3
votes
2 answers

How do I reindex just one element with Tire and elasticsearch?

I can't seem to figure out how to edit indexed element. Google doesn't give me an answer either. So, I'm not sure if it's possible at all? What I have done before is just to reindex the whole thing, but as the data grows it becomes slower and…
toy
  • 11,711
  • 24
  • 93
  • 176
3
votes
1 answer

ElasticSearch: How to map associations properly so that they are also searchable?

I've stumbled into an issue concerning the index mapping of models (ActiveRecord) using ElasticSearch and Tire. I'm using the same system they talk about in the documentation to map association fields. The mapping seems right, but I can't search for…
ChuckE
  • 5,610
  • 4
  • 31
  • 59
3
votes
2 answers

Disable date detection in Tire's elasticsearch mapping

I'm indexing a document with a property obj_properties, which is a hash of property name -> property value. elasticsearch is inferring that some of the property values are dates, leading to the following error when it encounters a subsequent value…
Stuart
  • 56
  • 1
  • 4
3
votes
1 answer

Join / split search words in elasticsearch (using tire)

I have the following analyzer (a slight tweak to the way snowball would be setup): string_analyzer: { filter: [ "standard", "stop", "snowball" ], tokenizer: "lowercase" } Here is the field it is applied to: indexes :title, type:…
user1116573
  • 2,817
  • 4
  • 17
  • 27
3
votes
2 answers

Multiple facet filters with Elasticsearch

How can I apply multiple filters to facet (with tire gem)? I have a code: facet "packages" do terms :package facet_filter :terms, producer: [*params[:producer]] if params[:producer].present? facet_filter :terms, category_id:…
Molfar
  • 1,411
  • 3
  • 18
  • 49
3
votes
0 answers

Elasticsearch, Tire, and Nested queries/associations with mongoid

I'm using ElasticSearch with Tire to index and search a mongoid model, and I've been searching for the "right" way to index and search an embedded associations. I have a fully functional set up for this model but for some reason i can search for…
brayancastrop
  • 381
  • 5
  • 17
3
votes
2 answers

Elasticsearch with Tire: edgeNgram with multiple words

Let's say I have 5 film titles: Sans Soleil Sansa So Is This Sol Goode Sole Survivor I want to implement an auto-complete search field with this expected behavior: "Sans" > Sans Soleil, Sansa "Sans so" > Sans Soleil "So" > So Is This, Sol…
gibson
  • 33
  • 3
3
votes
1 answer

ElasticSearch / Ruby - Date Histogram Format Returned?

I've got an ElasticSearch model (persisted by Tire, no ActiveRecord). If I query it, i get some results with some facets (as expected). The format is: class Mention include Tire::Model::Persistence index_name 'mentions' # basic display…
Williamf
  • 595
  • 4
  • 14
3
votes
2 answers

Searching Multiple Terms with ElasticSearch + Tire

Using Tire with Mongoid, I'm having trouble figuring out how to structure a query for finding events with ElasticSearch. In particular, I'm trying to find events that users are watching in addition to events with performers the user follows: #…
jeremywoertink
  • 2,281
  • 1
  • 23
  • 29
3
votes
1 answer

Allowing non-existence on a filtered term in ElasticSearch with tire

I have a boolean field that I'm trying to filter by, but I want to fetch documents that either have a specific value for this field, or doesn't have this field populated at all. How can I accomplish this?
Randuin
  • 465
  • 6
  • 17
3
votes
1 answer

Get all properties that lies within user defined polygon in Tire/Elastic search using geo_polygon filter

I'm working on a project that uses ElasticSearch and tire.I have a google map on my web page.i want to get all properties when user draw apolygon on the map that must be fetched by Elastic search with tire. i have alreday get polygon coordinates now…
Muhammad Ateq Ejaz
  • 1,845
  • 20
  • 22
3
votes
1 answer

Rails ElasticSearch Tire - filter nested field on multiple parameters the same time

I have a Movie model and a search page that has a movie genres facet. It's possible to select a checkbox near every facet on the search page. I pass the list of checked facet terms to a controller and I want to filter movies collection to include…
Zelid
  • 6,905
  • 11
  • 52
  • 76
3
votes
2 answers

How do I search with multiple queries on the same field in elasticsearch?

I'm using ElasticSearch and tire.rb to index and search my collection of items. I want to query on the name field in my index. If I have a document with the name: Alfa Romeo, I would like to find this document by searching for: "Alfa" "Alfa Remeo"…
simonwh
  • 1,017
  • 8
  • 21
3
votes
1 answer

How to map / query this data with ElasticSearch?

I'm using ElasticSearch along with the tire gem to power the search functionality of my site. I'm having trouble figuring out how to map and query the data to get the results I need. Relevant code is below. I will explain the desired outbut below…
Jordan Sitkin
  • 2,303
  • 3
  • 26
  • 35