Query Rich Text with .NET
Retrieve content with full-text search
Rich Text can be queried with a full-text predicate. Here is a full-text query on content of type "blog-post".
Copy
var response = await api.Query(
Predicates.at("document.type", "blog-post"),
Predicates.fulltext("document", terms)
).Submit();
Orderings
Structured text fields can be used for orderings. Only the first text block will be used.
Copy
var response = await api.Query(
Predicates.at("document.type", "blog-post"),
Predicates.fulltext("document", terms)
).Orderings("my.blog-post.title").Submit();
Retrieving Additional Information
To prevent having to perform multiple queries, you can use fetchLinks to retrieve fields from the linked documents. It can only be used on simple types such as Text, Date, Timestamp and Number.
It works for links within StructuredText just like link fragments. Usage is detailed on the Query Links page.