Skip to main content
Jump to: navigation, search

SMILA/Documentation/Indexing

< SMILA‎ | Documentation
Revision as of 06:28, 10 April 2015 by Andreas.weber.empolis.com (Talk | contribs) (Created page with "== Add data to a Solr search index == SMILA comes with predefined workflows and jobs to add/delete data from/to a solr search index. As described in the [https://wiki.eclips...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Add data to a Solr search index

SMILA comes with predefined workflows and jobs to add/delete data from/to a solr search index.

As described in the 5 Minutes tutorial there are separate predefined jobs for importing the data (crawl jobs) and indexing the data.

The common predefined job for indexing is "indexUpdate". It uses the ScriptProcessorWorker that executes JavaScript for inserting (add.js) and deleting (delete.js) records to the predefined solr search index ("collection1").

The JavaScripts can also be called directly from the REST API to add/delete data records, e.g.

Add a record to the solr index:

POST http://localhost:8080/smila/script/add.process
{
  "_recordid": "id1",
  "Title": "Scripting rules!",
  "Content": "yet another SMILA document",
  "MimeType": "text/plain"
}

Delete record from solr index:

POST http://localhost:8080/smila/script/delete.process
{
  "_recordid": "id1"
}


  • For more details about the "indexUpdate" workflow and "indexUpdate" job definitions see SMILA/configuration/org.eclipse.smila.jobmanager/workflows.json and jobs.json).
  • For more information about job management in general please check the JobManager documentation.

Back to the top