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.



6705
6706
6707
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6705

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

Instance Attribute Details

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

Corresponds to the JSON property rewrittenQueries



6696
6697
6698
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6696

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)


6703
6704
6705
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6703

def selected_query_index
  @selected_query_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6710
6711
6712
6713
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6710

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