Skip to content

Commit

Permalink
add debug feature and minor tweaks to es integration
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-jones committed Sep 5, 2014
1 parent b3682c2 commit 4a6a71b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions es.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,10 @@ function elasticSearchQuery(params) {
}

// paging (number of results, and start cursor)
if (options.from) {
if (options.from !== undefined) {
qs["from"] = options.from
}
if (options.page_size) {
if (options.page_size !== undefined) {
qs["size"] = options.page_size
}

Expand Down
9 changes: 8 additions & 1 deletion jquery.reportview.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ function theReportview(options) {
*/

// the reportview object to be appended to the page
var thereportview = '<div class="reportview"><svg></svg></div>';
var thereportview = '<div class="reportview"><svg></svg>'
if (options.debug) {
thereportview += "<div class='reportview_debug'><textarea style='width: 100%; height: 200px'></textarea></div>"
}
thereportview += '</div>';
return thereportview
}

Expand Down Expand Up @@ -287,6 +291,9 @@ function renderMultiBar(params) {
// to the must filter
"fixed_filters" : false,

// size of result set
"page_size" : 0,

///// internal state monitoring /////////////////////////////

// these are used internally DO NOT USE
Expand Down
1 change: 1 addition & 0 deletions rv_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@

$('#report-view-bar-facet').each(function() {
$(this).report({
debug: true,
type: "multibar",
search_url: "http://localhost:9200/doaj/article/_search",
facets: [
Expand Down

0 comments on commit 4a6a71b

Please sign in to comment.