[search] Properly fill up data sample popup section with Solr
@@ -1590,6 +1590,11 @@ var ApiHelper = (function () {
notebookJson = JSON.stringify({ type: options.sourceType });
snippetJson = JSON.stringify(queryResult);
+ if (sampleResponse && sampleResponse.rows) { // Sync results
+ var data = { data: sampleResponse.rows, meta: sampleResponse.full_headers};
+ data.hueTimestamp = Date.now();
+ deferred.resolve(data);
+ } else {
cancellablePromises.push(
self.whenAvailable({ notebookJson: notebookJson, snippetJson: snippetJson, silenceErrors: options.silenceErrors }).done(function () {
var resultRequest = self.simplePost('/notebook/api/fetch_result_data', {
@@ -1608,6 +1613,7 @@ var ApiHelper = (function () {
cancellablePromises.push(resultRequest, resultRequest);
}).fail(deferred.reject)
);
+ }
}).fail(deferred.reject);
cancellablePromises.push({
