(boost-length-query q)Returns a new query with scores boosted by the inverse of the length
Returns a new query with scores boosted by the inverse of the length
(build-search-index store-filename search-filename language-priority-list)Build a search index using the SNOMED CT store at store-filename.
Build a search index using the SNOMED CT store at `store-filename`.
(concept->documents store language-refset-ids concept)(do-query-for-concepts searcher query)(do-query-for-concepts searcher query max-hits)Perform the query, returning results as a set of concept identifiers
Perform the query, returning results as a set of concept identifiers
(do-query-for-results searcher q)(do-query-for-results searcher q max-hits)(do-search searcher {:keys [max-hits] :as params})Perform a search against the index. Parameters:
The properties map contains keys for a property and then either a single identifier or vector of identifiers to limit search.
Example: to search for neurologist as an occupation ('IS-A' '14679004') (do-search searcher {:s "neurologist" :properties {snomed/IsA [14679004]}})
A FSN is a fully-specified name and should generally be left out of search.
Perform a search against the index.
Parameters:
- searcher : the IndexSearcher to use
- params   : a map of search parameters, which are:
  |- :s                  : search string to use
  |- :max-hits           : maximum hits (if omitted returns unlimited but
  |                        *unsorted* results)
  |- :fuzzy              : fuzziness (0-2, default 0)
  |- :fallback-fuzzy     : if no results, try fuzzy search (0-2, default 0).
  |- :query              : additional ^Query to apply
  |- :show-fsn?          : show FSNs in results? (default: false)
  |- :inactive-concepts? : search descriptions of inactive concepts?
  |                      : (default: false).
  |- :inactive-descriptions? : search inactive descriptions? (default, true)
  |- :properties         : a map of properties and their possible values.
  |- :concept-refsets    : a collection of refset identifiers to limit search
The properties map contains keys for a property and then either a single
identifier or vector of identifiers to limit search.
Example: to search for neurologist as an occupation ('IS-A' '14679004')
(do-search searcher {:s "neurologist"  :properties {snomed/IsA [14679004]}})
A FSN is a fully-specified name and should generally be left out of search.(doc->result doc)(extended-description->document ed)Turn an extended description into a Lucene document.
Turn an extended description into a Lucene document.
(make-extended-descriptions store language-refset-ids concept)(open-index-reader filename)(open-index-writer filename)(q-acceptability accept refset-id)(q-acceptabilityAny accept refset-ids)(q-ancestorOf store concept-id)A query for concepts that are ancestors of the specified concept.
A query for concepts that are ancestors of the specified concept.
(q-ancestorOfAny store concept-ids)(q-ancestorOrSelfOf store concept-id)A query for concepts that are ancestors of the specified concept plus the concept itself.
A query for concepts that are ancestors of the specified concept plus the concept itself.
(q-ancestorOrSelfOfAny store concept-ids)(q-and queries)Generate a logical conjunction of the queries. If there is more than one query, and one of those queries contains a single 'must-not' clause, it is flattened (re-written) into the new query.
Generate a logical conjunction of the queries. If there is more than one query, and one of those queries contains a single 'must-not' clause, it is flattened (re-written) into the new query.
(q-any)Returns a query that returns 'any' concept.
Returns a query that returns 'any' concept.
(q-attribute-count property minimum maximum)A query for documents for a count direct properties (parent relationships) of the type specified. Parameters
A query for documents for a count direct properties (parent relationships) of the type specified. Parameters - property : concept-id of the attribute - minimum : minimum count - maximum : maximum count (use Integer/MAX_VALUE for half-open range) For example, get concepts with 4 or more active ingredients: (q-attribute-count 127489000 4 Integer/MAX_VALUE).
(q-attribute-descendantOrSelfOf property value)Returns a query constraining to documents with the specified property and value. It uses the 'descendantOrSelfOf' constraint.
Returns a query constraining to documents with the specified property and value. It uses the 'descendantOrSelfOf' constraint.
(q-attribute-exactly-equal property value)A query for documents with the property exactly equal to the value.
Usually, it would be more appropriate to use q-attribute-descendantOrSelfOf.
A query for documents with the property exactly equal to the value. Usually, it would be more appropriate to use `q-attribute-descendantOrSelfOf`.
(q-attribute-in-set property coll)(q-childOf concept-id)A query for direct (proximal) children of the specified concept.
A query for direct (proximal) children of the specified concept.
(q-childOfAny concept-ids)(q-childOrSelfOf concept-id)A query for direct (proximal) children of the specified concept plus the concept itself.
A query for direct (proximal) children of the specified concept plus the concept itself.
(q-childOrSelfOfAny concept-ids)(q-concept-ids concept-ids)Returns a query that will return documents for the concepts specified.
Returns a query that will return documents for the concepts specified.
(q-descendantOf concept-id)Returns a query that matches descendants of the specified concept.
Returns a query that matches descendants of the specified concept.
(q-descendantOfAny concept-ids)(q-descendantOrSelfOf concept-id)Returns a query that matches descendants of the specified concept plus the specified concept itself.
Returns a query that matches descendants of the specified concept plus the specified concept itself.
(q-descendantOrSelfOfAny concept-ids)(q-description-memberOf refset-id)(q-description-memberOfAny refset-ids)(q-fsn)(q-match-all)(q-memberOf refset-id)A query for concepts that are referenced by the given reference set.
A query for concepts that are referenced by the given reference set.
(q-memberOfAny refset-ids)(q-memberOfInstalledReferenceSet store)A query for concepts that are a member of any reference set.
A query for concepts that are a member of any reference set.
(q-not q1 q2)Returns the logical query of q1 NOT q2
Returns the logical query of q1 NOT q2
(q-or queries)Generate a logical disjunction of the queries. If there is more than one query, and one of those queries contains a single 'must-not' clause, it is flattened (re-written) into the new query. As this is an 'or' operation, that means it will be combined with a 'match-all-documents'.
Generate a logical disjunction of the queries. If there is more than one query, and one of those queries contains a single 'must-not' clause, it is flattened (re-written) into the new query. As this is an 'or' operation, that means it will be combined with a 'match-all-documents'.
(q-parentOf store concept-id)(q-parentOfAny store concept-ids)(q-parentOrSelfOf store concept-id)(q-parentOrSelfOfAny store concept-ids)(q-self concept-id)Returns a query that will only return documents for the concept specified.
Returns a query that will only return documents for the concept specified.
(q-term s)(q-type type)(q-typeAny types)(q-wildcard s)(rewrite-query query)Rewrites a query separating out any top-level 'inclusions' from 'exclusions'. Returns a vector of two queries inclusions and the exclusions. Exclusions will be rewritten from MUST_NOT to MUST. Useful in a situation where exclusions need to be applied independently to a substrate and the NOT will be specified in a parent clause.
Rewrites a query separating out any top-level 'inclusions' from 'exclusions'. Returns a vector of two queries inclusions and the exclusions. Exclusions will be rewritten from MUST_NOT to MUST. Useful in a situation where exclusions need to be applied independently to a substrate and the NOT will be specified in a parent clause.
(search-all searcher q)Search a lucene index and return all results. Results are returned as a sequence of Lucene document ids.
Search a lucene index and return *all* results. Results are returned as a sequence of Lucene document ids.
(test-query store searcher q max-hits)(tokenize analyzer field-name s)Tokenize the string 's' according the 'analyzer' and field specified.
Tokenize the string 's' according the 'analyzer' and field specified.
(topdocs->concept-ids searcher top-docs)(write-batch! store writer language-refset-ids concepts)(write-concept! store writer language-refset-ids concept)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |