带有 phone 号码查询的 searchContacts 已损坏

searchContacts with phone number query is broken

使用 [searchContacts API 方法] (https://developers.google.com/people/api/rest/v1/people/searchContacts) 用于支持通过电话 phone 号码进行搜索 - 实际上这在文档中被调用:

The query matches on a contact's names, nickNames, emailAddresses, phoneNumbers, and organizations fields that are from the CONTACT source.

当使用 phone 号码作为查询时,不再有 returns 结果。这是故意的还是错误?

根据,我尝试了“没有加号的规范格式”的查询。我还尝试过“带加号的规范格式”和“存储的确切数字”。

名称查询仍然有效

https://people.googleapis.com/v1/people:searchContacts?readMask=names%2cphoneNumbers&query=Go Ogle&pageSize=30

returns

{
    "results": [
        {
            "person": {
                "resourceName": "people/c832768086350305259",
                "etag": "%EgcBAgsuNz0/GgECIgwxZGVYd20reHpEUT0=",
                "names": [
                    {
                        "metadata": {
                            "primary": true,
                            "source": {
                                "type": "CONTACT",
                                "id": "b8e96298f3117eb"
                            }
                        },
                        "displayName": "Go Ogle",
                        "familyName": "Ogle",
                        "givenName": "Go",
                        "displayNameLastFirst": "Ogle, Go",
                        "unstructuredName": "Go Ogle"
                    }
                ],
                "phoneNumbers": [
                    {
                        "metadata": {
                            "primary": true,
                            "source": {
                                "type": "CONTACT",
                                "id": "b8e96298f3117eb"
                            }
                        },
                        "value": "020 7031 3000",
                        "canonicalForm": "+442070313000"
                    }
                ]
            }
        }
    ]
}

Phone号码查询失败

https://people.googleapis.com/v1/people:searchContacts?readMask=names%2cphoneNumbers&query=442070313000&pageSize=30

returns

{}

目前查询功能确实好像坏了。我的测试给出了相同的结果,您链接的问题表明它在过去显然有效。

我在 Google 的问题跟踪器上找到了一个 bug report。一个 Googler 已经回复说他们能够复制它并提交了一份内部报告。他们修复它只是时间问题,因此您可能需要跟踪该线程或 post 自己施加一些压力。