Class: Google::Apis::CloudsearchV1::QueryInterpretation

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryInterpretation

Returns a new instance of QueryInterpretation.



6084
6085
6086
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6084

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

Instance Attribute Details

#interpretation_typeString

Corresponds to the JSON property interpretationType

Returns:

  • (String)


6058
6059
6060
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6058

def interpretation_type
  @interpretation_type
end

#interpreted_queryString

The interpretation of the query used in search. For example, queries with natural language intent like "email from john" will be interpreted as "from: john source:mail". This field will not be filled when the reason is NOT_ENOUGH_RESULTS_FOUND_FOR_USER_QUERY. Corresponds to the JSON property interpretedQuery

Returns:

  • (String)


6066
6067
6068
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6066

def interpreted_query
  @interpreted_query
end

#interpreted_query_actual_result_countFixnum

The actual number of results returned by the interpreted query. Corresponds to the JSON property interpretedQueryActualResultCount

Returns:

  • (Fixnum)


6071
6072
6073
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6071

def interpreted_query_actual_result_count
  @interpreted_query_actual_result_count
end

#interpreted_query_estimated_result_countFixnum

The estimated number of results returned by the interpreted query. Corresponds to the JSON property interpretedQueryEstimatedResultCount

Returns:

  • (Fixnum)


6076
6077
6078
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6076

def interpreted_query_estimated_result_count
  @interpreted_query_estimated_result_count
end

#reasonString

The reason for interpretation of the query. This field will not be UNSPECIFIED if the interpretation type is not NONE. Corresponds to the JSON property reason

Returns:

  • (String)


6082
6083
6084
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6082

def reason
  @reason
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6089
6090
6091
6092
6093
6094
6095
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 6089

def update!(**args)
  @interpretation_type = args[:interpretation_type] if args.key?(:interpretation_type)
  @interpreted_query = args[:interpreted_query] if args.key?(:interpreted_query)
  @interpreted_query_actual_result_count = args[:interpreted_query_actual_result_count] if args.key?(:interpreted_query_actual_result_count)
  @interpreted_query_estimated_result_count = args[:interpreted_query_estimated_result_count] if args.key?(:interpreted_query_estimated_result_count)
  @reason = args[:reason] if args.key?(:reason)
end