flux
flux copied to clipboard
Create filter queries as hashmaps
Hello, thank you for this nice library!
I thought it would be nice if filter queries could be expressed as a hashmap rather than as a vector of strings, and if range queries could be expressed as vectors. Here comes an example:
(flux/query "*:*" {:fq {:text "blah" :days [1 10]}})
the :fq
hashmap will be converted to
["text:blah" "days:[1 TO 10]"]
before it is sent to create-solr-params
.
I'm still not very fluent in Clojure so the code might be a bit naive but I hope it clarifies the intention :)