fix for diffbot. use objects not results

for global-index.
This commit is contained in:
Matt Wells
2014-09-02 15:02:12 -07:00
parent c82c41540c
commit 8f92a6d767

@ -2360,11 +2360,14 @@ bool printSearchResultsHeader ( State0 *st ) {
printLeftNavColumn ( *sb,st );
}
// global-index is not a custom crawl but we should use "objects"
bool isDiffbot = cr->m_isCustomCrawl;
if ( strcmp(cr->m_coll,"GLOBAL-INDEX") == 0 ) isDiffbot = true;
// for diffbot collections only...
if ( st->m_header &&
if ( st->m_header &&
si->m_format == FORMAT_JSON &&
cr->m_isCustomCrawl ) {
isDiffbot ) {
sb->safePrintf("\"objects\":[\n");
return true;
}