Sha256: 264be8561aa576da25c44f15284e7b300fb595c42548acd7e8e32153d3b0a923

Contents?: true

Size: 1.38 KB

Versions: 236

Compression:

Stored size: 1.38 KB

Contents

/*
  This is a basic skeleton JavaScript update processor.

  In order for this to be executed, it must be properly wired into solrconfig.xml; by default it is commented out in
  the example solrconfig.xml and must be uncommented to be enabled.

  See http://wiki.apache.org/solr/ScriptUpdateProcessor for more details.
*/

function processAdd(cmd) {

  doc = cmd.solrDoc;  // org.apache.solr.common.SolrInputDocument
  id = doc.getFieldValue("id");
  logger.info("update-script#processAdd: id=" + id);

// Set a field value:
//  doc.setField("foo_s", "whatever");

// Get a configuration parameter:
//  config_param = params.get('config_param');  // "params" only exists if processor configured with <lst name="params">

// Get a request parameter:
// some_param = req.getParams().get("some_param")

// Add a field of field names that match a pattern:
//   - Potentially useful to determine the fields/attributes represented in a result set, via faceting on field_name_ss
//  field_names = doc.getFieldNames().toArray();
//  for(i=0; i < field_names.length; i++) {
//    field_name = field_names[i];
//    if (/attr_.*/.test(field_name)) { doc.addField("attribute_ss", field_names[i]); }
//  }

}

function processDelete(cmd) {
  // no-op
}

function processMergeIndexes(cmd) {
  // no-op
}

function processCommit(cmd) {
  // no-op
}

function processRollback(cmd) {
  // no-op
}

function finish() {
  // no-op
}

Version data entries

236 entries across 230 versions & 5 rubygems

Version Path
smartmachine-1.3.0 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-1.2.3 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-1.2.1 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-1.2.0 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-1.2.0.dev lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-1.1.1 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-1.1.0 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-1.0.1 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-1.0.0 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-0.9.0 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-0.8.0 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartmachine-0.7.0 lib/smart_machine/grids/solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartcloud-0.6.0 lib/smartcloud/grids/grid-solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartcloud-0.5.3 lib/smartcloud/grids/grid-solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartcloud-0.5.2 lib/smartcloud/grids/grid-solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartcloud-0.5.1 lib/smartcloud/grids/grid-solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartcloud-0.5.0 lib/smartcloud/grids/grid-solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartcloud-0.4.4 lib/smartcloud/grids/grid-solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartcloud-0.4.3 lib/smartcloud/grids/grid-solr/config/configsets/sample_techproducts_configs/conf/update-script.js
smartcloud-0.4.2 lib/smartcloud/grids/grid-solr/config/configsets/sample_techproducts_configs/conf/update-script.js