diff options
author | ab <abdullah_ahmed@brown.edu> | 2019-07-01 15:40:55 -0400 |
---|---|---|
committer | ab <abdullah_ahmed@brown.edu> | 2019-07-01 15:40:55 -0400 |
commit | 0fc7edd5f9bd1234f8de6e5b1c7b8f23668d784c (patch) | |
tree | 2ddff97c032657fb86de37c3be2cf2d201980088 /solr-8.1.1/example/example-DIH/solr/mail/conf/update-script.js | |
parent | 4f8b7cecea3ceed6861c38bde9ce03c9c46e2d09 (diff) | |
parent | 6bd79baf2d9301304194d87667bb5c66c17e5298 (diff) |
Merge branch 'monikasearch2' of https://github.com/browngraphicslab/Dash-Web into text_box_ab
Diffstat (limited to 'solr-8.1.1/example/example-DIH/solr/mail/conf/update-script.js')
-rw-r--r-- | solr-8.1.1/example/example-DIH/solr/mail/conf/update-script.js | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/solr-8.1.1/example/example-DIH/solr/mail/conf/update-script.js b/solr-8.1.1/example/example-DIH/solr/mail/conf/update-script.js new file mode 100644 index 000000000..49b07f9b7 --- /dev/null +++ b/solr-8.1.1/example/example-DIH/solr/mail/conf/update-script.js @@ -0,0 +1,53 @@ +/* + 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 +} |