/
Searching

Searching

Overview

Documents search features of the application

Basic Searching

... lucene, code/term/etc...  describe which objects/fields are indexed and which service calls find thigns.

 

Semantic Search

Based around "search criteria" -> query builder.

Starting query:

"SELECT c FROM ConceptJpa c WHERE 1=1 "

CriteriaClause (or sub-query)Notes
queryand c.terminologyIn (...,...,...,...)

Need to perform a lucene join on the semantic query. Get a list of the lucene query results and add a clause to the query that matches against that complete list.

findActiveOnlyand active = 1 
findInactiveOnlyand active = 0 
findByModuleIdand moduleId = :moduleId

 

findDescendantsAdditional query after finding the results where we lookup all descendants 
findSelfIn additional query, also keep the concepts themselves. 
findPrimitiveOnlyand definitionStatusId = :primitiveDefinitionStatusIdMay need to have metadata service to answer this question
findDefinedOnlyand definitionStatusId = :definedDefinitionStatusIdMay need to have metadata service to answer this question. Alternative, change concept model to set a "fully defined" flag at loader time.

findBySourceId/

findDestinationOfRelationship

and c in (select destinationConcept from RelationshipsJpa r, ConceptsJpa c2 where sourceConcept = c2 and c2.terminologyId= :sourceId) 
findByTypeIdand r.typeId = :typeIdworks with findBySourceId/findByDestinationId, add this clause to the relationship sub-query

findByDestinationId/

findSourceOfRelationship

and c in (select sourceConcept from RelationshipsJpa r, ConceptsJpa c2 where destinationConcept = c2 and c2.terminologyId= :sourceId) 
findByRelationshipDescendantsIn relationship query, instead of simply searching for the source to match a particular concept, search to match any descendants of that concept (or that concept).query is a little more complicated

Examples

Find all concepts with an "associated morphology" of "Tumor" AND have "finding site" of "Kidney".

 

  • n/a

 

 

Related content