Members creates a Lucene search index for reference set members.
Members creates a Lucene search index for reference set members.
(build-members-index store-filename refset-index-filename)
Build a refset members index using the SNOMED CT store at store-filename
.
Build a refset members index using the SNOMED CT store at `store-filename`.
(localdate->epoch-milli date)
Converts a java.time.LocalDate to the number of milliseconds from the epoch of 1970-01-01T00:00:00Z.
Converts a java.time.LocalDate to the number of milliseconds from the epoch of 1970-01-01T00:00:00Z.
(make-document item)
Create a Lucene document representing the given reference set item. Reference set items consist of a core set of keys and values, together with a range of other properties for a specific subtype, or some custom properties in a given distribution. The meaning of those properties are defined in refset descriptors. All values are either integers, component identifiers or strings.
Currently, we do not use the runtime information made available in the refset descriptors, as we can derive type easily by simply looking at the value.
Create a Lucene document representing the given reference set item. Reference set items consist of a core set of keys and values, together with a range of other properties for a specific subtype, or some custom properties in a given distribution. The meaning of those properties are defined in refset descriptors. All values are either integers, component identifiers or strings. Currently, we do not use the runtime information made available in the refset descriptors, as we can derive type easily by simply looking at the value.
Create Lucene field(s) from the value. This could use additional runtime information if it became necessary in the future. At the moment, we simply use the class of the value but could use the attribute type information from the attribute reference set if required.
Create Lucene field(s) from the value. This could use additional runtime information if it became necessary in the future. At the moment, we simply use the class of the value but could use the attribute type information from the attribute reference set if required.
(open-index-writer filename)
Creates a Lucene index at 'filename'.
Creates a Lucene index at 'filename'.
(q-all)
Returns a query to match all documents.
Returns a query to match all documents.
(q-field!= field value)
Create a query for items with a field not equal to
Create a query for items with a field not equal to
(q-field= field value)
Create a query for items with a field equal to
Create a query for items with a field equal to
(q-module-id module-id)
Create a query for items with the specified module id
Create a query for items with the specified module id
(q-module-ids module-ids)
Create a query for items with the specified module ids
Create a query for items with the specified module ids
(q-not q1 q2)
Returns the logical query of q1 NOT q2
Returns the logical query of q1 NOT q2
(q-prefix field-name term)
Create a prefix query for the field specified.
Create a prefix query for the field specified.
(q-referenced-component component-id)
Create a query for items relating to the specified component.
Create a query for items relating to the specified component.
(q-refset-id refset-id)
Create a query for items belonging to the reference set specified
Create a query for items belonging to the reference set specified
(q-refset-ids refset-ids)
Create a query for items belonging to the reference sets specified.
Create a query for items belonging to the reference sets specified.
(q-term field-name term)
Create a query for the exact match for the field specified.
Create a query for the exact match for the field specified.
(q-time!= d)
(q-time!= field d)
Create a query for items with a field, or an effective time, not equal to 'd'.
Create a query for items with a field, or an effective time, not equal to 'd'.
(q-time< d)
(q-time< field d)
Create a query for items with a field, or an effective time, less than 'd'.
Create a query for items with a field, or an effective time, less than 'd'.
(q-time<= d)
(q-time<= field d)
Create a query for items with a field, or an effective time, less than or equal to 'd'.
Create a query for items with a field, or an effective time, less than or equal to 'd'.
(q-time= d)
(q-time= field d)
Create a query for items with a field, or an effective time, equal to 'd'.
Create a query for items with a field, or an effective time, equal to 'd'.
(q-time> d)
(q-time> field d)
Create a query for items with a field, or an effective time, greater than 'd'.
Create a query for items with a field, or an effective time, greater than 'd'.
(q-time>= d)
(q-time>= field d)
Create a query for items with a field, or an effective time, greater or equal than 'd'.
Create a query for items with a field, or an effective time, greater or equal than 'd'.
(q-wildcard field term)
Create a wildcard query for the field specified. From the Lucene documentation: "Supported wildcards are *, which matches any character sequence (including the empty one), and ?, which matches any single character. '' is the escape character. Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow wildcard queries, a term should not start with the wildcard *".
Create a wildcard query for the field specified. From the Lucene documentation: "Supported wildcards are *, which matches any character sequence (including the empty one), and ?, which matches any single character. '\' is the escape character. Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow wildcard queries, a term should not start with the wildcard *".
(search searcher query)
Performs the search, returning a set of referenced component identifiers.
Performs the search, returning a set of referenced component identifiers.
(search* searcher query)
Performs a search and returns whether result not empty. For refset membership testing, this is an order of magnitude slower than using the 'store' refset function.
(time (search-not-empty? searcher (q-and [(q-refset-id 734138000) (q-referenced-component 24700007)])))
"Elapsed time: 2.756541 msecs"
(time (store/get-component-refset-items store 24700007 734138000))
"Elapsed time: 0.18375 msecs"
As such, this should only be used outside of scenarios in which that cannot be used, such as more complex or arbitrary field queries.
Performs a search and returns whether result not empty. For refset membership testing, this is an order of magnitude slower than using the 'store' refset function. ``` (time (search-not-empty? searcher (q-and [(q-refset-id 734138000) (q-referenced-component 24700007)]))) "Elapsed time: 2.756541 msecs" (time (store/get-component-refset-items store 24700007 734138000)) "Elapsed time: 0.18375 msecs" ``` As such, this should only be used outside of scenarios in which that cannot be used, such as more complex or arbitrary field queries.
A set of field names for which we store values in the index
A set of field names for which we store values in the index
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close