Simple Single Corpus Query
GET/v2/corpora/:corpus_key/query
Search a single corpus with a straightforward query request, specifying the corpus key and query parameters.
- Specify the unique
corpus_key
identifying the corpus to query. Thecorpus_key
is created in the Vectara Console UI or the Create Corpus API definition. When creating a new corpus, you have the option to assign a customcorpus_key
following your preferred naming convention. This key serves as a unique identifier for the corpus, allowing it to be referenced in search requests. For more information, see Corpus Key Definition. - Enter the search
query
string for the corpus, which is the question you want to ask. - Set the maximum number of results (
limit
) to return. Default: 10, minimum: 1 - Define the
offset
position from which to start in the result set.
For more detailed information, see this Query API guide.
Request
Responses
- 200
- 400
- 403
- 404
A response to a query.
Query request was malformed.
Permissions do not allow querying the corpus.
Corpus not found.