3 messages in com.googlegroups.google-base-data-apiRe: Differences in searching results| Subject: | Re: Differences in searching results![]() |
|---|---|
| From: | Jeff S (j....@google.com) |
| Date: | 12/12/2007 11:06:02 AM |
| List: | com.googlegroups.google-base-data-api |
Hello again David,
I found some better documentation for location and event date queries:
http://code.google.com/apis/base/attrs-queries.html#LocDatQuer
After reading the above, I'd revise the query to look like this:
http://www.google.com/base/feeds/snippets?bq=[item+type:events+and+activities][location:@%22Liverpool+GB%22%2B3mi][event+date+range:2007-12-10..2007-12-12]
Thank you,
Jeff
On Dec 12, 10:43 am, Jeff S <j....@google.com> wrote:
Hi David,
Translating Google Base search URL into API snippets queries is often a difficult task so I think it might be easier if you approach the problem from a clean slate and think of the requirements of the information you are interested in. I haven't really tried constructing Google Base search URL since they aren't documented (but the API URLs are) so I'd have to make assumptions about how they work.
One possible improvement to your snippets query would be to use
location syntax for that portion of your query. (See the "Locations"
section at bottom of the following
documentation:http://code.google.com/apis/base/query-lang-spec.html#lexical). I
also noticed that you didn't include an item type in your snippet
query and I think the value you are looking for there is "events and
activities". This should give better results than just putting "event"
as a text query in the bq parameter. You could also use < and > to
compare dates to create a range. Here is your original query with a
couple of tweaks:
http://www.google.com/base/feeds/snippets?bq=[item+type:events+and+activities][location:@Liverpool+GB][event+date+range%3E2007-12-10][event+date+range%3C2007-12-12]
Is that moving closer to the expected results?
Happy coding,
Jeff
On Dec 11, 3:45 am, David Z <zous...@gmail.com> wrote:
Dear all:
I scratch my head to figure out why these two searches resulted in quite different results. You should be able to paste the link to see the different.... Any ideas?
Kind regards
David
http://www.google.com/base/feeds/snippets?bq=event[location:Liverpool%20GB][event+date+range:2007-12-11]
http://base.google.com/base/s2/s2/ajax?a_n0=events%20and%20activities... These are the parameters sent for the query a_f1 12/11/07 a_n0 events and activities a_n1 event+date+range a_n2 location a_o1 3 a_o2 0 a_t1 12/11/07 a_t2 -1 a_v2 Liverpool GB a_y0 9 a_y1 7 a_y2 6 gl US hl en lnk refine-1 q ra -405526919 scoring start 0




