10.1.3. Using Expanded Word Syntax to Define Keywords

EKM provides a rich set of syntax to expand your keyword search. The syntax that is used is compliant with the Apache Lucene Query Parser Syntax.

EKM supports the following types of searches:

Wildcard Searches

You can use wildcard characters ? and * to perform single and multiple character searches, respectively. EKM will search for matching words with the wildcard characters replaced.

Use the “? “ symbol to introduce a single character wildcard. For example

part?

will return objects whose name or file contents contains the words: part1, Part2.

Use the “* “ symbol to introduce a multiple character wildcard. For example,

air*

will return objects whose name or file content contains the words: Airfoil, airfoil-1. You can place the wildcard characters anywhere in the word.


Note:  If you want to search on a file based on its file extension (for example, .txt or txt), then you will need to include the asterisk wildcard * in your keyword before the file extension (for example, *.txt) for the search to be successful.


Proximity Searches

You can conduct a proximity search to find words that are a specified number of words away from the given search phrase. Place a “~” (tilde) at the end of a search phrase followed by the proximity defined as number. For example, the following will return files that contain the words “ekm” and “repository” within 10 words of each other.

"ekm repository"~10

Boolean Operator Searches

Boolean operators allow keywords to be combined through logic operators. EKM currently supports "&&", "||"and "!" as Boolean operators.

The “||” operator is the default conjunction operator. This means that if there is no Boolean operator between two keywords, the “||” operator is used. The “||” operator links two keywords and finds a matching object if either of the keywords exist in the object’s content or properties. The word "OR" can be used in place of the "||" symbol.

For example, to search for objects that contain either "Fluent model" or just "model", you could use either of the following queries:

The "&&" operator is a conjunction operator that finds a matching object if both keywords exist in the object’s content or properties.

For example, to search for objects that contain both "fluent model" and "ansys model", you would use the following query:

"fluent model" && "ansys model"

The "!" operator excludes objects that contain the keyword displayed after the "!" symbol.

For example, to search for objects that contain "fluent model" but not "test model", you would use the following query:

"fluent model" ! "test model"


Note:  The "!" operator cannot be used with only one keyword. For example, the search string !"fluent" model would return no results.


Grouped Searches

You can use parentheses to group a statement so that it can be used to form a more complex query.

For example, to search for either "fluent" or "cfx" and "ansys", you could use the following query:

(fluent OR cfx) AND ansys

Fuzzy Searches

Fuzzy searches enable you to match a pattern approximately (rather than exactly). To perform a fuzzy search, use the tilde "~" symbol at the end of a single keyword.

For example, to search for words that are similar in spelling to "cfd", you would use the following query:

cfd~

This query would yield results such as cfd and cfx.

You can control the closeness of the match by adding an optional parameter to the search value. The parameter can be a number between 0 and 1 (for example, cfd~0.8). The closer the number is to 1, the higher the similarity must be for a word to be included in the search results. If you do not specify this parameter, a default value of 0.5 is used.


Release 18.2 - © ANSYS, Inc. All rights reserved.