Questions tagged [elasticsearch-ruby]
31 questions
9
votes
1 answer
Elasticsearch 7 The [standard] token filter has been removed
I am attempting to upgrade to Elasticsearch v7 (I'm using the ruby/rails client), and upon doing so and fixing several stuff, I run across the following error
Elasticsearch::Transport::Transport::Errors::BadRequest:
[400]…

Cyril Duchon-Doris
- 12,964
- 9
- 77
- 164
6
votes
1 answer
How to pass list of values for a particular field in Elastic Search Query
I have a query to search for a provider_id from the Elastic Search Cluster. I am using the below query to get results for a single provider_id but need help in figuring out how can I pass a list of providers.
{
"query": {
"bool": {
…

python
- 4,403
- 13
- 56
- 103
5
votes
0 answers
Elastic search Garbage Collection taking more time due to aggregation queries
Elastic search spikes and request queuing are frequently happening whenever heavy aggregation is running.Is there any way to avoid this?

Seenivasan Kannan
- 61
- 5
3
votes
1 answer
Nested sorting not working as expected ElasticSearch
Requirement
sort product with custom_field_values matching custom_field_id
Mapping
{
"mapping": {
"product": {
"properties": {
"user_id": {
"type": "integer"
}
"custom_field_values": {
…

przbadu
- 5,769
- 5
- 42
- 67
2
votes
1 answer
In LogStash, how remove any json/xml field larger than specific size
In few words, I have this stack in our company for our corporate logs:
All Request/Response Log Files -> Filebeat -> Kafka -> Logstash - ElasiicSearch
Pretty common approach.
Nevertheless, there might exist in unexpected request/response format a…

Jim C
- 3,957
- 25
- 85
- 162
2
votes
1 answer
elasticsearch reindex documents reduce free space
steps:
- elasticsearch 2.3
- create documents in ES => ~ 1 GB of disk is used
- update same documents in ES => ~ 2 GB of disk is used
Why it happens?
Is it due to versioning?
Is it possible to avoid doubling disk usage?
Currently we use…

gayavat
- 18,910
- 11
- 45
- 55
2
votes
3 answers
Elasticsearch ranking shorter/less relevant titles first
I'm working on a product search with Elasticsearch 7.3. The product titles are not formatted the same but there is nothing I can do about this.
Some titles might look like this:
Ford Hub Bearing
And others like this:
Hub bearing for a Chevrolet…

Cannon Moyer
- 3,014
- 3
- 31
- 75
2
votes
1 answer
ElasticSearch Nested Query - exclude parent document
Trying to exclude top-level documents where one of the child documents doesn't match the query.
For the example below, I'm trying to exclude all documents where one of its nested jobs has current: true, and matches with the company name: Elastic.…

mrmbr007
- 112
- 1
- 6
2
votes
1 answer
Elastic Search not displaying data in rails
I have a document model and I am using elastic search on it
My document model is as Follows
require 'elasticsearch/model'
class Document < ApplicationRecord
include Elasticsearch::Model
include Elasticsearch::Model::Callbacks
…

Mahesh Mesta
- 169
- 7
2
votes
2 answers
Using percolate for bulk indexing in elasticsearch-ruby
According to this issue, elasticsearch supports using percolate with index (a single document) or bulk (multiple documents). No example is given for bulk, so I'm going by the issue's title that this functionality was added 5 years…

Alain Collins
- 16,268
- 2
- 32
- 55
1
vote
2 answers
Permission denied when starting elasticserach cluster in rspec test cases
I am using elasticsearch-ruby gem in my API application running on Ruby on Rails 6. In development env everything is running fine but for testing I wanted to create test cluster using elasticsearch-extensions gem. I am getting following error when I…

scs
- 119
- 7
1
vote
1 answer
Elasticsearch 6.3.2 terms match empty array "plus" others
In my database, a post can have zero (0) or more categories represented as an array.
When I do the query, to look within those categories, passing some values:
{
"query": {
"bool": {
"should": {
"terms": {
"categories":…

Karol Karol
- 566
- 3
- 7
- 26
1
vote
0 answers
Elastic Search "Did you mean" for auto correction of words implementation not working with rails
I am trying to implement full search text engine for my rails app using elastic search for a document class. It should have an auto correction for misspelled words.
This is my document.rb
require 'elasticsearch/model'
class Document <…

Mahesh Mesta
- 169
- 7
1
vote
2 answers
Is there a way to set a score range (or a max score) for a query
I have a very simple query :
match: {
field => {
boost: 4,
query: term,
fuzziness: 'AUTO',
}
}
Composed with several (about 10) others queries most of them using constant_score. The problem is that on specific terms, my query has a…

Julien TASSIN
- 5,004
- 1
- 25
- 40
1
vote
1 answer
custom mapping for mapper attachment type with elasticsearch-persistence ruby
In my project I store data in active record model and index html document in elasticsearch using mapper-attachments plugin. My document mapping look like this:
include Elasticsearch::Model
settings index: { number_of_shards: 5 } do
mappings do
…

channa ly
- 9,479
- 14
- 53
- 86