flux icon indicating copy to clipboard operation
flux copied to clipboard

Create filter queries as hashmaps

Open fedragon opened this issue 9 years ago • 0 comments

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 :)

fedragon avatar Apr 03 '15 07:04 fedragon