
Package ca.uhn.fhir.jpa.dao
Class FulltextSearchSvcImpl
java.lang.Object
ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl
- All Implemented Interfaces:
IFulltextSearchSvc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
count
(String theResourceName, SearchParameterMap theParams) Returns accurate hit countList<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId>
everything
(String theResourceName, SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId theReferencingPid) extractLuceneIndexData
(org.hl7.fhir.instance.model.api.IBaseResource theResource, ResourceIndexedSearchParams theNewParams) List<org.hl7.fhir.instance.model.api.IBaseResource>
getResources
(Collection<Long> thePids) Returns inlined resource stored along with index mappings for matched identifiersboolean
List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId>
lastN
(SearchParameterMap theParams, Integer theMaximumResults) void
reindex
(ResourceTable theEntity) Re-publish the resource to the full-text index.List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId>
search
(String theResourceName, SearchParameterMap theParams) Search the Lucene/Elastic index for pids using params supported in theParams, consuming entries from theParams when used to query.searchAsync
(String theResourceName, SearchParameterMap theParams) Query the index for a scrollable iterator of results.boolean
supportsSomeOf
(SearchParameterMap myParams) org.hl7.fhir.instance.model.api.IBaseResource
Autocomplete search for NIH $expand contextDirection=existing
-
Constructor Details
-
FulltextSearchSvcImpl
public FulltextSearchSvcImpl()Constructor
-
-
Method Details
-
extractLuceneIndexData
public ExtendedLuceneIndexData extractLuceneIndexData(org.hl7.fhir.instance.model.api.IBaseResource theResource, ResourceIndexedSearchParams theNewParams) - Specified by:
extractLuceneIndexData
in interfaceIFulltextSearchSvc
-
supportsSomeOf
- Specified by:
supportsSomeOf
in interfaceIFulltextSearchSvc
-
reindex
Description copied from interface:IFulltextSearchSvc
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.- Specified by:
reindex
in interfaceIFulltextSearchSvc
- Parameters:
theEntity
- the fully populated ResourceTable entity
-
searchAsync
Description copied from interface:IFulltextSearchSvc
Query the index for a scrollable iterator of results. No max size to the result iterator.- Specified by:
searchAsync
in interfaceIFulltextSearchSvc
- Parameters:
theResourceName
- e.g. PatienttheParams
- The search query- Returns:
- Iterator of result PIDs
-
everything
public List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> everything(String theResourceName, SearchParameterMap theParams, ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId theReferencingPid) - Specified by:
everything
in interfaceIFulltextSearchSvc
-
isDisabled
- Specified by:
isDisabled
in interfaceIFulltextSearchSvc
-
search
@Transactional public List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> search(String theResourceName, SearchParameterMap theParams) Description copied from interface:IFulltextSearchSvc
Search the Lucene/Elastic index for pids using params supported in theParams, consuming entries from theParams when used to query.- Specified by:
search
in interfaceIFulltextSearchSvc
- Parameters:
theResourceName
- the resource name to restrict the query.theParams
- the full query - modified to return only params unused by the index.- Returns:
- the pid list for the matchign resources.
-
tokenAutocompleteValueSetSearch
@Transactional public org.hl7.fhir.instance.model.api.IBaseResource tokenAutocompleteValueSetSearch(ValueSetAutocompleteOptions theOptions) Description copied from interface:IFulltextSearchSvc
Autocomplete search for NIH $expand contextDirection=existing- Specified by:
tokenAutocompleteValueSetSearch
in interfaceIFulltextSearchSvc
- Parameters:
theOptions
- operation options- Returns:
- a ValueSet with the search hits as the expansion.
-
lastN
public List<ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId> lastN(SearchParameterMap theParams, Integer theMaximumResults) - Specified by:
lastN
in interfaceIFulltextSearchSvc
-
getResources
Description copied from interface:IFulltextSearchSvc
Returns inlined resource stored along with index mappings for matched identifiers- Specified by:
getResources
in interfaceIFulltextSearchSvc
- Parameters:
thePids
- raw pids - we dont support versioned references- Returns:
- Resources list or empty if nothing found
-
count
Description copied from interface:IFulltextSearchSvc
Returns accurate hit count- Specified by:
count
in interfaceIFulltextSearchSvc
-