-
Notifications
You must be signed in to change notification settings - Fork 11
Development Tips and Tricks
In server/services/builder.js
, in function getWebpackConfig
, you can set the mode
to 'development'
(instead of the default 'production'
). This will disable the minifying of JavaScript when compiling templates, which is quite useful for debugging.
In the query
function of DataAcess
class (client/src/ivis/DataAccess.js
), the queries are formed and sent to the server. A good place for logging is right after the query is created (inside the loop). For example, the log can be added here (link to a specific line at the time of writing this) by
console.log("query", qry);
These queries conform to the format described in Data Access from Templates (Queries).
The Elasticsearch queries are executed in the executeElsQry
function in server/lib/indexers/elasticsearch-query.js
. The queries can be logged (in a human-readable format) by adding the following line to the beginning of the function:
log.verbose("ES query", util.inspect(body, false, null, true));
and the following import:
const util = require('util');
For query format reference, see Elasticsearch Guide.