YQL 响应 null 当它“不应该”时
使用 http://jobs.sitesixteen.com/ 作为参考。
我使用 YQL 来自动完成城市、州。如果您输入“san”,则 来自 YQL 的响应为 null
。我发现奇怪的是,如果您输入“los”,则 YQL 的响应按预期返回结果。
这是一个格式错误的查询,我只是没有看到它,还是雅虎端的某些内容?
一如既往,我们感谢任何帮助。
Use http://jobs.sitesixteen.com/ for reference.
I'm using YQL for the city, state auto-complete. IF you type "san", the response from YQL is null
. The odd thing I find is that if you type "los", the response from YQL returns results as expected.
Is this a badly formed query and I'm just not seeing it, or something on Yahoo's end?
As always, any help is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我从雅虎的埃迪·巴布科克那里收到的回复!
这仍然让我相信这是他们实施方式的问题,但至少这个问题现在已经解决了。
This is a response I received from Eddie Babcock of Yahoo!
Which still leads me to believe it's an issue with the way they've implemented it, but at least this question is now resolved.
您没有提供足够的信息。
请注意,通过使用
san
手动填充 该特定网站 上的 State 字段,它永远不会返回一个清单。通过将查询修改为 san f(SAN 空间 F),它将返回预期结果。
编辑
该网站就是这样设计的。这是来自 jQuery 函数的注释,该函数为下拉列表拉回数据。它解释了查询背后的逻辑。
// 从 geo.places 中选择名称,admin1.code,其中 text="medf*" 和country.code="US" limit 10 | sort(field="popRank",scending="true")
注意它是如何限制为 10 的吗?
输入返回超过 10 个结果的搜索词将不会返回任何结果。输入
san
会产生超过 10 个结果,因此不会返回任何结果,而输入los
将返回 3 个结果。这与 YQL 不一致无关。
You aren't providing enough information.
Notice that by manually populating the State field on that particular website with
san
it never returns a list.By modifying your query to
san f
(SAN space F) it will return the expected results.EDIT
The site is designed this way. This is a comment from the jQuery function that pulls the data back for the drop down list. It explains the logic behind the query.
// select name,admin1.code from geo.places where text="medf*" and country.code="US" limit 10 | sort(field="popRank", descending="true")
Notice how it's limited to 10?
Entering a search term that returns more than 10 results won't return any results. Entering
san
produces more than 10 results so won't return anything where as enteringlos
returns 3 results.It isn't to do with inconsistencies in YQL.