License

This article explains where to install the license file so that Lingo3G can find it.

What is a license file?

Lingo3G requires a valid license to operate. The license is a plain-text unicode string. Typically Lingo3G license will be distributed as an XML file following license*.xml naming convention.

The license file can be compressed (with ZIP) but the resulting archive must contain exactly one file (the license) inside the archive.

A license file can be uploaded and validated at secure.carrotsearch.com to provides instant access to the latest Lingo3G (and possibly other products) matching that license's maintenance window.

License file installation

Lingo3G must be able to access and read the license file at runtime. The set of locations used for looking up the license file differs depending on how Lingo3G is configured.

Java API

The Java API will use the following steps to determine which license should be used for processing the request.

The first successful location is evaluated and further lookup is omitted.

  1. If an explicit string is provided in the license parameter passed to the algorithm, this license is used.
  2. If LICENSE_LINGO3G environment variable is defined and points to an accessible file or directory, that location is scanned for any files matching license*.(xml|zip) pattern. All matching files are attempted.
  3. If user.home system property is accessible and points to a readable folder, that location is scanned for any files matching license*.(xml|zip) pattern. All matching files are scanned.
  4. If there exists a resource called license.xml loadable via the class loader of the main Lingo3G algorithm's class then that resource will be loaded.
  5. If there are any custom LicenseLocationSupplier service loader implementations, they will be used to look up licenses.

For development it is most convenient to copy the license file into the user's home folder. For production purposes we recommend creating a custom license location supplier extension which will provide the license location to Lingo3G. An example of this approach is used by the elasticsearch-lingo3g extension plugin for Elasticsearch.

DCS license lookup

The DCS comes with a preconfigured license location supplier extension that scans the following locations for license files:

  1. If an explicit string is provided in the license parameter of the request, it will be used (although passing license text per-request will induce unnecessary overhead and is discouraged).
  2. Any files matching license*.(xml|zip) pattern under conf folder relative to DCS's top-level application directory. This is the recommended location for installing licenses in the DCS.
  3. If LICENSE_LINGO3G environment variable is defined and points to an accessible file or directory, that location is scanned for any files matching license*.(xml|zip) pattern. All matching files are attempted.
  4. If user.home system property is defined and points to an accessible file or directory (typically user's home folder), that location is scanned for any files matching license*.(xml|zip) pattern. All matching files are attempted.