ckhalilo
(Khalil CHARFI)
November 27, 2017, 11:04am
1
Hi,
I need a help please, I have searched many topics and didn't find the answer.
I need to pass result of search as parameters like in SQL : SELECT * FROM Table Where Field_1 = (SELECT Field_1 FROM Table WHERE Field_2 = 'searched_data')
Here is my search in elasticsearch.
GET _search
{
"query": {
"query_string": {
"default_field": "msgbody",
"query": "searched_data"
}
},
"_source": ["thread_name"],
"size" : 1
}
I tried to pass in params but didn't find the right way:
GET _search/template
{
"source" : {
"query": {
"match_phrase" : { "{{my_field}}" : "{{my_value}}" }
}
},
"params" : {
"my_field" : "thread_name",
"my_value" : "my_search_results"
}
}
So my question is it possible to get result like SQL?
In case that's not possible, do you have any suggestion to get simular result?
Best Regards
Khalil CHARFI
ckhalilo
(Khalil CHARFI)
November 28, 2017, 8:57am
2
Up please any response will help me.
Thank you.
dadoonet
(David Pilato)
November 28, 2017, 9:43am
3
Please read
The heart of the free and open Elastic Stack
Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease.
PLEASE READ THIS SECTION IF IT'S YOUR FIRST POST
Some useful links:
elasticsearch reference guide
elasticsearch user guide
elasticsearch plugins
elasticsearch cl…
Specifically the "be patient" part.
dadoonet
(David Pilato)
November 28, 2017, 9:44am
4
You can't do that automatically so you need to solve that on your side (client side).
You will end up doing multiple calls.
ckhalilo
(Khalil CHARFI)
November 28, 2017, 10:40am
5
Thank you for your Help.
I know this is hard to answer every one.
I will be patient.
Best Regards
Khalil CHARFI
system
(system)
Closed
December 26, 2017, 10:40am
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.