Open topic with navigation

# NOTMATCH

The `NOTMATCH` 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 match the specified string.

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 match. The document does not return if all instances of the specified fields contain an exact match of one of the specified strings.

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

To use the `NOTMATCH` field specifier against fields that were added using the DREREPLACE index action, you must define the fields as MatchType.

## Format

    FieldText=NOTMATCH{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 an exact match for these strings. The matching is case insensitive. You can specify strings that contain punctuation (but see Note) or consist of several words. Note: To distinguish query syntax punctuation from punctuation within strings, double-percent-encode commas and curly braces within strings. Query syntax punctuation must be left unencoded. There must be no space before or after a separator comma.
`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 exactly match any of `yourStrings`. Separate multiple fields with colons (`:`). There must be no space before or after a colon.

## Example

    FieldText=NOTMATCH{cat}:ANIMAL

At least one instance of the `ANIMAL` field must have a value other than `cat` for the document to return as a result.

For example, if a document contains only:

    #DREFIELD ANIMAL="cat"

Then it does not return as a result.

However, if the document contains:

    #DREFIELD ANIMAL="cat"

    #DREFIELD ANIMAL="dog"

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

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

## See Also

- MATCH Field Specifier.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send Documentation Feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm