in reply to Re: Queries for elastic search using perl
in thread Queries for elastic search using perl
I know the module. But I am preparing the queries for the elastic search.
((column08=Submit & column10=Delivered & column09=Something) | (column08=Delivered))This is the condition I am getting from GUI. I have to query the elastic search and return the result to the GUI through perl. For Quering we need to parse the condition in the form of elastic search query.
Whats my problem here is in my code (Mentioned in the main thread) 1) I am passing the inner braces to the function first
column08=Submit & column10=Delivered & column09=Something2) In line 58 I am giving my array to a hash
$return_hash{'bool'}{'must'} = [@return_array];I expected the output as
$VAR1 = ['bool' => { 'must' => [ { 'term' => { 'column08' => 'Submit' } }, { 'term' => { 'column10' => 'Delivered' } }, { 'term' => { 'column09' => 'Something' } } ] } ]
But Its returning it as
$VAR1 = [ 'bool', { 'must' => [ { 'term' => { 'column08' => 'Submit' } }, { 'term' => { 'column10' => 'Delivered' } }, { 'term' => { 'column09' => 'Something' } } ] } ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Queries for elastic search using perl
by Corion (Patriarch) on Jun 29, 2016 at 07:06 UTC | |
by ravi45722 (Pilgrim) on Jun 29, 2016 at 08:45 UTC | |
by Corion (Patriarch) on Jun 29, 2016 at 08:56 UTC | |
by hippo (Archbishop) on Jun 29, 2016 at 08:57 UTC | |
by ravi45722 (Pilgrim) on Jun 29, 2016 at 09:40 UTC | |
by hippo (Archbishop) on Jun 29, 2016 at 09:50 UTC | |
|