FieldText Query Guidelines
-
In addition to document fields, you can also apply
FieldTextrestrictions to metafields, such asautn_date,autn_database,autn_section,autn_langtype, andautn_language. For example:FieldText=STRING{Archiv}:autn_databaseIn this example, the
autn_databasemetafield must contain the substring Archiv for this document to return. For example, if theautn_databasemetafield has the value Archive or Archives, this document returns.FieldText=WILD{eng*}:autn_langtypeIn this example, the
autn_langtypemetafield must contain a value that starts with eng (for example, englishASCII or English_UTF8) for this document to return as a result. -
You can use multiple field specifiers simultaneously by combining them with the Boolean operators
AND,NOT, andOR. For example:FieldText=GREATER{6.95}:PRICE:PREIS+AND+MATCH{Brown}:AUTHOR:AUTORIn this example, the
PRICEorPREISfield must contain a number greater than 6.95, and theAUTHORorAUTORfield must have the value Brown, for the document to return as a result.FieldText=(LESS{10}:PRICE+AND+MATCH{Penguin}:PUBLISHER)+OR+(NRANGE{20,30}:PRICE+AND+MATCH{George Orwell}:AUTHOR)In this example, the documents must meet one of these two criteria:
-
the
PRICEfield contains a number smaller than 10, and itsPUBLISHERfield has the value Penguin. -
the
PRICEfield contains a number between 20 and 30, and itsAUTHORfield has the value George Orwell.
-
-
You can use the proximity operators
BEFOREandAFTERto specify the order in which certain fields must occur in a document. For example:FieldText=MATCH{Penguin}:PUBLISHER BEFORE MATCH{George Orwell}:AUTHORThis example returns only documents where the
PUBLISHERfield contains the value Penguin earlier in the document than theAUTHORfield that contains the value George Orwell.NOTE: For a
FieldTextquery to successfully compare two occurrences of the same field, you must set theXMLFullStructureconfiguration parameter toTruein the[Server]section of the configuration file.FieldText=MATCH{George Orwell}:AUTHOR AFTER MATCH{Thomas Brown}:AUTHORThis example returns only documents where one occurrence of the
AUTHORfield contains the value George Orwell later in the document than another occurrence of theAUTHORfield that contains the value Thomas Brown. This query returns results only if you have setXMLFullStructuretoTrue. -
To identify the fields, use the format
/FieldNameto match root-level fields,*/FieldNameto match all fields except root-level, or/Path/FieldNameto 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*d1or/Field*. -
All string matching is case insensitive, unless you set the
CaseSensitiveparameter toTrue(this parameter does not apply forTERM,TERMPHRASE, andTERMALL, 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).You must not percent-encode commas that separate multiple items, and braces that start and end lists.
For example, to match the two strings
hello,worldandgoodbye,again:FieldText=MATCH{hello%252Cworld,goodbye%252Cagain}:FIELD