Google Cloud Discovery Engine V1 Client - Class UnstructuredDocumentInfo (1.5.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class UnstructuredDocumentInfo.

Unstructured document information.

Generated from protobuf message google.cloud.discoveryengine.v1.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ AnswerQueryRequest \ SearchSpec \ SearchResultList \ SearchResult

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ documentstring

Document resource name.

↳ uristring

URI for the document.

↳ titlestring

Title.

↳ document_contextsarray<UnstructuredDocumentInfo\DocumentContext>

List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.

↳ extractive_segmentsarray<UnstructuredDocumentInfo\ExtractiveSegment>

List of extractive segments.

↳ extractive_answersarray<UnstructuredDocumentInfo\ExtractiveAnswer>

Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.

getDocument

Document resource name.

Returns
TypeDescription
string

setDocument

Document resource name.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getUri

URI for the document.

Returns
TypeDescription
string

setUri

URI for the document.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getTitle

Title.

Returns
TypeDescription
string

setTitle

Title.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getDocumentContexts

List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setDocumentContexts

List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.

Parameter
NameDescription
vararray<UnstructuredDocumentInfo\DocumentContext>
Returns
TypeDescription
$this

getExtractiveSegments

List of extractive segments.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setExtractiveSegments

List of extractive segments.

Parameter
NameDescription
vararray<UnstructuredDocumentInfo\ExtractiveSegment>
Returns
TypeDescription
$this

getExtractiveAnswers

Deprecated: This field is deprecated and will have no effect on the Answer generation.

Please use document_contexts and extractive_segments fields. List of extractive answers.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setExtractiveAnswers

Deprecated: This field is deprecated and will have no effect on the Answer generation.

Please use document_contexts and extractive_segments fields. List of extractive answers.

Parameter
NameDescription
vararray<UnstructuredDocumentInfo\ExtractiveAnswer>
Returns
TypeDescription
$this