in reply to Re^2: Queries for elastic search using perl
in thread Queries for elastic search using perl

Where do the two data structures differ?

  • Comment on Re^3: Queries for elastic search using perl

Replies are listed 'Best First'.
Re^4: Queries for elastic search using perl
by ravi45722 (Pilgrim) on Jun 29, 2016 at 08:45 UTC

    Near the bool. Its pushing as a element. Means the array contains two elements bool & the hash. But I expected that as a whole(one) hash.

      What do you mean exactly by "near the bool"?

      As posted, I see two data structures. The one you have:

      $VAR1 = ['bool' => { ...

      And the one you say you want:

      $VAR1 = [ 'bool', { ...

      But there is no difference to Perl between the two structures. 'bool' => ... and 'bool', ... are exactly the same. See perlop on the "fat comma".

      The fat comma is still a comma. The two structures are identical.

        If it is same I am pushing the hash into the @condition_array in line 65 and checking the size of array in the line 67. Its saying the size of array is 2. But as per you said the size should be one right ???