Open yxzhang opened 11 years ago
just like :
You can add maps with numeric value to the index:
(clucy/add index {:name "Bob", :age (int 20)} {:name "Donald", :age (int 35)})
Once maps have been added, the index can be searched:
user=> (binding [clucy/*numeric-hints* {"age" "int"}] (clucy/search index "age:20" 10)) ({:age 20, :name "Bob"})
Or do range query just as :
user=> (binding [clucy/*numeric-hints* {"age" "int"}] (clucy/search index "age:[32 TO 35]" 10)) ({:age 35, :name "Donald"})
Numberic type can be one of int, long, double, float.
You can use clojure collection to manage multivalued fields, eg.
(clucy/add index {:name "Bob", :books ["Clojure Programming" "Clojure In Action"] }
user=> (search index "books:action" 10) ({:name "Bob", :books ["Clojure Programming" "Clojure In Action"]})
just like :
Numeric Types
You can add maps with numeric value to the index:
Once maps have been added, the index can be searched:
Or do range query just as :
Numberic type can be one of int, long, double, float.
Multivalued Fields
You can use clojure collection to manage multivalued fields, eg.