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-concept-idsclj

(do-query-for-concept-ids searcher query)
(do-query-for-concept-ids 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)

Perform a search using query 'q' returning results as a sequence of Result items.

Perform a search using query 'q' returning results as a sequence of Result
items.
sourceraw docstring

(do-search searcher
           {:keys [max-hits fuzzy fallback-fuzzy remove-duplicates?]
            :as params})

Perform a search against the index. Parameters:

  • searcher : the IndexSearcher to use
  • params : a map of search parameters, which are:
keyworddescription (default)
:ssearch string to use
:max-hitsmaximum hits (if omitted returns unlimited but
unsorted results)
:fuzzyfuzziness (0-2, default 0)
:fallback-fuzzyif no results, try fuzzy search (0-2, default 0).
:queryadditional ^Query to apply
:show-fsn?show FSNs in results? (default, false)
:inactive-concepts?search descriptions of inactive concepts? (false)
:inactive-descriptions?search inactive descriptions? (default, true)
:remove-duplicates?remove duplicate results (default, false)
:propertiesa map of properties and their possible values.
:concept-refsetsa collection of refset ids 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 (default)                             |
|---------------------    |---------------------------------------------------|
| :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? (false) |
| :inactive-descriptions? | search inactive descriptions? (default, true)     |
| :remove-duplicates?     | remove duplicate results (default, false)         |
| :properties             | a map of properties and their possible values.    |
| :concept-refsets        | a collection of refset ids 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

duplicate-result?clj

(duplicate-result? {a-concept-id :conceptId a-term :term}
                   {b-concept-id :conceptId b-term :term})

Are the given results, in effect, duplicates? This matches a result if they have the same conceptId and same term.

Are the given results, in effect, duplicates?
This matches a result if they have the same conceptId and same term.
sourceraw docstring

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

gen-resultclj

(gen-result)
(gen-result result)
source

make-extended-descriptionsclj

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

open-index-readerclj

(open-index-reader f)
source

open-index-writerclj

(open-index-writer f)
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)
source

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-activeclj

(q-concept-active active?)
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-concrete!=clj

(q-concrete!= type-id n)
source

q-concrete<clj

(q-concrete< type-id n)
source

q-concrete<=clj

(q-concrete<= type-id n)
source

q-concrete=clj

(q-concrete= type-id n)
source

q-concrete>clj

(q-concrete> type-id n)
source

q-concrete>=clj

(q-concrete>= type-id n)
source

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-activeclj

(q-description-active active?)
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-match-all?clj

(q-match-all? q)

Does the query match all documents?

Does the query match all documents?
sourceraw docstring

q-match-noneclj

(q-match-none)
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)

A query for concepts that are referenced by the given reference sets.

A query for concepts that are referenced by the given reference sets.
sourceraw docstring

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)
source

q-parentOfclj

(q-parentOf store concept-id)

A query for parents (immediate supertypes) of the specified concept excluding the concept itself.

A query for parents (immediate supertypes) of the specified concept excluding
the concept itself.
sourceraw docstring

q-parentOfAnyclj

(q-parentOfAny store concept-ids)

A query for parents (immediate supertypes) of the specified concepts.

A query for parents (immediate supertypes) of the specified concepts.
sourceraw docstring

q-parentOrSelfOfclj

(q-parentOrSelfOf store concept-id)

A query for parents (immediate supertypes) of the specified concept including the concept itself.

A query for parents (immediate supertypes) of the specified concept including
the concept itself.
sourceraw docstring

q-parentOrSelfOfAnyclj

(q-parentOrSelfOfAny store concept-ids)

A query for parents (immediate supertypes) of the specified concepts including the concepts themselves.

A query for parents (immediate supertypes) of the specified concepts
including the concepts themselves.
sourceraw docstring

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-id)
source

q-typeAnyclj

(q-typeAny types)
source

q-wildcardclj

(q-wildcard s)
source

remove-duplicatesclj

(remove-duplicates equality-fn)
(remove-duplicates equality-fn coll)

Returns a lazy sequence removing consecutive duplicates in coll with duplicates determined by equality function equality-fn. Returns a transducer when no collection is provided. Also see [[clojure.core/dedupe]].

Returns a lazy sequence removing consecutive duplicates in coll with
duplicates determined by equality function `equality-fn`.
Returns a transducer when no collection is provided.
Also see [[clojure.core/dedupe]].
sourceraw docstring

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

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

xf-doc-id->-resultclj

(xf-doc-id->-result searcher)

Returns a transducer that maps a Lucene document id into a search result.

Returns a transducer that maps a Lucene document id into a search result.
sourceraw docstring

xf-doc-id->concept-idclj

(xf-doc-id->concept-id searcher)

Returns a transducer that maps a Lucene document id into a concept identifier.

Returns a transducer that maps a Lucene document id into a concept identifier.
sourceraw docstring

xf-scoredoc->concept-idclj

(xf-scoredoc->concept-id searcher)

Returns a transducer that maps a Lucene ScoreDoc to a concept identifier

Returns a transducer that maps a Lucene ScoreDoc to a concept identifier
sourceraw docstring

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

× close