Documentation Center

Search syntax and operators

You can use Boolean operators, quotes, wildcard characters, and/or choose valid data from a list in a field, or specify the type of data to be searched, to construct the search criteria.

Included in search

Based on the text string you enter in the Find What field (or Search term field in Organize Space), full text searches are done with results in any of the following three areas:
  • Metadata fields
  • Element text inside XML content, with removal of special characters and stemming support
  • Any XML element name, attribute name, attribute value, comment, processing instruction or any textual content of one of these XML types.

Scope and filtering

You can define the search criteria in terms of the objects' metadata, which includes three properties that all repository objects have:

  • Latest version or all versions — You can search on all versions or only the latest version of the objects. By default, the latest available version of objects is searched.
  • Document language — You can search all documents in a given language, or select multiple languages. By default, you use the repository that is in your language, but you can also search the repository in another language.
  • Object Type — You can choose to limit the search to specific object types. Selecting the right object type makes the result list specific and affects the number of results.

In addition, you can limit search results using a variety of other properties, such as the author, status and so on.

Stemming

The search feature uses stemming, a technique that search engines use to understand different grammatical forms of words and ensure the search results cover the different variations. When you search for a word, stemming includes related forms, such as the plural form and the verb tenses. As a result, you can keep your search terms simple, and the engine will do the rest.

Stemming is used when searching in full-text fields and depends on the language specified for the search. For example, if you search for the term fly, then the results will include repository objects that include words based on the same stem as "fly," such as "flying," "flown," "flew," and so on.

Wildcards

Wildcards are placeholders that allow flexible matching of characters or words. You can use the asterisk character * to represent any sequence of characters.

For example, if you search for the term "comput*", then the results will include repository objects that include words beginning with "comput", such as computer, computing, computation, compute, and so on.

Boolean operators

You can specify search criteria more precisely using Boolean operators. Boolean operators define the relationships between words or groups of words. You use them to specify if all words or if any of the words will satisfy the criteria, or if objects containing specified words should be eliminated from satisfying the criteria.

To search forOperatorExamplesResult
Both terms in the same object

AND

&

+

content AND management

content & management

content + management

Objects that contains both words content and management.
Either term in a object

OR

|

,

<space>

content OR management

content | management

content, management

content management

Objects that contain the word content, the word management, or both.
Objects that do not contain the term

NOT

!

-

NOT management

!management

-management

Objects that do not contain the word management.
You can combine operators to define a more complex search string. For example, the following search string can be used to search for objects with the word content but not management: +content -management.

Grouping characters

Use parentheses to ensure that a search containing different operators performs as you intend. The parentheses group Boolean strings so that you can use them as separate criteria.

For example:

To search for:Example:The results include:
(word1 and word2) or word3(content and management) technologiesAll objects that contain the word content and the word management, or objects that contain the word technologies.
(word1 not word2) and word3(content not management) and technologiesAll objects that contain the word content but not the word management, and must also contain the word technologies.

An even more complex string may be defined, for example, to search for objects with either the words research and development in that order or customer service in that order, but not objects that contain the string XYZ:

("research and development" or "customer services" support) -XYZ

Quotes for exact phrases

When you enter text without enclosing it in quotes, each individual word in the search string is used as separate criteria. The result shows any object containing any of the words. To search for an exact phrase, enclose the search string between double quotes.

For example:

If the search criteria is:The result is:
content management technologiesObjects with the words "content" or "management" or "technologies" in it.
"content management technologies"Objects with the phrase "content management technologies" (words in that exact order) in it.
You can combine quoted criteria and non-quoted criteria to define a more complex search string. For example the following search string can be used to search for objects with the exact phrase, content management technologies, or with the word CMS: "content management technologies" CMS

Quotes with special characters

As described earlier in this topic, some words and characters have a special meaning as Boolean operators, wildcards, or grouping characters. To ensure special characters are interpreted as part of the search text, you should enclose the search phrase in quotation marks.

The special characters are: + (plus sign), & (ampersand), , (comma), |(bar), - (minus sign), ! (exclamation point), ( (opening parenthesis), ) (closing parenthesis), and the * (asterisk).

Examples

Search for text or XML snippets of the XML content is a balance between performance and functionality. This means that complex XML structure searches might not return the results you expect, but the following typical use cases are valid in any circumstance.

To search forExampleResult
The existence of textbodyObjects that contain "body" in element text, attribute values, comments or processing instructions. Note that this does not match objects that only have a <body> element.
The existence of an XML element"<indexterm>" Objects that contain <indexterm> elements (or the word indexterm in element text content)
The non-existence of an XML element-"<indexterm>" Objects that do NOT contain an <indexterm> element (and that do not contain the word indexterm in element text content)
That have a certain public DOCTYPE"-//OASIS//DTD DITA Topic//EN" Objects that contain "-//OASIS//DTD DITA Topic//EN" (or "oasis dtd dita topic en" in element text content) (not limited to the PUBLIC ID)
That have a certain system DOCTYPE"topic.dtd" Objects that contain "topic.dtd" (or "topic dtd" in element text content)(not limited to the SYSTEM ID)
That have a certain DOCTYPE"<!DOCTYPE topic PUBLIC \"-//OASIS//DTD DITA Topic//EN\" \"topic.dtd\"" Objects that contain the given DOCTYPE definition (or "doctype topic public oasis dtd dita topic en topic dtd" in element text content)
An attribute having a certain value"href=\"GUID-C90ECA8A-A0B2-4F5B-9F00-7CF27E6CABF7\"" Objects that contain an "href" attribute with the value "GUID-C90ECA8A-A0B2-4F5B-9F00-7CF27E6CABF7". Note that we needed to escape the inner double quotes.
A certain conditionishcondition="BLUETOOTH=Y" Objects that contain the given condition (or "ishcondition bluetooth y" in element text content)
An attribute value"GUID-C90ECA8A-A0B2-4F5B-9F00-7CF27E6CABF7#GUID-C90ECA8A-A0B2-4F5B-9F00-7CF27E6CABF7" Objects that contain this part of text (in attribute values, element text, processing instruction text, XML comments, etc.). Attribute values containing the characters <, =, > cannot be found this way, so e.g. searching for "BLUETOOTH=Y" will not work.
The existence of an attribute"href=" Objects that contain an "href" attribute (or "href" in element text content)
A certain element with text"<title>charging</title>"Objects that contain the text in the given element (or "<title>charging</title>" in element text content)
A certain processing instruction"<?xm-replace_text Paragraph?>" Objects that contain the given words in the processing-instruction (or "xm replace text paragraph" in element text content)
A certain comment"<!--ExampleCorp, Inc., 1988-2009, v.4002-->" Objects that contain the given comment (or anywhere else in textual content) (or "examplecorp inc 1988 2009 v 4002" in element text content)
The existence of an XML element (special case)"<msgph/>" Objects that contain the <msgph> element (so not only empty <msgph> elements) (or "msgph" in element text content)

Known limitations

  • Searching text containing the / backslash character does not work
  • Depending on the XML structure, searching for nested XML elements may not work.