0
votes
1answer
44 views

ElasticSearch terms aggregation by entire field

How can I write an ElasticSearch term aggregation query that takes into account the entire field value, rather than individual tokens? For example, I would like to aggregate by city name, but the ...
1
vote
1answer
35 views

Filter issue with tire elasticsearch

Want to search for the title from the board with live_flag true. class Board < ActiveRecord::Base has_many :deals include Tire::Model::Search tire.mapping do indexes :title, type: ...
0
votes
0answers
32 views

How do you get nested facets with Searchkick/ElasticSearch

How can you do nested facets in ElastiSearch with the Searchkick gem? I would like to achieve something like this: Category Name median price count min price max price
0
votes
1answer
27 views

Searching Elasticsearch with different query phrases

I am quite new to elasticsearch so I am struggling about with this: I have an elasticsearch index with a property called title, if for example I have the following values on this property : ...
0
votes
1answer
41 views

elasticsearch: NullPointerException with has_parent query

I have a nested NullPointerException when running has_parent queries. Find below a sample query with the problem : { "query": { "has_parent": { "parent_type": "cluster", "query": { ...
0
votes
0answers
24 views

Wrong data returned from elasticsearch after recreate the index

for testing and development reasons we reindex our data from a rails app by deleting an index and recreate with mapping and import existing documents. But after recreating the index, elasticsearch ...
0
votes
0answers
31 views

Tire: Filtering results with specific value OR when null is set

I use ElasticSearch using Tire. For structure: class Exercise < ActiveRecord::Base mapping do indexes :practice_id, type: 'integer', :index => 'not_analyzed' end def ...
0
votes
2answers
44 views

how to add/delete record in elastic search

I have Elasticsearch as data store in my rails application how can I add/delete record(row) and maintain indexes.Ii go through the ES-docs ...
0
votes
1answer
80 views

Chef Ruby loop over attributes in an .erb template file

So this might be a little confusing but bear with me. In short I want to loop over all attributes with a certain key value and then insert them into a template if the values are not empty. Here is ...
0
votes
1answer
37 views

how to obtain elasticsearch performance optimization in ruby on rails

I have elasticsearch application .how can I make its performance at the optimize level ,I know this is some thing verge question but My client ask me to do so..Even my application is working smoothly ...
0
votes
1answer
81 views

elasticsearch fail to start gives erorr

when I run command to start elasticsearch .. /elasticsearch -f gives bunch of errors like ElasticSearchIllegalStateException[Failed to obtain node lock, is the following location writable?: ...
0
votes
1answer
47 views

elastic search give following error in console rails

searching using elastic search gives me following error on console ...
0
votes
0answers
19 views

ElasticSearch Multi Index Multi Type Search returns hits of only one type

I'm trying to query two ES Indices at once. Each index has one type but the types have different names. The types share some but not all properties. Here are thr URI queries I'm trying to run: ...
0
votes
2answers
70 views

Ruby - Elastic Search & RabbitMQ - data import being lost, script crashing silently

Stackers I have a lot of messages in a RabbitMQ queue (running on localhost in my dev environment). The payload of the messages is a JSON string that I want to load directly into Elastic Search ...
0
votes
0answers
48 views

Elasticsearch: edgeNGram filter vs suggest&completion for autocomplete

I am trying to implement autocomplete in my rails app. I have used both edgeNGram & analyzer to implement this & they both seem to do the same thing. Can someone please tell me why I would ...
0
votes
1answer
272 views

Elasticsearch: SearchPhaseExecutionException/Parse Failure

I ran the following query on elasticsearch curl -X GET "http://localhost:9200/games_201403031340/_search?pretty=true" -d '{ "query" : { "field" : { "title": "ca" } } }' And I got ...
0
votes
2answers
82 views

Indexing elasticsearch without active record

How can I use indexing on elastic search when there is no active record? but model.rb specify just like this class Article MIN_TERM_CHARS = 2 MAX_NGRAM_CHARS = 20 include SyncAttr include ...
0
votes
0answers
19 views

elastic search search-auto select option not work in local machine

when I try to pass actual(remote) ip-address the auto select searching option appear but when I use localhost instead of remote ip give me following error I am using elastic search in my ror ...
0
votes
0answers
31 views

Elasticsearch data not loaded “No handler found” rails

When I put some keywords in search box the result data not shown my console shows error like this I don’t know how to resolve this No handler found for uri ...
0
votes
1answer
30 views

Query within date range for specific data

I have an index of events like so (please excuse the simplified free hand version) {event:{ properties: {id:{type: 'string'}, start:{type: 'date'}}} I want to query this data to return all events ...
1
vote
1answer
92 views

Elasticsearch SocketError (getaddrinfo: Name or service not known)

I'm using the Tire gem in Ruby on Rails to use Elasticsearch for searching. On my local machine it works great. On my staging server I (randomly?) get this error: SocketError (getaddrinfo: Name or ...
0
votes
0answers
22 views

Maintainance of elastic search in rails from admin

I Have elastic search application up and running in rails.But I am not sure about the maintenance of the system from admin side like indexing, data etc .. as my database keep growing if I need to ...
0
votes
1answer
97 views

Elastic Search - How to import data?

When I run rake environment tire:import CLASS='Article.all' INDEX='mongo-articles' FORCE=true To import data in Elastic Search ** Invoke environment (first_time) ** Execute environment ** Invoke ...
0
votes
0answers
44 views

using ruby and sinatra (on heroku) how can I set up elasticsearch with websoir to use and index hosted on another site?

I am using ruby and sinatra with a heroku app. I want "add on" websoir and then search and work with US government statistics data hosted here: http://census.ire.org/data/bulkdata.html Is it possible ...
0
votes
0answers
49 views

how to use karmi / retire for elastic search as a database

I am using elastic search by karmi/retire https://github.com/karmi/retire I want to know how to use the sole storage backend is the elasticsearch. and how to get data retrial you can refer my ...
1
vote
1answer
73 views

Multiple Search terms using Ruby Searchkick

I have set everything up using ElasticSearch and SearchKick, however, I cannot get it to work quite like I want to. I need to have multiple searches. My model, Car, has two attributes such as "Make" ...
0
votes
0answers
50 views

table is not generated after rake db:seed

I have one csv file with bunch of data when I use rake db:seed command console shows.. deleting old index creating new index starting import 20 refresh index look like every thing fine but table ...
0
votes
0answers
64 views

Limit search results based on belongs_to relation - with `mongoid-elasticsearch` gem for Ruby

I am trying to limit my search to only objects belonging to the current users objects, so each user don't see other users objects. I am searching with use of the gem mongoid-elasticsearch. This is my ...
0
votes
0answers
75 views

Set Faraday Timeout in Ruby ElasticSearch Client

Is it possible to set the timeout property of a Faraday transport when creating a Ruby Elasticsearch::Client? There is the scope to pass a block when initializing an ...
0
votes
1answer
28 views

ElasticSearch returns when querying new Index

We're getting the following error intermittently when creating and then querying a solitary index as part of an ElasticSearch test: SearchPhaseExecutionException[Failed to execute phase ...
0
votes
0answers
28 views

elasticsearch field populated with object Object

My index defines this column as: :service_data => { :type => 'string', :index => 'no' } and I am populating it with an array of JSONs In elastic HQ i see the data as: [object ...
0
votes
1answer
246 views

Rails and elasticsearch undefined method `delete_if' for String

I tried to add search for my rails app using elasticsearch. So I wrote this code but after submitting search query I've got this error: undefined method `delete_if' for "my search query":String ...
0
votes
0answers
108 views

logstash throwing error when using multiple worker thread

Here is how I am running logstash: java -Xms3g -Xmx3g -jar logstash-1.3.1-flatjar.jar agent -f logstash.conf -w 4 -- web without -w 4 flag it works just fine but get slower as lot of processing ...
1
vote
1answer
70 views

Elasticsearch gem - API call format

I using this gem https://github.com/elasticsearch/elasticsearch-ruby for elasticsearch API I trying to convert the following curl statement to an equivalent API call curl -X GET ...
0
votes
0answers
39 views

How to prevent Tire from overriding non-persistent attributes

I have a simple ActiveRecord model, User, which has a few persistent attributes (i.e. stored in a SQL DB) and a few properties which only need to be indexed in Elasticsearch. It looks like this: ...
1
vote
1answer
79 views

How to sort search results with `mongoid-elasticsearch` gem for Ruby

I am trying to implement sorting into my search. I am searching with use of the gem mongoid-elasticsearch. This is my model configuration: class ActivityLog include Mongoid::Document include ...
0
votes
2answers
42 views

Impact of the “_id” field in elasticsearch, in the search method?

I have some trouble with elasticsearch... I managed to create a reproducible example on my machine, the code is at the end of the post. I just create 6 users, "Roger Sand", "Roger Gilbert", "Cindy ...
0
votes
1answer
95 views

Ruby on Rails - Tire - elasticsearch, how to sort data being imported?

we are still using (re)Tire for elasticsearch in our production system. My question is how to run import task for index and providing it with sorted data from mongoid. Eg. I want to index 90 million ...
0
votes
0answers
31 views

Elasticsearh and vcr gem in rails

I have a simple question so I guess it doesn't demand a lot of code. Just simple explanation. I have rspec tests. I test my, let's say, library(that use elasticsearch-ruby gem), wich querying data. ...
2
votes
1answer
66 views

IndexPrimaryShardNotAllocatedException error while trying to close an elasticsearch cluster

After installing elasticsearch on my machine using https://gist.github.com/wingdspur/2026107 which starts an elasticsearch cluster at http://localhost:9200, I am trying to create an index with ...
1
vote
2answers
251 views

How to use elasticsearch in rails

I am totally new in elastic search. i installed the elastic search in my system. at localhost:9200 it is showing { "ok" : true, "status" : 200, "name" : "Unseen", "version" : { "number" ...
1
vote
0answers
83 views

Elastic search mapping issue with tire

Following is the mapping in Occurrence model mapping do indexes :_event_id, type: 'integer', index: :not_analyzed,boost: 1000 indexes :start, type: 'date', index: :not_analyzed , boost: 100 ...
0
votes
1answer
42 views

Elasticsearch ActiveModel integration

The Tire gem has been retired and has been replaced by the new elasticsearch gem. The elasticsearch gem doesn't appear to include ActiveModel integration or will_paginate compatibility. Are there any ...
1
vote
2answers
76 views

Integrated Elasticsearch with acts_as_paranoid gem with Rails 3.2

I'm trying to filter out all deleted records (using paranoid gem https://github.com/goncalossilva/acts_as_paranoid) out of Elasticsearch result. The acts_as_paranoid is soft delete, this gem will ...
0
votes
0answers
209 views

Getting a IndexMissingException using tire w/ elasticsearch even after indexing model

When trying to run a query like: search = Tire::Search::Search.new("retailer") search.query { string('description:'+store) } results = search.results.to_ary I get the error: 404 : ...
2
votes
1answer
81 views

elasticsearch exact match with dashes

We have an index of domain names in elasticsearch (we are using the tire gem with ruby to connect and maintain this) however we are having trouble with exact searches. If I search for the term ...
1
vote
1answer
181 views

How do I create elasticsearch indexes for ruby projects?

I've gone over this: https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch-api#usage The given example for creating an index is` client.index index: 'myindex', type: ...
0
votes
1answer
52 views

elasticsearch in a single page application

I am looking for some high level advice on the following: I want to use elasticsearch in an ember.js single page application. I have a sinatra application which is the API layer for this ...
0
votes
1answer
83 views

Elasticsearch on text field of postgres table

I am looking for some high level advice on how to get started with the following requirements: We have a ruby sinatra API service that is running on heroku that syncs users email with our system. We ...
0
votes
1answer
76 views

Rails Tire search on ActiveRecord:Relation on multiple fields

I have a collection of ActiveRecord models queried from the database. I would like to perform a Tire search on that Relation object returned from ActiveRecord, e.g: class Model_1 has_many :model_2 ...