Jump to main Content | Jump to main Navigation

Searching on Tree Fields

Indexing

Tree fields are treated like Identifier fields in Calm, this means that the contents of a tree field is indexed in its entirety. All characters are indexed, apart from the asterisk (‘*’) character and spaces, which are ignored. When searching on tree fields certain techniques may be employed to obtain the best possible search results:

Wildcard searching

It is not possible to find portions of the contents of a tree field unless you use wildcard searches. Wildcard searches use an asterisk (*) to replace a portion of the search term, for example, a search for: RefNo=HL/1/* will find all the RefNos which begin with HL/1/.

Spaces in tree fields

Spaces in tree fields are ignored in order to prevent reference numbers differing only by spaces. For example, in Calm tree fields “A/B 12/3” is effectively the same as “A/B1 2/3”.

Optimised searches on tree fields

Tree fields are indexed in such a way that it is very quick to build partial trees from an arbitrary position in the tree level. There are three search constructs that are very efficient:
 
  • Searching for a full reference number, such as MYREF/1 will quickly return the single record in question, not a hit list of records with reference numbers which contain the search term as a “phrase”.
     
  • Searching for a partial tree path with a “trailing” tree separator will fetch all immediate children of that node; for example, a search for “MYREF/1/” will return all immediate “children” of MYREF/1.
     
  • Searching for a partial reference number path with the wildcard asterisk (*) at the end will retrieve all children and descendents of a reference number, for example a search for “MYREF/1/*” will retrieve all children and descendents of MYREF/1.

“Any text” searching and tree fields

Please note: the contents of tree fields are not indexed as text, therefore will not appear in the results of “any text” searches. You must search specifically on the tree field in question.