lib.lucene.impl.document
doc-values-type
added in 3.0
(doc-values-type s)returns the doc values type enum
(doc-values-type “NONE”) => org.apache.lucene.index.DocValuesType/NONE
document
added in 3.0
(document {:keys [fields], :as m})constructs a document
(document {:fields {:name “hello” :value “world” :type {}}})
document-set-fields
added in 3.0
(document-set-fields document fields)setters for document fields
(-> (document {}) (document-set-fields {:name “hello” :value “world” :type {}}))
field-construct
added in 3.0
(field-construct name value type)constructs a field
(field-construct “hello” “world” {}) ;; #field{:name “hello”, :type {:index :freq :doc}, :length 5} => org.apache.lucene.document.Field
field-type
added in 3.0
(field-type {:keys [tokenized stored omit-norms doc-values-type], :as m})constructs a field type
(field-type {:tokenized false :index #{}}) ;; #field.type{:tokenized false, :index []} => org.apache.lucene.document.FieldType
field-type-display
added in 3.0
(field-type-display m)returns field types that are not defaults
(field-type-display {:tokenized false :stored true}) => (contains {:tokenized false})
field-type-get-index
added in 3.0
(field-type-get-index ft)gets the field type index value
(field-type-get-index (field-type {})) => #{:freq :doc}
field-type-set-index
added in 3.0
(field-type-set-index ft value)sets the field type index value
(field-type-set-index (field-type {}) #{:doc})
field-value
added in 3.0
(field-value field value)setter for field value (-> (field-value (field-construct “hello” "" {}) “world”) (.stringValue)) => “world”
from-map
added in 3.0
(from-map m)(from-map m template)turns a map into a document
(from-map {:hello “world”} nil) => org.apache.lucene.document.Document
to-map
added in 3.0
(to-map document)turns the document into a map
(-> (document {:fields {:name “hello” :value “world” :type {}}}) to-map) => {:hello “world”}