Skip to main content

Search knowledge base documents

POST 

/v1/knowledge/search

Supports retrieving the most relevant text by specifying document names. You can also combine document names with filter expressions for scalar metadata fields, or pass only filter expressions for scalar metadata fields.

Request

Body

    collectionView Knowledge base ID (string)
    search object
    content Query content (string)
    documentSetName Document names to search (string)[]
    options object
    chunkExpand Context expansion length (integer)[]
    filter Filter expression (string)
    limit Top K results (integer)

Responses

Success

Schema
    oneOf
    data object
    documents object[]
  • Array [
  • score float
    data object
    text Matched text (string)
    startPos int32
    endPos int32
    pre Preceding context (string)[]
    next Following context (string)[]
    paragraphTitle Paragraph title (string)
    allParentParagraphTitles All parent paragraph titles (string)[]
    documentSet object
    documentSetId Document set ID (string)
    documentSetName Document set name (string)
    author Document set author (string)
    fileTitle Document title (string)
    fileMetaData Document metadata (string)
  • ]
  • requestId Unique request ID (string)
Loading...