public class GenerateIndexConfig
extends java.lang.Object
Generates a MarkLogic index configuration file in JSON format describing the indexes required by the annotations on the specific classes. The output can be used by an administrator to create indexes in the database using the Management REST API.
WARNING! Applying this generated index file via management API will overwrite existing indexes! Only use this as-is if there are no other indexes on your database that you want to keep. To add these indexes to other indexes please get the configuration for existing indexes from the management API and add these to that file before applying.
Usage example:
java com.marklogic.client.pojo.util.GenerateIndexConfig -classes "com.marklogic.client.test.City com.marklogic.client.test.Country" -file cityIndexes.json curl -i --digest --user admin:admin \ -H 'Content-Type: application/json' \ -d '@cityIndexes.json' \ -X PUT 'http://localhost:8002/manage/LATEST/databases/java-unittest/properties'
Constructor and Description |
---|
GenerateIndexConfig() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Reads the annotations from the specified classes
and generates MarkLogic index configurations specified by the
annotations.
|
public static void main(java.lang.String[] args) throws java.io.IOException, java.lang.ClassNotFoundException
args
- an array of the above documented options
followed directly by the value for that optionjava.io.IOException
- if an error occurs reading
the classes or writing the outputjava.lang.IllegalStateException
- if errors are
found in your annotationsjava.lang.ClassNotFoundException
- if the classes
are not found on the classpathCopyright © 2024 MarkLogic Corporation. All Rights Reserved.