dsl

query return [parsing_exception] [size] query malformed, no start_object after query name, with { line=1 & col=264 }

人走茶凉 提交于 2020-12-23 14:20:47
问题 I'm new in elasticsearch, and i try to use dev tools to create filters. here is what work and I want to use POST /transform_alldomain/_search { "size":0, "aggs": { "group": { "terms": { "field": "Email.keyword" }, "aggs": { "group": { "terms": { "field": "bln.keyword" }, "aggs": { "group_docs": { "top_hits": { "size": 1, "sort": [ { "extract_date.max": { "order": "desc" } } ] } } } } } } }} now i want to use this similiar stuff to filter as type this into filter, edit as query dsl { "size":0,

Apache Camel: How to pass values from configure method to from() & to() components? — [RESOLVED]

谁都会走 提交于 2020-12-15 00:50:58
问题 I have a scenario where I have to read a file from the location on certain interval, extract the file name & file path, hit 2 rest services which is a Get & Post call using those inputs & place the file in appropriate location. I have managed a pseudo code as follows. Wanted to know if there's a better way of achieving this using Camel. Appreciate your help! The flow is - Extract the fileName Hit a Get endpoint ('getAPIDetails') using that fileName as an input to check if that fileName exists

Apache Camel: How to pass values from configure method to from() & to() components? — [RESOLVED]

自古美人都是妖i 提交于 2020-12-15 00:50:34
问题 I have a scenario where I have to read a file from the location on certain interval, extract the file name & file path, hit 2 rest services which is a Get & Post call using those inputs & place the file in appropriate location. I have managed a pseudo code as follows. Wanted to know if there's a better way of achieving this using Camel. Appreciate your help! The flow is - Extract the fileName Hit a Get endpoint ('getAPIDetails') using that fileName as an input to check if that fileName exists

Apache Camel: How to pass values from configure method to from() & to() components? — [RESOLVED]

本秂侑毒 提交于 2020-12-15 00:47:12
问题 I have a scenario where I have to read a file from the location on certain interval, extract the file name & file path, hit 2 rest services which is a Get & Post call using those inputs & place the file in appropriate location. I have managed a pseudo code as follows. Wanted to know if there's a better way of achieving this using Camel. Appreciate your help! The flow is - Extract the fileName Hit a Get endpoint ('getAPIDetails') using that fileName as an input to check if that fileName exists

How to search on multiple fields of array in elasticsearch

好久不见. 提交于 2020-12-13 03:33:26
问题 I have a index in elastic search called professor If for cross field i need "AND" condition for same field array i need to OR condition I need to search subject which is Physics or Accounting this is array of fields(OR) statement AND I need to search type is Permanent or GUEST condition this is array of fields(OR) statement AND I need to search Location is NY (&) condition test = [{'id':1,'name': 'A','subject': ['Maths','Accounting'],'type':'Contract', 'Location':'NY'}, { 'id':2,'name': 'AB',

Bucket sort in composite aggregation?

跟風遠走 提交于 2020-12-13 03:15:44
问题 How can I do Bucket Sort in composite Aggregation? I need to do Composite Aggregation with Bucket sort. I have tried Sort with aggregation. I have tried composite aggregation. 回答1: I think this question, is in continuation to your previous question, so considered the same use case You need to use Bucket sort aggregation that is a parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation. And please refer to this documentation on composite aggregation to know

Bucket sort in composite aggregation?

五迷三道 提交于 2020-12-13 03:15:43
问题 How can I do Bucket Sort in composite Aggregation? I need to do Composite Aggregation with Bucket sort. I have tried Sort with aggregation. I have tried composite aggregation. 回答1: I think this question, is in continuation to your previous question, so considered the same use case You need to use Bucket sort aggregation that is a parent pipeline aggregation which sorts the buckets of its parent multi-bucket aggregation. And please refer to this documentation on composite aggregation to know

Sort Aggregation in elastic seach?

流过昼夜 提交于 2020-12-13 03:07:11
问题 I have use case where I need to get all unique user ids from Elasticsearch and it should be sorted by timestamp. What I'm using currently is composite term aggregation with sub aggregation which will return the latest timestamp. (I can't sort it in client side as it slow down the script) Sample data in elastic search { "_index": "logstash-2020.10.29", "_type": "doc", "_id": "L0Urc3UBttS_uoEtubDk", "_version": 1, "_score": null, "_source": { "@version": "1", "@timestamp": "2020-10-29T06:56:00

Sort Aggregation in elastic seach?

Deadly 提交于 2020-12-13 03:06:37
问题 I have use case where I need to get all unique user ids from Elasticsearch and it should be sorted by timestamp. What I'm using currently is composite term aggregation with sub aggregation which will return the latest timestamp. (I can't sort it in client side as it slow down the script) Sample data in elastic search { "_index": "logstash-2020.10.29", "_type": "doc", "_id": "L0Urc3UBttS_uoEtubDk", "_version": 1, "_score": null, "_source": { "@version": "1", "@timestamp": "2020-10-29T06:56:00

How to make Filter Aggregation inside Bucket Aggregation?

邮差的信 提交于 2020-12-09 05:12:13
问题 The bounty expires in 15 hours . Answers to this question are eligible for a +50 reputation bounty. priyanka.sarkar is looking for an answer from a reputable source . I have the below requirement. I have some records which looks as under (as an example) agreementid = 1, lastdispositioncode = PTP , feedbackdate = 30/11/2020 agreementid = 1, lastdispositioncode = PTP , feedbackdate = 29/11/2020 agreementid = 1, lastdispositioncode = BPTP , feedbackdate = 21/11/2020 agreementid = 2,