Share

Advanced search reference

Use these parameters to create useful search strings.

Exact matching

As general guidance, double quotes should only be used to match on string fields, and avoided in numeric, dates and boolean value types. Double quotes have two main use cases:

  1. Searching terms that include spaces: when the term the user is searching is a phrase – i.e. a group of words separated spaces where the order matters.

    Examples:

    1. owner="Doe John" will find items where the owner is John Doe - if the field value contains characters like comma (“,”), period (“.”), or colon (“:”), they are ignored for purposes of matching “Doe, John” as the owner of the item
    2. ITEM_DETAILS:DESC_CHANGE="Scratch on aluminum" " will find items containing that exact sequence in the field value.
  2. Searching for full words: searching for red will match predator, whereas using double quotes (“red”) won’t match items containing that word.

    1. “red” will match, however, an item containing the string “blue red wheel”.

There is no need to use asterisks for partial matches, as the tool already implies a wildcard when no double quotes are present.

Conditional operators (AND/OR)

All queries can be entered using parenthesis () in combination with conditional operators. Example: To search for all items containing a picklist selection that matches the string “Medium”, or the word “test”, and limit the search to items in workspaces Item and BOMs or Change Orders:

(ITEM_DETAILS:PRIORITY=Medium OR test) AND (workspaceId=9 OR workspaceId=8)

Relational operators (Greater than, less than, equal, etc.)

All fields containing numbers or dates support relational operators. Example: To search for all items created in January 2019 containing the word “test”:

test AND createdOn>=2019-01-01 AND createdOn<=2019-01-31

Cross-workspace searching

Search queries can be limited to a subset of workspaces. Remember that no record can belong to two workspaces at the same time, so using an AND will return zero results. Example:

ownerName=John AND (workspaceId=9 OR workspaceId=26)

Sorting

All search queries are ranked by score (relevancy). Sorting is not currently supported in the UI, but can be done in the following fields using the API:

  • Score (relevancy, not visible in the record information) – default
  • Last Modified On
  • Created On
  • Item Descriptor

Results can be ordered in ascending or descending order. Example: querying for the word testing on workspace 9, returning All revisions:

  • GET /api/v3/search-results?limit=100&offset=0&query=testing+AND+workspaceId%3D19&revision=2&sort=score asc
  • GET /api/v3/search-results?limit=100&offset=0&query=testing+AND+workspaceId%3D19&revision=2&sort=lastModifiedOn desc
  • GET /api/v3/search-results?limit=100&offset=0&query=testing+AND+workspaceId%3D19&revision=2&sort=createdOn asc
  • GET /api/v3/search-results?limit=100&offset=0&query=testing+AND+workspaceId%3D19&revision=2&sort=itemDescriptor desc

Tips and tricks

  • For backwards compatibility, by default the search engine returns only the Latest Version of items from Revision-Controlled workspaces (i.e. it defaults to &revision=1). It is recommended to pass &revision=2 to get all items, and use the ES-specific fields to filter between the versions/revisions (isLatestVersion and isWorkingVersion), since the &revision query parameter is going to be removed later.

    Note: that all conditional operators (AND/OR) must be typed in uppercase
  • Use a date range to match on a particular year or month.

  • Boolean values can be typed either uppercase or lowercase.

  • By default, search is performed across all indexed tabs – as of February 2019, Item Details (excluding Classifications data) and Attachments (only file file titles, filenames) are indexed.

  • Spaces in the search query without wrapping double quotes are considered implicit ORs.

  • The following characters are reserved, and not allowed in search queries:

    • `
    • (
    • )
    • :
    • <
    • >
    • =
    • \
    • /
    • ]
    • [
    • {
    • }

Was this information helpful?