Document searches
The arguments for the documents() query such as from, where,
and orderBy in general follow the CE query SQL syntax for those parts of the SQL
statement.
Handling single or joined class searches
from argument can either specify a single class only or can also contain
joined classes (but must include a document class). The argument is optional to query for the base
Document class, and if not specified, will query against the base Document class.{
documents(
repositoryIdentifier:"OS1"
from:"Document"
where:"[DateCreated] > 20180815T070000Z AND [IsCurrentVersion] = True"
orderBy:"DocumentTitle"
pageSize:20
) {
documents {
dateCreated
id
name
majorVersionNumber
minorVersionNumber
mimeType
}
pageInfo {
token
}
}
}
Handling document searches in virtual tables
If you defined a virtual table for an object store, you can use GraphQL to perform searches that involve virtual tables. For more information, see the topic Creating virtual tables.
The following example uses the GenAI::VectorSearch virtual table from the GenAI
Extensions add‑on to perform a vector search. It uses a query that selects a single type of object,
such as documents().
{
documents(
repositoryIdentifier:"p8os1",
from:"GenAI::VectorSearch(Document, 'Legal Policy')"
where: "Creator='p8admin' and VersionStatus=1"
) {
documents {
creator
dateCreated
lastModifier
dateLastModified
id
name
}
}
}
For more information, see the topic Relational query syntax for virtual tables.
Handling pagination in documents query
PageInfo. The next page of results can be obtained by using
moreDocuments().{
moreDocuments(
token: "<insert_token>"
) {
documents {
dateCreated
id
name
majorVersionNumber
minorVersionNumber
mimeType
}
pageInfo {
token
}
}
}
The output data should be shaped the same way as the original documents() call. The specific properties being selected and the depth of any complex nested data is established in the original call and cannot be changed in the continuation call.