/
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 "
Criteria | Clause (or sub-query) | Notes |
---|---|---|
query | and 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. |
findActiveOnly | and active = 1 | |
findInactiveOnly | and active = 0 | |
findByModuleId | and moduleId = :moduleId |
|
findDescendants | Additional query after finding the results where we lookup all descendants | |
findSelf | In additional query, also keep the concepts themselves. | |
findPrimitiveOnly | and definitionStatusId = :primitiveDefinitionStatusId | May need to have metadata service to answer this question |
findDefinedOnly | and definitionStatusId = :definedDefinitionStatusId | May 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) | |
findByTypeId | and r.typeId = :typeId | works 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) | |
findByRelationshipDescendants | In 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".
References/Links
- n/a