Repository navigation
Support multiple Search returnFields #986
Description
Activity
Thanks for the report! I'll get on this 👍
I looked into this a little bit,
requestuses a module calledqsinternally, this is a code sample from their docsQs.stringify({ a: ['b', 'c', 'd'] }); // 'a[0]=b&a[1]=c&a[2]=d'
This explains the problem we're seeing and it looks like we can get around it by passing
requestaqsStringifyOptionsobject withindicesset tofalse. Do we know if that's the standard way the upstream API deals with query strings? Just curious about if it would be safe to turn of indices globally or if we'll need to handle this on a case by case basis.That's interesting. From the request docs, we can also use
useQuerystring: trueto use the default querystring module which loses the indices.But in this case, it looks like the API wants a string and not a list of strings:
... ... ... returnFieldsstring List of fields to return in SearchResultobjects. It can be fields fromDocument, the built-in fields_rankand_score, and fields defined infieldExpressions. Use"*"to return all fields fromDocument.Looks like there is either a discrepancy in the type or an unknown delimter... subscribed to googleapis/google-cloud-ruby#450 so we can see what needs to be done here when that's resolved.
- addedstatus: blockedResolving the issue is dependent on other work.Resolving the issue is dependent on other work.and removedstatus: blockedResolving the issue is dependent on other work.Resolving the issue is dependent on other work.
on Dec 7, 2015 - added a commit that references this issue
on Feb 3, 2026 - added 2 commits that reference this issue
on Mar 27, 2026
I've been troubleshooting some gcloud-ruby issues connecting to the Cloud Search API. I've been looking at gcloud-node's implementation, and I can't get find a way to specify multiple
returnFieldsvalues.Here is my setup:
I can perform a simple search without specifying any
returnFieldsvalues:And I can specify a single
returnFieldsvalue:The trouble I run into is specifying multiple values: