Message from discussion
Questions about facets
helping public schools" <developers-helping-schools@googlegroups.com>
Received: by 10.224.100.69 with SMTP id x5mr41514105qan.1.1328565632084;
Mon, 06 Feb 2012 14:00:32 -0800 (PST)
X-BeenThere: developers-helping-schools@googlegroups.com
Received: by 10.224.105.14 with SMTP id r14ls1856507qao.4.gmail; Mon, 06 Feb
2012 14:00:31 -0800 (PST)
Received: by 10.224.86.210 with SMTP id t18mr41302301qal.4.1328565631363;
Mon, 06 Feb 2012 14:00:31 -0800 (PST)
Received: by 10.224.86.210 with SMTP id t18mr41302300qal.4.1328565631352;
Mon, 06 Feb 2012 14:00:31 -0800 (PST)
Return-Path: <oli...@donorschoose.org>
Received: from ex07edge2.utopiasystems.net (ex07edge2.utopiasystems.net. [64.74.151.42])
by gmr-mx.google.com with ESMTPS id m29si11008860qco.0.2012.02.06.14.00.31
(version=TLSv1/SSLv3 cipher=OTHER);
Mon, 06 Feb 2012 14:00:31 -0800 (PST)
Received-SPF: pass (google.com: domain of oli...@donorschoose.org designates 64.74.151.42 as permitted sender) client-ip=64.74.151.42;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of oli...@donorschoose.org designates 64.74.151.42 as permitted sender) smtp.mail=oli...@donorschoose.org
Received: from ex07cas13.utopiasystems.net (172.16.1.65) by
ex07edge2.utopiasystems.net (172.16.1.71) with Microsoft SMTP Server (TLS) id
8.3.213.0; Mon, 6 Feb 2012 17:00:21 -0500
Received: from MAGNUS.utopiasystems.net ([172.16.1.93]) by
ex07cas13.utopiasystems.net ([172.16.1.65]) with mapi; Mon, 6 Feb 2012
17:00:21 -0500
From: Oliver Hurst-Hiller <oli...@donorschoose.org>
To: "developers-helping-schools@googlegroups.com"
<developers-helping-schools@googlegroups.com>
Date: Mon, 6 Feb 2012 16:59:58 -0500
Subject: RE: [hacking education] Questions about facets
Thread-Topic: [hacking education] Questions about facets
Thread-Index: AczlCdsnHJVv307JSICVxhFFfsDRHgADlrPg
Message-ID: <52633E37036B8B46AD5814B3CC872F240E03B6B089@MAGNUS.utopiasystems.net>
References: <4d17488a-8560-46e2-915e-c4b445a844e4@t2g2000yqk.googlegroups.com>
In-Reply-To: <4d17488a-8560-46e2-915e-c4b445a84...@t2g2000yqk.googlegroups.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Return-Path: oli...@donorschoose.org
Martin - I'll do my best to answer your questions!
1/ Can facets be enabled or disabled in a search request?
** Yes, they'll only appear in the JSON if you include the argument showFacetCounts=true, eg. http://api.donorschoose.org/common/json_feed.html?APIKey=DONORSCHOOSE&subject1=-1&showFacetCounts=true
2/ Does this page (http://developer.donorschoose.org/documentation/
project-listing/json-feeds/json-responses#TOC-Facet-Counts) accurately reflect what search parameters return facets?
** No, those are just a few examples of the different ways we enumerate the facet values and counts. We return facets for all available filters, which you should see in the example above.
3/ Let's say I search for state=NC. I assume I will get back facets for cities located in NC that require donations. If I search again for the city, will I get the same facets back? In other words, if I want to provide facets or show a breadcrumb of how the search drilled down from State > City, will I get the facets again when I search for city?
Or in the case of (3), do I want to provide the state parameter again and the city name?
** I'm not totally sure I understand the question.
The best way to understand what facets come back is by using our front-end search UX at http://www.donorschoose.org/donors/search.html. If I drill down to projects in Charlotte, NC I get back all the regular non-locale-related facets (eg. Subjects, Donations, Resources) and I additionally get facets for all the schools in Charlotte that have live projects. The JSON API works the same way.
If you're asking if you can query for the city w/o including the state, the answer is No. The front-end works the same way. You need to take your NC query and then add the Charlotte filter on top of it, eg. http://www.donorschoose.org/donors/search.html?state=NC&community=10007:3 or http://api.donorschoose.org/common/json_feed.html?APIKey=DONORSCHOOSE&state=NC&community=10007:3.
Note that every API response with echo the facets in the searchTerms field and provide a link to the same query on our front-end in the searchURL field.
Hope that helps!
Oliver
** We're still Hacking Education! http://bit.ly/ohJrox **
-----Original Message-----
From: developers-helping-schools@googlegroups.com [mailto:developers-helping-schools@googlegroups.com] On Behalf Of Martin Streicher
Sent: Monday, February 06, 2012 2:55 PM
To: Developers & data crunchers helping public schools
Subject: [hacking education] Questions about facets
I have a few questions about facets...
1/ Can facets be enabled or disabled in a search request?
2/ Does this page (http://developer.donorschoose.org/documentation/
project-listing/json-feeds/json-responses#TOC-Facet-Counts) accurately reflect what search parameters return facets?
3/ Let's say I search for state=NC. I assume I will get back facets for cities located in NC that require donations. If I search again for the city, will I get the same facets back? In other words, if I want to provide facets or show a breadcrumb of how the search drilled down from State > City, will I get the facets again when I search for city?
Or in the case of (3), do I want to provide the state parameter again and the city name?
--
You received this message because you are subscribed to the Google Group "Developers & data crunchers helping public schools" group.
--
To post to this group, send email to
developers-helping-schools@googlegroups.com
--
To unsubscribe from this group, send email to
developers-helping-schools+unsubscribe@googlegroups.com
--
For more options, visit this group at
http://groups.google.com/group/developers-helping-schools?hl=en