Home Site Map Contact Us My Profile Log In Join Now!
Info Centers
 Forums

 Tech Center

 News & Analysis

 Solution Center

 UK Centre
Popular Spots
 25th Anniversary

 Article Archive

 ProVIP Center (Club Tech)

 Code

 System i DocFinder

 Essential Guides

 Blogs

 Wikis

 e-Learning

 Webcasts

 Podcasts

 System i Jobs

 Events
Products
 i5 Route Finders

 Learning Center (Store)

 Product Directory
Network Poll
Determining a programmer's desktop requirements is not a black-and-white proposition, but matching equipment to programmer type can help productivity. Which "programmer type" are you?
Vote Now!
Network Memberships
 See Membership Levels

 Free E-Mail Newsletters

 Free RSS Feeds

 Subscribe/Join

 Upgrade Now

 Renew Now
About Us
 About the Network

 Network Publications

 Tech Editor Profiles

 Editorial Calendar

 Contact Us

 Subscribe

 Media Kit (PDF)

 Write For Us


System iNetwork September Sponsor





        System iNetwork September Sponsor


Home » Archive Search » Search Help

Search Help | New Search


Kewyord Search Engine Syntax

KWS Feature Overview

Nav4's built-in keyword search engine (Nav4 KWS) supports the following query syntax features:

Boolean operators

Boolean operators allow terms to be combined through logic operators. Nav4 KWS supports AND, "+", OR, NOT and "-" as Boolean operator.

Boolean operators must be ALL CAPS.

OR operator

The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. For example, to find documents that match either "treatment" or "medication," you can use the search:

treatment OR medication

The symbol || can be used in place of the word OR. For example:

treatment || medication

The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. For example, the following search is equivalent to the examples above:

treatment medication
AND operator

The AND operator matches documents in which both terms exist. This is equivalent to an intersection using sets.

To search for documents that contain both "treatment" and "'gene therapy'" use the query:

treatment AND "gene therapy"

The symbol && can be used in place of the word AND. For example:

treatment && "gene therapy"
+ operator

The "+" (or required) operator requires that the term after the "+" symbol exist somewhere in a document for that document to be returned by the query.

To search for documents that must contain "gene therapy" and may contain "treatment," you can use the query:

treatment +"gene therapy"
NOT operator

The NOT operator excludes documents that contain the term after NOT. This is equivalent to a difference using sets. For example, to search for documents that contain "gene therapy" but not "hormone therapy," use the query:

"gene therapy" NOT "hormone therapy"

The symbol ! can be used in place of the word NOT. For example:

"gene therapy" !"hormone therapy"

The NOT operator should not be used if the query contains just one term. Such queries will return no results.

- operator

The "-" (or prohibit) operator excludes documents that contain the term after the "-" symbol. It is functionally equivalent to the NOT operator.

grouping

Nav4 KWS supports using parentheses to group clauses to form sub queries. This can be be used to control the boolean logic for a query. For example, to search for either "nursing" or "'long term'" where combined with "elderly," you can use the query:

(nursing OR "long term") AND elderly

This eliminates any confusion about which Boolean operations are evaluated first. In this case, only documents in which "elderly" exists and either of "nursing" or "'long term'" exists will be returned.

wildcards

Nav4 KWS supports single and multiple character wildcard searches. To perform a single character wildcard search use the "?" symbol. To perform a multiple character wildcard search use the "*" symbol.

The single-character wildcard search looks for all terms that match the query term with the single character replaced. For example, to search for "rest" or "rust," you can use the search:

r?st

The multiple-character wildcard search looks for all terms that match the query term with 0 or more characters replaced. For example, to search for "rest," "rested," or "resting," you can use the search:

rest*

You can also use the wildcard searches in the middle of a term. For example, you can search for "rest," "rust," "roust," or "roost" (or "repast" or "roomiest" or...), you can use the search:

r*st

You cannot use a * or ? symbol as the first character of a search.

weighting terms

Nav4 KWS ranks the documents it returns based on matches between the query terms and the terms found in the indivual documents. You can modify the importance of a term to your query by adjusting its "weight."

By default, unmodified query terms have a weight of 1.0. (The weight must be a positive number, but can be less than 1.) The higher the number, the more important the term is in ranking results.

You can specify a new weight by specifying it at the end of a term, separated by the "^" symbol. For example, if you are searching for

medicine precription

and you want the term "prescription" to be more relevant in ranking documents, increase its weight by using the ^ symbol to assign it a new weight. To triple the importance of prescription in your query, you would use the search:

medicine precription^3

You can also boost phrase terms. For example:

"precription medicine"^3 therapy

fuzzy searches

Nav4 KWS supports fuzzy searches. Fuzzy searches look for terms that are similar in spelling to the query term. Terms found by fuzzy searches have their weight set to 0.2.

To do a fuzzy search use the tilde, "~", symbol at the end of a single-word term. For example to search for a term similar in spelling to "rest" use the fuzzy search:

rest~

This search will find terms like "rests" and "best."

proximity searches

Nav4 KWS supports proximity searches, which looks for combinations of terms within a specified distance from each other.

To do a proximity search use the tilde, "~", symbol at the end of a phrase. For example to search for a "bed" and "rest" within 6 words of each other in a document use the search:

"bed rest"~6

escaping special characters

Nav4 KWS supports escaping special characters that are part of the query syntax. The current list special characters includes:

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \

To escape these character use the \ before the character. For example to search for the term "symptoms:" (with the colon), use the query:

"symptoms\:"

For another example, to search on "(7*2)+6", use the query:

\(7\*2\)\+6

  Sponsored Links   Featured Links


Penton Technology Media
Connected Home | SQL Server Magazine | Windows IT Pro
Report Bugs | Contact Us | Comments/Suggestions | Terms of Use | Privacy Statement | Trademarks
See Membership Levels | Subscribe | Free E-mail Newsletters | Free RSS Feeds | My Profile | Upgrade Now | Renew Now

© 2010 Penton Media, Inc.
Penton Media
System i is a trademark of International Business Machines Corporation and is used by Penton Media, Inc., under license. SystemiNetwork.com is published independently of International Business Machines Corporation, which is not responsible in any way for the content. Penton Media, Inc., is solely responsible for the editorial content and control of the System iNetwork.