Class: Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb

Overview

Search specification.

Defined Under Namespace

Classes: SearchParams, SearchResultList

Instance Attribute Summary collapse

Instance Attribute Details

#search_params::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchParams

Returns Search parameters.



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 381

class SearchSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Search parameters.
  # @!attribute [rw] max_return_results
  #   @return [::Integer]
  #     Number of search results to return.
  #     The default value is 10.
  # @!attribute [rw] filter
  #   @return [::String]
  #     The filter syntax consists of an expression language for constructing
  #     a predicate from one or more fields of the documents being filtered.
  #     Filter expression is case-sensitive. This will be used to filter
  #     search results which may affect the Answer response.
  #
  #     If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
  #
  #     Filtering in Vertex AI Search is done by mapping the LHS filter key
  #     to a key property defined in the Vertex AI Search backend -- this
  #     mapping is defined by the customer in their schema. For example a
  #     media customers might have a field 'name' in their schema. In this
  #     case the filter would look like this: filter --> name:'ANY("king
  #     kong")'
  #
  #     For more information about filtering including syntax and filter
  #     operators, see
  #     [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
  # @!attribute [rw] boost_spec
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::BoostSpec]
  #     Boost specification to boost certain documents in search results which
  #     may affect the answer query response. For more information on boosting,
  #     see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
  # @!attribute [rw] order_by
  #   @return [::String]
  #     The order in which documents are returned. Documents can be ordered
  #     by a field in an
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} object. Leave
  #     it unset if ordered by relevance. `order_by` expression is
  #     case-sensitive. For more information on ordering, see
  #     [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
  #
  #     If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
  class SearchParams
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Search result list.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>]
  #     Search results.
  class SearchResultList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Search result.
    # @!attribute [rw] unstructured_document_info
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo]
    #     Unstructured document information.
    # @!attribute [rw] chunk_info
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo]
    #     Chunk information.
    class SearchResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Unstructured document information.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] document_contexts
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>]
      #     List of document contexts.
      # @!attribute [rw] extractive_segments
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>]
      #     List of extractive segments.
      # @!attribute [rw] extractive_answers
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>]
      #     List of extractive answers.
      class UnstructuredDocumentInfo
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Document context.
        # @!attribute [rw] page_identifier
        #   @return [::String]
        #     Page identifier.
        # @!attribute [rw] content
        #   @return [::String]
        #     Document content.
        class DocumentContext
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Extractive segment.
        # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
        # @!attribute [rw] page_identifier
        #   @return [::String]
        #     Page identifier.
        # @!attribute [rw] content
        #   @return [::String]
        #     Extractive segment content.
        class ExtractiveSegment
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Extractive answer.
        # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
        # @!attribute [rw] page_identifier
        #   @return [::String]
        #     Page identifier.
        # @!attribute [rw] content
        #   @return [::String]
        #     Extractive answer content.
        class ExtractiveAnswer
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end
      end

      # Chunk information.
      # @!attribute [rw] chunk
      #   @return [::String]
      #     Chunk resource name.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      class ChunkInfo
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end
end

#search_result_list::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList

Returns Search result list.



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb', line 381

class SearchSpec
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Search parameters.
  # @!attribute [rw] max_return_results
  #   @return [::Integer]
  #     Number of search results to return.
  #     The default value is 10.
  # @!attribute [rw] filter
  #   @return [::String]
  #     The filter syntax consists of an expression language for constructing
  #     a predicate from one or more fields of the documents being filtered.
  #     Filter expression is case-sensitive. This will be used to filter
  #     search results which may affect the Answer response.
  #
  #     If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
  #
  #     Filtering in Vertex AI Search is done by mapping the LHS filter key
  #     to a key property defined in the Vertex AI Search backend -- this
  #     mapping is defined by the customer in their schema. For example a
  #     media customers might have a field 'name' in their schema. In this
  #     case the filter would look like this: filter --> name:'ANY("king
  #     kong")'
  #
  #     For more information about filtering including syntax and filter
  #     operators, see
  #     [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
  # @!attribute [rw] boost_spec
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::BoostSpec]
  #     Boost specification to boost certain documents in search results which
  #     may affect the answer query response. For more information on boosting,
  #     see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
  # @!attribute [rw] order_by
  #   @return [::String]
  #     The order in which documents are returned. Documents can be ordered
  #     by a field in an
  #     {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} object. Leave
  #     it unset if ordered by relevance. `order_by` expression is
  #     case-sensitive. For more information on ordering, see
  #     [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
  #
  #     If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
  class SearchParams
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Search result list.
  # @!attribute [rw] search_results
  #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>]
  #     Search results.
  class SearchResultList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Search result.
    # @!attribute [rw] unstructured_document_info
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo]
    #     Unstructured document information.
    # @!attribute [rw] chunk_info
    #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo]
    #     Chunk information.
    class SearchResult
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Unstructured document information.
      # @!attribute [rw] document
      #   @return [::String]
      #     Document resource name.
      # @!attribute [rw] uri
      #   @return [::String]
      #     URI for the document.
      # @!attribute [rw] title
      #   @return [::String]
      #     Title.
      # @!attribute [rw] document_contexts
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>]
      #     List of document contexts.
      # @!attribute [rw] extractive_segments
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>]
      #     List of extractive segments.
      # @!attribute [rw] extractive_answers
      #   @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>]
      #     List of extractive answers.
      class UnstructuredDocumentInfo
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Document context.
        # @!attribute [rw] page_identifier
        #   @return [::String]
        #     Page identifier.
        # @!attribute [rw] content
        #   @return [::String]
        #     Document content.
        class DocumentContext
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Extractive segment.
        # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
        # @!attribute [rw] page_identifier
        #   @return [::String]
        #     Page identifier.
        # @!attribute [rw] content
        #   @return [::String]
        #     Extractive segment content.
        class ExtractiveSegment
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end

        # Extractive answer.
        # [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
        # @!attribute [rw] page_identifier
        #   @return [::String]
        #     Page identifier.
        # @!attribute [rw] content
        #   @return [::String]
        #     Extractive answer content.
        class ExtractiveAnswer
          include ::Google::Protobuf::MessageExts
          extend ::Google::Protobuf::MessageExts::ClassMethods
        end
      end

      # Chunk information.
      # @!attribute [rw] chunk
      #   @return [::String]
      #     Chunk resource name.
      # @!attribute [rw] content
      #   @return [::String]
      #     Chunk textual content.
      class ChunkInfo
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end
    end
  end
end