arranger icon indicating copy to clipboard operation
arranger copied to clipboard

SQON -> ES query builder not handling multiple 'IN' values of different types (or multiple sets)

Open jgnieuwhof opened this issue 6 years ago • 3 comments

the sqon -> es query builder is currently not handling different types of values properly. it makes decisions based off the first value in the operation, rather than dissecting the values and constructing the ES query appropriately.

symptoms:

  • if the first value contains a '*', all values are treated as such
  • cannot mix set_id values with non-set values
  • if multiple set_id values are provided only the first one is acknowledged

jgnieuwhof avatar Apr 18 '18 19:04 jgnieuwhof

All special filters should only have 1 value. normalizeFilters will split them into separate filters

https://github.com/overture-stack/arranger/blob/master/modules/middleware/src/buildQuery/normalizeFilters.js#L24

set_id would need to be added to that function :)

Jephuff avatar Apr 18 '18 21:04 Jephuff

There was also this pull request that removed the checking for the * value... but I think I merged it into a dead branch :P so if it's still something thats wanted it could be made into a new pr :) https://github.com/overture-stack/arranger/pull/290

Jephuff avatar Apr 18 '18 21:04 Jephuff

@Jephuff - gotcha! thanks for the insight, yeah that branch got a little stale so I pulled those changes out into another, must have missed that bit. still savin' us from afar eh?

jgnieuwhof avatar Apr 18 '18 21:04 jgnieuwhof