Category Component 26.1
Category Component Help

# NOTSTRING

The `NOTSTRING` field specifier (case sensitive) allows you to find documents in which at least one instance of the specified fields contains a value that does not contain any of the specified strings as a substring.

If there are one or more instances of a particular field in the document, the document returns if at least one instance does not contain any of the specified strings, even if another instance of the field does contain the string. The document does not return if all instances of the specified fields contain one of the specified strings as a substring.

NOTE: You can optimize the field specifier speed by restricting the field to the `MatchType` property type.

## Format

    FieldText=STRING{yourStrings}:yourFields

`yourStrings` | One or more strings. A document returns only if at least one instance of one of `yourFields` contains a value that is not a substring of any of these strings. You can specify strings that contain punctuation (but see Note) or consist of several words. NOTE: Strings in the query must be percent-encoded to ensure that any commas or curly braces that are part of a string are not interpreted as query syntax. If you send HTTP requests using the content-type `application/x-www-form-urlencoded` you must then percent-encode all parameter values, meaning that any commas or curly braces that are part of a string are percent-encoded twice (such that a comma is represented by the sequence `%252c`). For more information, see Percent Encoding in Queries.
`yourFields` | One or more fields. A document returns only if it contains one of these fields, and if the value in at least one instance of the field does not contain any of `yourStrings` as a substring. Separate multiple fields with colons (`:`). There must be no space before or after a colon.

## Example

    FieldText=NOTSTRING{cat,dog}:ANIMAL:TOPIC

At least one instance of the `ANIMAL` or `TOPIC` field value must contain a value that does not contain the substring `cat` or `dog` for the document to return.

For example, if a document contains only:

    #DREFIELD ANIMAL="old cat"

or

    #DREFIELD TOPIC="dogs like playing catch"
    #DREFIELD ANIMAL="dog"

Then it does not return as a result.

However, if the document contains:

    #DREFIELD TOPIC="dogs have trouble catching mice"
    #DREFIELD ANIMAL="dog"
    #DREFIELD ANIMAL="mouse"

Then it returns as a result, as one of the `ANIMAL` fields does not contain the substring cat or dog.

NOTE: To find documents in which the specified string is not present in any instance of the specified field, use the STRING specifier with the Boolean operator `NOT`. For example, `FieldText=NOT+STRING{cat,dog}:ANIMAL` does not return any documents that have a `ANIMAL` field with the substring `cat` or `dog`, even if there are other `ANIMAL` fields with different values.

## See Also

- STRING Field Specifier

Copyright 2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Category Component 26.1

Topic Title: NOTSTRING