The Search Query Builder


Previous page Next page  Documentation Home Print this Topic

KnowledgeTree Overview > Search Overview > The Search Query Builder

KnowledgeTree's 3.5.x Web interface provides a Search Query Builder that allows you to create powerful search queries, or 'expressions', which are based on a predefined set of search query rules, or search 'grammar', and a predefined list of usable fields.

 

Search queries are defined in the Search Query Builder's text screen in KnowledgeTree's Web interface, and are used to search the KnowledgeTree document repository via Web Services.

 

Using the Search Query Builder, you can build optimized search queries that contain just a single grammar element, such as expr {AND | OR} expr, or that are comprised of a combination of two or more grammar elements, such as NOT expr {AND | OR} expr. In this example, the following two grammar elements are combined to build a single search query:

 

expr {AND | OR} expr
NOT

 

 

Search Expressions

KnowledgeTree's 3.5.x search engine allows more complicated search expressions than were previously possible.

 

Expressions may be built up using the following grammar:

expr ::= expr { AND | OR } expr

expr ::= NOT expr

expr ::= (expr)

expr ::= field { < | <= | = | > | >= | CONTAINS |STARTS WITH | ENDS WITH } value

expr ::= field BETWEEN value AND value

expr ::= field DOES [ NOT ] CONTAIN value

expr ::= field IS [ NOT ] LIKE value

value ::= "search text here"

 

A field may be one of the following:

CheckedOut
CheckedOutBy
CheckedoutDelta
Created
CreatedBy
CreatedDelta
DiscussionText
DocumentId
DocumentText
DocumentType
Filename
Filesize
Folder
GeneralText
IsCheckedOut
IsImmutable
Metadata
MimeType
Modified
ModifiedBy
ModifiedDelta
Tag
Title
Workflow
WorkflowID
WorkflowState
WorkflowStateID

 

A 'field' may also refer to metadata using the following syntax: ["fieldset name"]["field name"]

 

Note: 'Values' must be contained within double quotes, i.e. " ... ".

 

 

Example Expressions

Title contains "contract" and filesize <= "10000"

 

Filename ends with ".doc" and (title starts with "ENG" OR filename starts with "ENG") OR WorkflowState = "Draft"

 

["Invoice"]["InvoiceNo"] starts with ("ENG", "INV") is equivalent to: (["Invoice"]["InvoiceNo"] starts with "ENG") or (["Invoice"]["InvoiceNo"] starts with "INV")

 

DocumentText : "SECRET" is equivalent to: DocumentText contains "SECRET"

 

 

© 2008 KnowledgeTree Inc.
Creative Commons License
This work is licensed under a
Creative Commons Attribution 3.0 License.