Page tree
Skip to end of metadata
Go to start of metadata

In a system in which requirements remain fairly static, or at least predictable, the LucidWorks user interface may be sufficient for managing your system. For more complex or dynamic systems, LucidWorks Search provides programmatic, remote access to many aspects of configuration and operation through a REST API. All tasks that can be accomplished with the Admin UI can also be done with the REST API. Some of the more complex administration tasks are available through the API only.

About the LucidWorks Search REST APIs

Topics covered in this section:

The LucidWorks Search REST APIs focus on administrative tasks of manipulating settings, fields, data sources, and other configuration options as well as some system monitoring functions. Programmatic access to search itself is by making GET requests to Solr directly, as documented in the section Getting Search Results. The Apache Solr Reference Guide also contains a great deal of information about searching Solr.

The LucidWorks Search APIs use GET, POST, PUT and DELETE requests. The results of a REST request depend not only on the type of request, but on whether you called it on an object or group of objects. When you use REST requests with LucidWorks, you send a JSON request to the endpoint specified for the object (or group) you want to work with. The system then sends back the results as a JSON object. Currently, LucidWorks only recognizes JSON requests.

Windows users should take care when copying the examples as they assume that you are familiar with how to modify unix-based curl commands for the Windows environment.

About Server Addresses in the API Documentation

Icon

The LucidWorks Search REST API uses the Core component, installed at http://localhost:8888/ by default. Many examples in this Guide use http://localhost:8888/ as the server location, so if you changed this location on install, be sure to change the destination of your REST requests.

Quick Start

A few pages give examples of using the APIs in configuring and managing a LucidWorks-based search application.

List of Available APIs

  • Version: Shows information about the LucidWorks and Solr versions being used by the system.
  • Collections: Groups of documents that are logically separate.
    • Collection Information: Get information about the collection.
    • Collection Templates: Get information about templates that can be used when creating new collections.
    • Collection Index Delete: Delete the entire index or only data from a single data source.
    • Activities: Control schedules for resource-intensive operations such as optimization and building indexes.
      • Status: The status of currently running Activities.
      • History: Statistics for the last 50 runs of an Activity.
    • Data Sources: The conduits by which data enters LucidWorks indexes (see also the sections for individual data source types).
      • Schedules: Control when data is imported.
      • Data Source Jobs: Start and Stop data source jobs.
      • Status: Get the status of currently running data sources.
      • History: Statistics for the last 50 runs of a data source.
      • Crawl Data: Delete the crawling history for a specific data source.
    • Batch Crawling: Create and manage crawling when the data shouldn't be indexed until a later time.
    • JDBC Drivers: Load required JDBC drivers for database indexing.
    • Field Types: Create new field types or modify existing types.
    • Fields: How data from a single document is organized in LucidWorks indexes.
    • Dynamic Fields: Define dynamic fields for on-the-fly field creation based on specific patterns.
    • Filtering Results: Use Access Control Lists to filter results for Windows Shares.
    • Search Components: List active search components for a particular search handler.
    • Settings: Many different query- and index-time settings.
    • Caches: Configure how Solr caches documents to speed results.
    • Click Scoring: Integrate Click Scoring with your own search application to record which documents are most popular with users.
    • Roles: Configure search filters to control access to documents.
  • Alerts: Create and modify alerts for users.
  • Users: Create user accounts (if not using an external user management system, such as LDAP).
  • SSL Configuration: Configure LucidWorks to work with SSL.
  • Crawler Status: Status of communication with the Connectors component.
Icon

When creating or updating a resource (using a POST or a PUT), you generally only need to include those entries in your map that you need to set. When LucidWorks creates a resource, entries you omit will get their default values. When you update a resource, entries you omit will retain their previous values.

JSON primitives can be used and will be returned, but LucidWorks also accepts string parse-able equivalents. For example, both 4 or "4" are valid inputs for an integer type, but 4 will be returned by the REST API.

APIs that take a list will also take a single variable (for example, a list<string> accepts string) and treat it as a list of size 1.

For convenience, you can append ".json" to any method.