 (defn fetch-indexed [fields field values]
   (let [field-id (fields field)]
     (cond
-      (has-position? field-id) #{}) ; XXX fix this! Maybe should be a bin query?
-      (has-genes? field-id) (fetch-genes field-id values)))
+      (has-position? field-id) (fetch-position field-id values)
+      (has-genes? field-id) (fetch-genes field-id values))))
 
 ;
 ; sql eval methods

(defn fetch-genes [field-id values]
  (into (sorted-set) (field-genes field-id values)))

; fetch-indexed doesn't cache, and it's unclear
; if we should cache the indexed fields during 'restrict'.
; h2 also has caches, so it might be better to rely on them,

  (:require [honeysql.format :as hsqlfmt])
  (:require [honeysql.types :as hsqltypes])
  (:require [clojure.data.json :as json])
  (:require [cavm.binner :refer [calc-bin overlapping-bins]])
  (:use [clj-time.format :only (formatter unparse)])
  (:use [cavm.hashable :only (ahashable)])
  (:require [cavm.db :refer [XenaDb]])
