Results > Search and Retrieve > Field Text Search > Field Text Query Guidelines

Field Text Query Guidelines
In addition to document fields, you can also apply Field Text restrictions to metafields, such as autn_date, autn_database, autn_section, autn_langtype, and autn_language. For example:
In this example, a document's autn_database metafield must contain the substring Archiv for this document to return. If a document autn_database metafield, for example, has the value Archive or Archives, this document returns.
In this example, a document's autn_langtype metafield must contain a value that starts with eng (for example, englishASCII or English_UTF8) for this document to returned as a result.
You can use multiple field specifiers simultaneously by combining them with the Boolean operators AND, NOT and OR. For example:
In this example, a document's PRICE or PREIS field must contain a number greater than 6.95, and its AUTHOR or AUTOR field have the value Brown for the document to return as a result.
In this example, the documents must meet one of these two criteria:
the document's PRICE field contains a number smaller than 10, and its PUBLISHER field has the value Penguin.
the document's PRICE field contains a number between 20 and 30, and its AUTHOR field has the value George Orwell.
You can use the Boolean proximity operators BEFORE and AFTER to specify the order that certain fields occur in a document. For example:
FieldText=FieldText=MATCH{Penguin}:PUBLISHER BEFORE MATCH{George Orwell}:AUTHOR
This example returns only documents where the PUBLISHER field contains the value Penguin earlier in the document than the AUTHOR field contains the value George Orwell.
NOTE For a FieldText query to successfully compare two occurrences of the same field, the configuration parameter XMLFullStructure must be set to true in your configuration file [Server] section.
FieldText=MATCH{George Orwell}:AUTHOR AFTER MATCH{Thomas Brown}:AUTHOR
This example returns only documents where one occurrence of the AUTHOR field contains the value George Orwell later in the document than another occurence of the AUTHOR field contains the value Thomas Brown. This query returns results only if XMLFullStructure is set to true.
When specifying fields, use the format /FieldName to match root-level fields, FieldName to match all fields except root-level or /Path/FieldName to match fields that the specified path points to. To identify XML attributes, use the format <tag name>/_ATTR_<attribute name>, for example, FARM/_ATTR_ANIMAL. You can also use wildcards when identifying fields, for example, /Fi*d1 or /Field*.
All string matching is case insensitive, unless you use the parameter CaseSensitive=true (this parameter does not apply for TERM, TERMPHRASE and TERMALL, which are always case insensitive).
Strings can contain punctuation, except braces ({ }). You must percent-encode ampersands (&) in strings as %26. To distinguish commas within strings from separator commas, percent-encode commas twice within strings (%252C).
Commas that separate multiple items, and braces that start and end lists must not be encoded.
For example, to match the two strings hello,world and goodbye,again:
A field specifier expression cannot contain more than 255 characters. A field specifier expression includes the field specifier itself and the terms or numbers it applies to. For example:
This example contains four field specifier expressions of which each contains less than 255 characters:
MATCH{George Orwell}
This example contains only one field specifier expression that consists of exactly 255 characters. (If the expression contains more characters, the query fails.)
Each individual field restriction must contain fewer than 512 characters.FieldText=EQUAL{145,980,5514,5548,5549,5546,5547,5544,5545,5542,5543,5540,5541,7880,5579,5578,5575,5574,5577,5576,5571,5570,5573,5572,7353,5559,5558,5557,5556,5555,5554,5553,5552,5551,5550,7458,5285,5284,5287,5286,5281,5280,5283,5282,5289,5288,7184,7185,7186,7187}:ITEM
Related Topics