vfts (Virtual Field Text Search) - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.9
Category
Reference Guide

A virtual field text search predicate filters the documents containing keywords in a specific virtual field chosen while indexing the corpus. Building a virtual field text search predicate involves calling the built-in vfts function that takes two string arguments, representing respectively the name of the virtual field, and the keywords of the query.

The semantics for the keywords of the query is the same as the semantics of full-text search predicates. In particular, the keywords are standardized by AFS before their evaluation — this standardization replaces each keyword by its lowercase, without accents, value —, and the syntax for an expression search is the same.

For example, vfts("author", "foo") returns the document with the virtual field "author" containing "foo".

For example, vfts("type", "’search engine’") only returns documents containing the exact expression "search engine" in their "type" virtual field.

The query can also be expressed with vfts("type", "\"search engine\"").

If the query contains quotes, then these quotes must be preceded by a backslash character in order to distinguish them from the quotes used as exact string delimiters.

Examples

Full-text search for Joe's in field foo : vfts("foo", "joe\'s")

Full-text search for exact expression Sue's Weeding in field foo : vfts("foo", "'Sue\'s wedding'") or vfts("foo", "\"Sue\'s wedding\"")