Syntax of the extended search
This is the basic syntax of the searchengine. It can handle all searchrequests that are possible within the searchengine.
The search covers all Modules and Databases that are part of this platform and so extended syntax for searching only certain databases or modules is available.
the search is based on terms that can be connected via logical operators and grouped by parantheses.
example:
term1 or term2 and (term3 or term4)
The result of the search is always the set of dataentries that fullfill the given searchrequest. Always full dataentries are returned by the search and not only certain fields of a entry. One can restrict the search on some fields, but the result is always a set of whole entries.
The same is also true inside the search:
If searching for “dog or cat” all dataentries are returned which have dog in one field and cat in one field. This fields must not necessarily be the same.
terms
a term consists basically of the word you want to search
ann or pat mike and dog
If only specifying a word, then all dataentries are returned that contain this word(s) in one of the fields. The search is performed caseinsensitive. Only whole words are matched. That means that “ann” will match only “ann” but not “anna” and not “banner” and not “bann”.
restricting search on one or more database
To restrict the search to a certain database an extendend syntax for searchterms is available:
word:database
example:
pat:ZA pat*:ZA,ZT (ann or pat):ZA,zt ann:ZA or pat:ZT (ann:ZA or pat):ZT is the same as ann:ZA,ZT or pat:ZT 'ann pat':ZT
the word is only searched in the specified database(s). The databases are referred by their shortcuts and more databases can be specified and seperated with ,. The shortcuts are caseinsensitive.
The databaserestriction can not only be set for one term but also be placed after an closing-paranthese or after a phrase-search to work on all terms inside the parantheses or the whole phrase.
If a databaseshortcut is preceeded by a dash “-”, then it is protected against overriding from outside:
(ann:ZA or pat):ZT is the same as ann:ZA,ZT or pat:ZT (ann:-ZA or pat):ZT is the same as ann:ZA or pat:ZT
Note that ann in the second case is only looked up in ZA but not in ZT.
restricting search on one or more field
To restrict the search to a certain field an extendend syntax for searchterms is available:
word:database:field
example:
pat:ZA:A pat*:ZA:A,T (ann or pat):ZA,ZT:A,T ann:ZA:A or pat:ZT:T (ann:ZA or pat::T):ZT:A is the same as ann:ZA,ZT:A or pat:ZT:A,T 'ann pat':ZT:T,A
the word is only searched in the specified database(s) on the specified field(s). The databases and fields are referred by their shortcuts and more fields can be specified and seperated with ,. The shortcuts are caseinsensitive.
Note that restriction on fields is only possible if also a restriction on databases is set. This means, that word::Field (database-position is left empty) is only possible if the term is inside parantheses and the database is specified outside the parantheses.
Like database-shortcuts in the previous section, also fieldshortcuts can be protected by a leading “-” against overwriting
(ann:ZA or pat::T):ZT:A is the same as ann:ZA,ZT:A or pat:ZT:A,T (ann:ZA or pat::-T):ZT:A is the same as ann:ZA,ZT:A or pat:ZT:T
wildcards
To search for words and not only match whole words, you can use standard wildcards * and ? where ? matches exactely one character and * matches any number of characters (even “no character”)
example:
ann* finds ann and anna but not bann *ann finds bann and ann and anna but not banner *ann* finds ann, anna, bann and banner ?nn finds ann but not bann
note that there are restrictions when using wildcards:
- * can only be used when at least three characters are specified in the same word
- each ? needs have at least one character in the word
phrase search
To search for text longer than a word (especially text that contains whitespaces like <tab> or simple spaces) you can use phrase search by putting the text inside single quotes. The search looks for exactely the text that is inside the quotes
'ann' finds ann 'ann*' finds ann* but not anna 'ann or pat' finds the text "ann or pat" but not "bann or pat" 'Ann or Pat' finds the text "Ann or Pat" but not "ann or pat"
The phrase-search is casesensitive !!
numerical search
As the data contains many numerical values as well, the search offers special operator to extend the search on numerical values.
FIELD OPERATOR VALUE
with no space between !!
example:
AK>4:SD >4:SD:AK is the same as AK>4:SD AK<=4:sd2000,sd AA,AP=5:sd is the same as (AA=5 or AP=5):SD
the following operators are allowed:
< > = != <= >=
operators
You can use the following operators to structure your search:
- AND term1 and term2 and term3
- OR term1 or term2 or term3
- NOT term1 not term2
the operators are caseinsensitive.
note that the operators always work on the dataentries matched by the terms and not on the fields.
“ann::F1 and pat::F2” will match all entries that have ann in Field F1 and pat in Field F2
ranking of operators
note that operators are processed in a defined order (due to mathematical conventions)
NOT is processed before AND AND is processed before OR
To change this behaviour you need to use parenthesis
parentheses
For better control of the logical bindings between the terms you can use standard paranthesis ( and )
example:
(ann or pat) and mike finds entries with ann and mike or entries with pat and mike ann or (pat and mike) finds all entries with ann or entries with pat and mike (ann not (pat or mike)) finds all entries with ann but only if they dont have pat or mike in them
real-life examples
'Peter Pilsl':ZA (AK<=4 or (AK>5 and AP<7)):SD



