@dotcms/client
Version:
Official JavaScript library for interacting with DotCMS REST APIs.
33 lines (32 loc) • 859 B
TypeScript
import { Equals } from './Equals';
/**
* The `Field` class is used to build a query with a specific field.
* A Lucene Field is a key used to search for a specific value in a document.
*
* @export
* @class Field
*/
export declare class Field {
#private;
private query;
/**
* Creates an instance of the `Field` class.
*
* @param {string} query - The initial query string.
*/
constructor(query: string);
/**
* Appends a term to the query that should be included in the search.
*
* @example
* ```typescript
* const field = new Field("+myField");
* field.equals("myValue");
* ```
*
* @param {string} term - The term that should be included in the search.
* @return {Equals} - An instance of `Equals`.
* @memberof Field
*/
equals(term: string): Equals;
}