Questions tagged [elasticsearch-model]

46 questions
0
votes
1 answer

ElasticSearch apply limit on bucket results

I am in a situation where I have applied limit for the ElasticSearch results but it's not working for me. I have gone through the ES guide below is my code: module Invoices class RestaurantBuilder < Base def query(options = {}) …
0
votes
0 answers

Spring Data and ElasticSearch

I just started to create a app using Spring Data and Elasticsearch starter for spring boot. My doubt is about the concept in true ... my first needs is create a type that will be able to save a lot of words. First lets considering: I have a lot of…
0
votes
0 answers

rails elasticsearch-model multiple params query

I want to run multiple params of search with elasticsearch-model gem like below. Before i used gem tire to search records using multiple params of queries. My model: class Book < ApplicationRecord include Tire::Model::Search include…
0
votes
1 answer

Modifying the resulting columns of an elasticsearch query

So I took on a larger project and am unsure where to find the code that modifies this. We have a database, where it's read as Essay -> Section -> figure, and we're trying to add a new column named 'video_url'. I believe this has to do with…
haxonek
  • 174
  • 1
  • 2
  • 17
0
votes
1 answer

ElasticSearch + Rails multiple `must` not working correctly

As per docs I am using this syntax: self.search( query: { bool: { must: { match: { type: 'user' } }, must: { match: { status: status } }, must: { range: { created_at: { from: date_from, to: date_to } } } } }, size:…
alv_721
  • 305
  • 3
  • 18
0
votes
0 answers

Elasticsearch update mapping for type within index and reindexing

I've got an index called business_data which contains different types: Clients, Messages, Events etc... each one of these has its own mappings, analyzers, etc. I need to update the mapping for clients and reindex (reimport from activerecord, for…
0
votes
1 answer

Can't get Elasticsearch filter to work

using Elasticsearch 2 with Rails 4, using elasticsearch-model gem Everything is fine and even geo-point distance is working. However, I can't work out for the life of me how to make a simple boolean filter work. I have a simple boolean…
bobomoreno
  • 2,848
  • 5
  • 23
  • 42
0
votes
1 answer

How do you use the ingest-attachment plugin with elasticsearch-rails?

I was previously using the mapper-attachments plugin that is now deprecated, which was fairly easy to use along with normal indexing. Now that ingest-attachment has replaced it and requires a pipeline, etc. it has become confusing on how to properly…
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

ElasticSearch not using all fields (array of strings) for search

I'm just getting started with ES in rails and I encounted something I don't understand: I have an Artist model (simplified for the example): class Artist < ActiveRecord::Base include Elasticsearch::Model include Elasticsearch::Model::Callbacks …
gfd
  • 1,281
  • 1
  • 13
  • 19
0
votes
1 answer

Indexing on column field is not working with ElasticSearch

I'm implementing ElasticSearch integration in my model : require 'elasticsearch/model' class MissionDef < ActiveRecord::Base # field: name (String(40)) # field: icon (String(2000)) # field: definition (String) # field: public, boolean …
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
1 answer

Elasticsearch - implications of splitting documents into separate indexes

Let's say I have 100,000 documents from different customer groups, which are formatted the same with the same type of information. Documents from individual customer groups get refreshed at different times of the day. I've been recommended to give…
Jimmy
  • 12,087
  • 28
  • 102
  • 192
0
votes
0 answers

Indexing/Importing data from big JSON file

Does anyone tried to add/create index to ES from JSON files. I am looking for solution where I can "import" lots of data from JSON files directly to ES. So far I found two plugins. First is FileSystem River for Elasticsearch. The problem with this…
Misha
  • 1,876
  • 2
  • 17
  • 24