Questions tagged [elasticsearch-rails]

Ruby and Rails integrations for Elasticsearch

Ruby and Rails integrations for Elasticsearch:

  • ActiveModel integration with adapters for ActiveRecord and Mongoid
  • Repository pattern based persistence layer for Ruby objects Active
  • Record pattern based persistence layer for Ruby models
  • Enumerable-based wrapper for search results
  • ActiveRecord::Relation-based wrapper for returning search results as records
  • Convenience model methods such as search, mapping, import, etc
  • Rake tasks for importing the data Support for Kaminari and WillPaginate pagination
  • Integration with Rails' instrumentation framework

https://github.com/elastic/elasticsearch-rails

117 questions
0
votes
1 answer

Elasticsearch query_string multivalue fields

I am using ElasticSearch in 1 of my Ruby on Rails project. For ElasticSearch, I am heavily using query_string Below are my Project setup: Ruby-2.2.4, Rails-4.2.0, ElasticSearch-Model-0.1.8 I've already indexed the data. Using Article.import Now, in…
Puneet Pandey
  • 541
  • 2
  • 6
  • 23
0
votes
0 answers

Is it possible to use one multi-index query to results with per-index limits?

I'm working on a Rails application that is using Elasticsearch to index and search three types of documents, lets call them A, B and C. They are related but its not too important how. There is a search view in which one can search and have items…
jeteon
  • 3,471
  • 27
  • 40
0
votes
2 answers

More like this with elasticsearch-rails and mongoid returns nothing

I use MongoDB to store information about shoes. Every shoe has a title (string), photo(string, that's the url to the photo), link(string, the url to the original site), sizes(aray of strings), colors(array of strings) and price(string) and…
0
votes
2 answers

Elasticsearch not working with 'not_analyzed' index

I am unable to figure out why elasticsearch not searching with not_analysed indexes. I have following settings in my model, settings index: { number_of_shards: 1 } do mappings dynamic: 'false' do indexes :id indexes :name,…
0
votes
1 answer

Use class methods within Elasticsearch-Model's `mapping do`

I'm generating a rather complex mapping using Elasticsearch-Model. I extracted all the search related methods into an ActiveSupport::Concern. The following code was written while using the Tire gem, but I'm upgrading the gem to Elasticsearch-Rails…
0
votes
1 answer

How to search Elasticsearch-rails with association model conditions?

I'm trying to search Doc model has_and_belongs_to_many projects which belongs to specific project. models/doc.rb require 'elasticsearch/model' class Doc < ActiveRecord::Base include Elasticsearch::Model include Elasticsearch::Model::Callbacks …
DIGITALSQUAD
  • 3,384
  • 3
  • 22
  • 24
0
votes
1 answer

why we use search engine like solr,elastic search or any other search engine instead we have active record gems like ransack

why we use search engine like solr,elastic search or any other search engines instead we have active record gems like ransack,meta_search etc. I am new in search engines selection. I know the indexing behaviour and others are available for search…
Rajarshi Das
  • 11,778
  • 6
  • 46
  • 74
0
votes
2 answers

elasticsearch unable to query path in ruby

I have an elasticsearch index 'events' - within that index there's a type 'event'. event objects have a 'venue' which has various properties, including a 'name' - so the simplified structure is: event { venue { name: "foo" } } Now, i'm…
0
votes
2 answers

Elasticsearch-rails is searching in wrong index

I'm trying to deploy my app and index a model. Everything is working fine until i'm trying to actually get the data from elasticsearch. My environment is staging but when i perform a search via a rest api i get an error { "status": "error", …
0
votes
1 answer

Elastic Search Rails find partial record with id

I'm trying to implement an auto complete using Rails and Elastic Search using the elasticsearch-rails gem. Say I have the following records: [{id: 1, name: "John White"}, {id:2, name: "Betty Johnson"}] Which elastic search method could I use to…
jdkealy
  • 4,807
  • 6
  • 34
  • 56
0
votes
1 answer

Elasticsearch self.published?

I am using elasticsearch-rails gem For my site i need to create custom callbacks. https://github.com/elastic/elasticsearch-rails/tree/master/elasticsearch-model#custom-callbacks But i really confused by one thing. What means if self.published? on…
Stary
  • 178
  • 10
0
votes
4 answers

Elasticsearch Ruby Activerecord Persistence Model URL term search

I'm trying to make a search on a field that contains URL using elastic search Term query. I use elasticsearch-rails the ActiveRecord Persistance Pattern. This is how I try to do it. total_views = UserAction.search :query=> { :filtered=> { …
Caner
  • 1,448
  • 23
  • 38
1 2 3 4 5 6 7
8