Class: Google::Apis::CloudsearchV1::RewrittenQueries

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb

Overview

The rewritten queries returned by Apps Search Query Understanding service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RewrittenQueries

Returns a new instance of RewrittenQueries.



6672
6673
6674
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6672

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#rewritten_queriesArray<Google::Apis::CloudsearchV1::RewrittenQuery>

Corresponds to the JSON property rewrittenQueries



6663
6664
6665
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6663

def rewritten_queries
  @rewritten_queries
end

#selected_query_indexFixnum

The index of the selected query in rewritten_queries that is used by QAPI to call CSSR to get search results. If none of the queries were used (i.e. they all give empty search results), selected_query_index would default to -1. Corresponds to the JSON property selectedQueryIndex

Returns:

  • (Fixnum)


6670
6671
6672
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6670

def selected_query_index
  @selected_query_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6677
6678
6679
6680
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6677

def update!(**args)
  @rewritten_queries = args[:rewritten_queries] if args.key?(:rewritten_queries)
  @selected_query_index = args[:selected_query_index] if args.key?(:selected_query_index)
end