Interface IFulltextSearchSvc

All Known Implementing Classes:

public interface IFulltextSearchSvc
  • Method Details

    • search

      <T extends> List<T> search(String theResourceName, SearchParameterMap theParams, theRequestDetails)
      Search the Lucene/Elastic index for pids using params supported in theParams, consuming entries from theParams when used to query.
      theResourceName - the resource name to restrict the query.
      theParams - the full query - modified to return only params unused by the index.
      theRequestDetails - The request details
      the pid list for the matchign resources.
    • searchNotScrolled

      ISearchQueryExecutor searchNotScrolled(String theResourceName, SearchParameterMap theParams, Integer theMaxResultsToFetch, theRequestDetails)
      Query the index for a plain list (non-scrollable) iterator of results.
      theResourceName - e.g. Patient
      theParams - The search query
      theMaxResultsToFetch - maximum results to fetch
      theRequestDetails - The request details
      Iterator of result PIDs
    • tokenAutocompleteValueSetSearch

      org.hl7.fhir.instance.model.api.IBaseResource tokenAutocompleteValueSetSearch(ValueSetAutocompleteOptions theOptions)
      Autocomplete search for NIH $expand contextDirection=existing
      theOptions - operation options
      a ValueSet with the search hits as the expansion.
    • everything

      <T extends> List<T> everything(String theResourceName, SearchParameterMap theParams, T theReferencingPid, theRequestDetails)
    • isDisabled

      boolean isDisabled()
    • extractLuceneIndexData

      ExtendedHSearchIndexData extractLuceneIndexData(org.hl7.fhir.instance.model.api.IBaseResource theResource, ResourceIndexedSearchParams theNewParams)
    • supportsSomeOf

    • reindex

      void reindex(ResourceTable theEntity)
      Re-publish the resource to the full-text index. During update, hibernate search only republishes the entity if it has changed. During $reindex, we want to force the re-index.
      theEntity - the fully populated ResourceTable entity
    • lastN

      List<> lastN(SearchParameterMap theParams, Integer theMaximumResults)
    • getResources

      List<org.hl7.fhir.instance.model.api.IBaseResource> getResources(Collection<Long> thePids)
      Returns inlined resource stored along with index mappings for matched identifiers
      thePids - raw pids - we dont support versioned references
      Resources list or empty if nothing found
    • count

      long count(String theResourceName, SearchParameterMap theParams)
      Returns accurate hit count
    • searchForResources

      List<org.hl7.fhir.instance.model.api.IBaseResource> searchForResources(String theResourceType, SearchParameterMap theParams, theRequestDetails)
    • supportsAllOf

      boolean supportsAllOf(SearchParameterMap theParams)
    • deleteIndexedDocumentsByTypeAndId

      void deleteIndexedDocumentsByTypeAndId(Class theClazz, List<Object> theGivenIds)
      Given a resource type that is indexed by hibernate search, and a list of objects reprenting the IDs you wish to delete, this method will delete the resources from the Hibernate Search index. This is useful for situations where a deletion occurred outside a Hibernate ORM session, leaving dangling documents in the index.
      theClazz - The class, which must be annotated with Indexed
      theGivenIds - The list of IDs for the given document type. Note that while this is a List, the type must match the type of the `@Id` field on the given class.
    • supportsAllSortTerms

      boolean supportsAllSortTerms(String theResourceName, SearchParameterMap theParams)
      Given a resource type and a SearchParameterMap, return true only if all sort terms are supported.
      theResourceName - The resource type for the query.
      theParams - The SearchParameterMap being searched with.
      true if all sort terms are supported, false otherwise.