Liking cljdoc? Tell your friends :D

com.eldrix.hermes.impl.search

Search creates a Lucene search index for descriptions.

Search creates a Lucene search index for descriptions.
raw docstring

boost-length-queryclj

(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
sourceraw docstring

build-search-indexclj

(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`.
sourceraw docstring

concept->documentsclj

(concept->documents store language-refset-ids concept)
source

do-query-for-conceptsclj

(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
sourceraw docstring

do-query-for-resultsclj

(do-query-for-results searcher q)
(do-query-for-results searcher q max-hits)
source

(do-search searcher {:keys [max-hits] :as params})

Perform a search against the index. Parameters:

  • searcher : the IndexSearcher to use
  • params : a map of search parameters, which are: | keyword | description | |--------------------- |----------------------------------------------------| | :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.

Perform a search against the index.
Parameters:
- searcher : the IndexSearcher to use
- params   : a map of search parameters, which are:
  | keyword                 | description |
  |---------------------    |----------------------------------------------------|
  | :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.
sourceraw docstring

doc->resultclj

(doc->result doc)
source

extended-description->documentclj

(extended-description->document ed)

Turn an extended description into a Lucene document.

Turn an extended description into a Lucene document.
sourceraw docstring

make-extended-descriptionsclj

(make-extended-descriptions store language-refset-ids concept)
source

open-index-readerclj

(open-index-reader filename)
source

open-index-writerclj

(open-index-writer filename)
source

q-acceptabilityclj

(q-acceptability accept refset-id)
source

q-acceptabilityAnyclj

(q-acceptabilityAny accept refset-ids)
source

q-ancestorOfclj

(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.
sourceraw docstring

q-ancestorOfAnyclj

(q-ancestorOfAny store concept-ids)
source

q-ancestorOrSelfOfclj

(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.
sourceraw docstring

q-ancestorOrSelfOfAnyclj

(q-ancestorOrSelfOfAny store concept-ids)
source

q-andclj

(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.
sourceraw docstring

q-anyclj

(q-any)

Returns a query that returns 'any' concept.

Returns a query that returns 'any' concept.
sourceraw docstring

q-attribute-countclj

(q-attribute-count property minimum maximum)

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)
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)
```
sourceraw docstring

q-attribute-descendantOrSelfOfclj

(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.
sourceraw docstring

q-attribute-exactly-equalclj

(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`.
sourceraw docstring

q-attribute-in-setclj

(q-attribute-in-set property coll)
source

q-childOfclj

(q-childOf concept-id)

A query for direct (proximal) children of the specified concept.

A query for direct (proximal) children of the specified concept.
sourceraw docstring

q-childOfAnyclj

(q-childOfAny concept-ids)
source

q-childOrSelfOfclj

(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.
sourceraw docstring

q-childOrSelfOfAnyclj

(q-childOrSelfOfAny concept-ids)
source

q-concept-idsclj

(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.
sourceraw docstring

q-descendantOfclj

(q-descendantOf concept-id)

Returns a query that matches descendants of the specified concept.

Returns a query that matches descendants of the specified concept.
sourceraw docstring

q-descendantOfAnyclj

(q-descendantOfAny concept-ids)
source

q-descendantOrSelfOfclj

(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.
sourceraw docstring

q-descendantOrSelfOfAnyclj

(q-descendantOrSelfOfAny concept-ids)
source

q-description-memberOfclj

(q-description-memberOf refset-id)
source

q-description-memberOfAnyclj

(q-description-memberOfAny refset-ids)
source

q-fsnclj

(q-fsn)
source

q-match-allclj

(q-match-all)
source

q-memberOfclj

(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.
sourceraw docstring

q-memberOfAnyclj

(q-memberOfAny refset-ids)
source

q-memberOfInstalledReferenceSetclj

(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.
sourceraw docstring

q-notclj

(q-not q1 q2)

Returns the logical query of q1 NOT q2

Returns the logical query of q1 NOT q2
sourceraw docstring

q-orclj

(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'.
sourceraw docstring

q-parentOfclj

(q-parentOf store concept-id)
source

q-parentOfAnyclj

(q-parentOfAny store concept-ids)
source

q-parentOrSelfOfclj

(q-parentOrSelfOf store concept-id)
source

q-parentOrSelfOfAnyclj

(q-parentOrSelfOfAny store concept-ids)
source

q-selfclj

(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.
sourceraw docstring

q-termclj

(q-term s)
source

q-typeclj

(q-type type)
source

q-typeAnyclj

(q-typeAny types)
source

q-wildcardclj

(q-wildcard s)
source

rewrite-queryclj

(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.
sourceraw docstring

search-allclj

(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.
sourceraw docstring

test-queryclj

(test-query store searcher q max-hits)
source

tokenizeclj

(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.
sourceraw docstring

topdocs->concept-idsclj

(topdocs->concept-ids searcher top-docs)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close