Questions tagged [elasticsearch-nested]

56 questions
1
vote
0 answers

Get results of parent when searched in child for nested document in elastic search

I have projects, and in each project I have tasks, and in each task I have comments. So it looks like: -> Projects -> Tasks -> Comments I have used nested documents to store the data in the index in Elastic search. My structure looks…
1
vote
1 answer

Elasticsearch structure in the correct and effective way for search engine

I'm building a search engine for my audio store. I only use 1 index for the audio documents and here is the structure: { id: { type: 'integer' }, title: { type: 'search_as_you_type' }, description: { type: 'text' }, createdAt: { type: 'date'…
1
vote
1 answer

How to sort nested aggregation field based on parent document field in elasticsearch?

I have index of stores at various location. With each store I have a nested list of discount coupon. Now I have query to get list of all unique coupons in a x km of radius sorted by the distance of the nearest applicable coupon on given…
1
vote
1 answer

Error when trying to rename a nested object name in elasticsearch

I'm trying to rename data that is in this shape: using this: POST r_xair_signals-2020-06/_update/2020-06-15T22:23:00Z_-1344027716 { "doc" : { "Customer ImpactedNested" : "CustomerImpactedNested" } } But I'm getting: "type":…
1
vote
2 answers

ElasticSearch simple query

I have structure like this in my ElasticSearch { _index: 'index', _type: 'product', _id: '896', _score: 0, _source: { entity_id: '896', category: [ { category_id:…
1
vote
1 answer

Bool Filter not showing just the filtered data in Elastic Search

I have an index "tag_nested" which has data of following type : { "jobid": 1, "table_name": "table_A", "Tags": [ { "TagType": "WorkType", "Tag": "ETL" }, { "TagType": "Subject Area", …
1
vote
1 answer

Return only elements of an array in an object that contain a certain value

I've got the following document in an elastic search index: { "type": "foo", "components": [{ "id": "1234123", , "data_collections": [{ "date_time": "2020-03-02T08:14:48+00:00", …
Timo
  • 433
  • 5
  • 17
1
vote
3 answers

Elasticsearch filter by multiple fields in an object which is in an array field

The goal is to filter products with multiple prices. The data looks like this: { "name":"a", "price":[ { "membershipLevel":"Gold", "price":"5" }, { "membershipLevel":"Silver", "price":"50" }, { …
MiDaa
  • 1,149
  • 1
  • 11
  • 25
1
vote
2 answers

Searchkick Nested Data

The manual states this (https://github.com/ankane/searchkick#nested-data): Nested Data To query nested data, use dot notation. User.search "san", fields: ["address.city"], where: {"address.zip_code" => 12345} This simply doesn't work or the…
Dan Tappin
  • 2,692
  • 3
  • 37
  • 77
1
vote
0 answers

Elasticsearch get users winning auctions (where users bid was highest) - something like having in SQL

I'm using Elasticsearch 6.8.2. I'm trying to get all winning auctions by user_id=1. If I pass user_id=1 I want to get "Auction 1" because user_id=1 was the highest bidder. I tried using Bucket Selector Aggregation but wasn't able to make it work…
1
vote
1 answer

Multiple match_phrase conditions with another bool in a single ElasticSearch query?

I am trying to conduct an Elasticsearch query that searched a text field ("body") and returns items that match at least one of two multi-word phrases I provide (ie: "stack overflow" OR "the stackoverflow"). I would also like the query to only…
1
vote
0 answers

Add sub aggregation in reverse nested aggregation in elastic search

my index consists of documents like this one { "clientPorttopKByCount": [ { "value": 1, "key": "41770" }, { "value": 1, "key": "41791" …
1
vote
1 answer

Nested Elastic search nested query isssue ES7.2

I need to make nested query on elastic search 7.2. use case: Lets say I have array of categories and inside categories I have array of persons. I need to be able to fetch documents such as select * from documents where categories.name = "category1"…
jimy page
  • 21
  • 3
1
vote
1 answer

"Mapping definition has unsupported parameters" error on multilevel nested mapping and queries

I am new to elasticsearch. I have nested data.Users->Cars. I need help in writing nested mappings. I have seen ES site regarding nesting query and basic one I am able to do. I ran into trouble while creating mapping for lets say depth 2/3. The…
Tuhin Subhra Mandal
  • 473
  • 1
  • 5
  • 15
1
vote
0 answers

elastic search nested aggregation followed by term aggregation followed by nested aggregation

I have a index with structure that has no. of times a user has loggen into system and is as follows: [{ "users_id": 5, "uname": "abcdef", "status": "active", "groups_id": 2, "user_login": [{ …