---
name: "pmSearchTextQuery"
section: "3"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pmSearchTextQuery"
---

# pmSearchTextQuery(3)

full-text search for metrics, instances and instance domains provided by PCP search services

## NAME

**pmSearchTextQuery** - full-text search for metrics, instances and instance domains provided by PCP search services

## C SYNOPSIS

**#include \<pcp/pmwebapi.h\>**

**int pmSearchTextQuery(pmSearchSettings \****settings***,** **pmSearchTextRequest \****request***,** **void \****arg***);**

**cc ... -lpcp\_web**

## DESCRIPTION

Executes full-text search in name, oneline help, helptext (when available) as specified by *request*:

- *query*

  Query string that will be used to search.

- *count*

  Limits number of results. Defaults to 10.

- *offset*

  Search offset. Defaults to 0.

- *type\_metric*, *type\_indom*, *type\_inst*

  Bit flags that limit query to only take into the account specific type of entities. Defaults to all.

- *highlight\_name*, *highlight\_oneline*, *highlight\_helptext*

  Bit flags that specify whether or not to highlight matched terms in results. Defaults to none. Highlighted terms are wrapped with \`\<b\>' and \`\</b\>'.

- *infields\_name*, *infields\_oneline*, *infields\_helptext*

  Bit flags that allow limiting full-text search query matching only to specified fields. Defaults to all.

- *return\_name*, *return\_indom*, *return\_oneline*, *return\_helptext*, *return\_type*

  Bit flags for omitting specific fields from result. Defaults to all. Fields may be omitted either way if value of a field doesn't exist for a given record.

Each entity matched by the **request** above will be passed to **on\_text\_result** callback provided by **settings.**

## DIAGNOSTICS

This function always returns zero on success. On failure a negative PMAPI error code is returned.

## SEE ALSO

[**pmproxy**(1)](/pmproxy/1.md), [**pmlogger**(1)](/pmlogger/1.md), [**pmsearch**(1)](/pmsearch/1.md), [**pmSearchSetup**(3)](/pmSearchSetup/3.md), [**PMAPI**(3)](/PMAPI/3.md) and [**PMWEBAPI**(3)](/PMWEBAPI/3.md).
