PMSEARCHTEXTQUERY(3)
π PMSEARCHTEXTQUERY π
okay bestie, say hi to pmSearchTextQuery β she's the Library Functions Manual girlie who does full-text search for metrics, instances and instance domains that the PCP search services hand over. no cap, she's the one you call when you want to find stuff by vibes and words instead of by exact name. π¦
β¨ C SYNOPSIS β¨
like, literally just this:
#include <pcp/pmwebapi.h>
int pmSearchTextQuery(pmSearchSettings *settings,
pmSearchTextRequest *request, void *arg);
cc ... -lpcp_web
don't forget the -lpcp_web at link time or she simply will not show up. π
πΈ DESCRIPTION πΈ
she runs a full-text search across name, oneline help and helptext (when it's actually available, no shade) β and exactly what she searches is whatever you put in request. here's the tea on every field, one by one, no skipping:
queryβ the query string that gets used to search. that's it, that's the whole vibe. πcountβ limits how many results you get back. defaults to10.offsetβ the search offset. defaults to0.type_metric,type_indom,type_instβ bit flags that limit the query so it only takes specific types of entities into account. defaults to all.highlight_name,highlight_oneline,highlight_helptextβ bit flags saying whether or not to highlight the matched terms in the results. defaults to none. and when they are highlighted, the matched terms get wrapped in<b>and</b>β yes, actual HTML-ish tags, that's not a typo, that's the assignment. β¨infields_name,infields_oneline,infields_helptextβ bit flags that let you limit the full-text search query to only match against the fields you name. defaults to all.return_name,return_indom,return_oneline,return_helptext,return_typeβ bit flags for omitting specific fields from the result. defaults to all. heads up though: fields may end up omitted either way if the value of that field just doesn't exist for a given record. not personal, bestie, the data's just not there. π
and then β every single entity that matches the request above gets passed to the on_text_result callback that settings provides. she doesn't just find them, she hands them to you. main character behaviour honestly. π
π DIAGNOSTICS π
this function always returns zero on success. on failure, a negative PMAPI error code comes back at you. if you see a negative number, that's not a vibe, go read the code. π
π SEE ALSO π
go read these too, they're all in the group chat:
ngl this one is a bop: give her a request, get entities back through a callback, stay hydrated, and for the love of everything please check that return value. π«Ά
Performance Co-Pilot β PCP, baybee. that's the source, that's the version, that's the whole page. mwah. πβ¨ππ¦πΈπ
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu resolute: libpcp4-dev 7.1.1-1
- ubuntu stonking: libpcp4-dev 7.2.1-2build1
- Copyright (c) 2020 Red Hat
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms