santchinu / npr-android-app

Automatically exported from code.google.com/p/npr-android-app
0 stars 0 forks source link

Add &gsa=1 parameter to all search queries #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The code that enables the API to use the Google Search Appliance for 
search-based API queries is now live.   Javaun has re-indexed the site so 
that the additional metadata needed to support the API was added to the 
index.

Among the new features this enabled:

1.   Search-based API queries now respect the requiredAssets parameter.

2.   There is a new sort option: sort=relevance

3.   Results should be more consistent with the site search.   Note that 
there are differences between the queries used for the site search and the 
API, so I don’t expect identical results.  For example, the API only 
returns stories, while the site search may return other types of pages such 
as bios or artist pages.

4.   Hopefully, it just damn works now.   I’m noticing that an API query 
that includes a search term plus a Bio Id doesn’t seem to work at all with 
Autonomy (http://api.npr.org/query?
id=2101185&searchTerm=bush&apiKey=MDAwMTAwMDE0MDEyMjQ2MDUwOTA2OTQ4NA001&out
put=RSS) (I didn’t realize this was broken).   However, this does work with 
the GSA (http://api.npr.org/query?
id=2101185&searchTerm=bush&apiKey=MDAwMTAwMDE0MDEyMjQ2MDUwOTA2OTQ4NA001&out
put=RSS&gsa=1 ).    

Currently, the API still uses Autonomy by default when doing search based 
API queries.   However, if you add &gsa=1 to your query string, it will use 
the GSA instead.   Note that this flag will go away in two weeks when we 
make the GSA the default search provider to the API.

Original issue reported on code.google.com by perr...@gmail.com on 11 Mar 2010 at 6:30

GoogleCodeExporter commented 8 years ago

Original comment by mfreder...@google.com on 2 Aug 2010 at 7:01