              id
              {:parent parent-id
               :content (get-in body [:extract :tika-content :text])
+              :title title
               :tags (get-tags-from-path directory)
               :allow_token_document (simple-perms true)
               :deny_token_document (simple-perms false)

  [fs es-index {:keys [directory entry] :as body} {publish :publish}]
  (let [parent-id (make-id "" directory)
        id (make-id "" directory (:relpath entry))
        simple-perms (simplify-permissions-for-es (:permissions entry))]



(def mapping-types
  {"doc" {:_all {:enabled false},
          :properties
          {:parent {:index "not_analyzed", :type "string", :store "yes"},
           :tags {:index "not_analyzed",
                  :type "string",
                  :index_options "docs",
                  :store true,
                  :omit_norms true},
           :lastmodified {:type "date", :store "yes"},
           :content {:type "string", :store "yes"},
           :title   {:type "string", :store "yes"},

           :deny_token_document {:index "not_analyzed",
                                 :type "string",
                                 :store true,
                                 :null_value "UNAUTHENTICATED"},
           :allow_token_document {:index "not_analyzed",
                                  :type "string",
                                  :store true,
                                  :null_value "NOBODY"}},
          :_source {:enabled false}},
   "dir" {:_all {:enabled false},
          :properties
          {:lastmodified {:type "date", :store "yes"},
           :parent {:index "not_analyzed", :type "string", :store "yes"}},
          :_source {:enabled false}}})

