| Package | Description |
|---|---|
| org.elasticlunr |
The elasticLunr package.
|
| org.json |
The json package.
|
| Modifier and Type | Method and Description |
|---|---|
JSONObject |
Index.fieldSearch(JSONArray queryTokens,
java.lang.String fieldName,
JSONObject config)
Search queryTokens in specified field.
|
JSONObject |
Configuration.get()
get current user configuration.
|
JSONObject |
DocumentStore.getDoc(int docRef)
Retrieves the JSON doc from the document store for a given key.
|
JSONObject |
DocumentStore.getDoc(java.lang.String docRef)
Retrieves the JSON doc from the document store for a given key.
|
JSONObject |
DocumentStore.getDocInfo() |
JSONObject |
InvertedIndex.getDocs(java.lang.String token)
Retrieve the documents of a given token.
|
JSONObject |
InvertedIndex.getNode(java.lang.String token)
Retrieve a node from the inverted index for a given token.
|
JSONObject |
InvertedIndex.getRoot()
Return the root.
|
JSONObject |
DocumentStore.toJSON()
Convert the store to the JSON format.
|
JSONObject |
Index.toJSON()
Convert the index to the JSON format.
|
JSONObject |
InvertedIndex.toJSON() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<JSONObject> |
Index.search(JSONObject query)
Searches the index using the passed query, with a default configuration.
|
java.util.List<JSONObject> |
Index.search(JSONObject query,
JSONObject userConfig)
Searches the index using the passed query.
|
java.util.List<JSONObject> |
Index.search(java.lang.String query)
Searches the index using the passed query, with a default configuration.
|
java.util.List<JSONObject> |
Index.search(java.lang.String query,
JSONObject userConfig)
Searches the index using the passed query.
|
java.util.List<JSONObject> |
Index.search(java.lang.String query,
java.lang.String userConfig)
Searches the index using the passed query.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DocumentStore.addDoc(int docRef,
JSONObject doc)
Stores the given doc in the document store against the given id.
|
void |
Index.addDoc(JSONObject doc)
Add a JSON format document to the index, without emitting any event.
|
void |
Index.addDoc(JSONObject doc,
boolean emitEvent)
Add a JSON format document to the index.
|
void |
DocumentStore.addDoc(java.lang.String docRef,
JSONObject doc)
Stores the given doc in the document store against the given id.
|
void |
InvertedIndex.addToken(java.lang.String token,
JSONObject tokenInfo)
Adds a {token: tokenInfo} pair to the inverted index, with no specified root.
|
void |
InvertedIndex.addToken(java.lang.String token,
JSONObject tokenInfo,
JSONObject root)
Adds a {token: tokenInfo} pair to the inverted index.
|
void |
IndexListener.emit(java.lang.String eventName,
JSONObject o,
Index index)
Fired for a document event
|
java.util.Stack<java.lang.String> |
InvertedIndex.expandToken(java.lang.String token,
java.util.Stack<java.lang.String> memo,
JSONObject root)
Find all the possible suffixes of given token using tokens currently in the inverted index.
|
JSONObject |
Index.fieldSearch(JSONArray queryTokens,
java.lang.String fieldName,
JSONObject config)
Search queryTokens in specified field.
|
static DocumentStore |
DocumentStore.load(JSONObject json)
Loads a previously serialised document store.
|
static Index |
Index.load(JSONObject json)
Loads a previously serialised index.
|
static InvertedIndex |
InvertedIndex.load(JSONObject serialisedData)
Loads a previously serialised inverted index, in an uncompressed format
|
static Index |
Index.load(JSONObject json,
boolean compress)
Loads a previously serialised index.
|
static InvertedIndex |
InvertedIndex.load(JSONObject serialisedData,
boolean compress)
Loads a previously serialised inverted index.
|
static Index |
Index.load(JSONObject json,
int options,
boolean compress)
Loads a previously serialised index.
|
static Index |
Index.load(JSONObject json,
java.lang.String lang)
Loads a previously serialised index.
|
static Index |
Index.load(JSONObject json,
java.lang.String lang,
boolean compress)
Loads a previously serialised index.Issues a warning if the index being imported was serialised by a different version of elasticlunr.
|
static Index |
Index.load(JSONObject json,
java.lang.String lang,
int options)
Loads a previously serialised index.Issues a warning if the index being imported was serialised by a different version of elasticlunr.
|
static Index |
Index.load(JSONObject json,
java.lang.String lang,
int options,
boolean compress)
Loads a previously serialised index.Issues a warning if the index being imported was serialised by a different version of elasticlunr.
|
void |
Index.removeDoc(JSONObject doc)
Removes a document from the index.
|
void |
Index.removeDoc(JSONObject doc,
boolean emitEvent)
Removes a document from the index.
|
java.util.List<JSONObject> |
Index.search(JSONObject query)
Searches the index using the passed query, with a default configuration.
|
java.util.List<JSONObject> |
Index.search(JSONObject query,
JSONObject userConfig)
Searches the index using the passed query.
|
java.util.List<JSONObject> |
Index.search(java.lang.String query,
JSONObject userConfig)
Searches the index using the passed query.
|
void |
Index.updateDoc(JSONObject doc)
Updates a document in the index.
|
void |
Index.updateDoc(JSONObject doc,
boolean emitEvent)
Updates a document in the index.
|
| Constructor and Description |
|---|
Configuration(JSONObject config,
java.util.List<java.lang.String> fields) |
DocumentStore(JSONObject json) |
InvertedIndex(JSONObject root)
Creates an uncompressed InvertedIndex.
|
InvertedIndex(JSONObject root,
boolean compress)
Creates an InvertedIndex.
|
| Modifier and Type | Method and Description |
|---|---|
JSONObject |
JSONObject.accumulate(java.lang.String key,
java.lang.Object value)
Accumulate values under a key.
|
JSONObject |
JSONObject.add(java.lang.String key,
java.lang.Number value)
Add a number to a property.
|
JSONObject |
JSONObject.append(java.lang.String key,
java.lang.Object value)
Append values to the array under a key.
|
JSONObject |
JSONObject.clone() |
static JSONObject |
JSONObject.create()
Create a new JSONObject.
|
JSONObject |
JSONObject.decrement(java.lang.String key)
Decrement a property of a JSONObject.
|
JSONObject |
JSONArray.getJSONObject(int index)
Get the JSONObject associated with an index.
|
JSONObject |
JSONObject.getJSONObject(java.lang.String key)
Get the JSONObject value associated with a key.
|
JSONObject |
JSONObject.increment(java.lang.String key)
Increment a property of a JSONObject.
|
JSONObject |
JSONArray.optJSONObject(int index)
Get the optional JSONObject associated with an index.
|
JSONObject |
JSONObject.optJSONObject(java.lang.String key)
Get an optional JSONObject associated with a key.
|
JSONObject |
JSONObject.put(java.lang.String key,
boolean value)
Put a key/boolean pair in the JSONObject.
|
JSONObject |
JSONObject.put(java.lang.String key,
java.util.Collection<?> value)
Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection.
|
JSONObject |
JSONObject.put(java.lang.String key,
double value)
Put a key/double pair in the JSONObject.
|
JSONObject |
JSONObject.put(java.lang.String key,
float value)
Put a key/float pair in the JSONObject.
|
JSONObject |
JSONObject.put(java.lang.String key,
int value)
Put a key/int pair in the JSONObject.
|
JSONObject |
JSONObject.put(java.lang.String key,
long value)
Put a key/long pair in the JSONObject.
|
JSONObject |
JSONObject.put(java.lang.String key,
java.util.Map<?,?> value)
Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map.
|
JSONObject |
JSONObject.put(java.lang.String key,
java.lang.Object value)
Put a key/value pair in the JSONObject.
|
JSONObject |
JSONObject.putNULL(java.lang.String key)
Put a key/NULL object pair in the JSONObject.
|
JSONObject |
JSONObject.putOnce(java.lang.String key,
java.lang.Object value)
Put a key/value pair in the JSONObject, but only if the key and the value are both non-null, and only if there is not already a member with that
name.
|
JSONObject |
JSONObject.putOpt(java.lang.String key,
java.lang.Object value)
Put a key/value pair in the JSONObject, but only if the key and the value are both non-null.
|
static JSONObject |
CDL.rowToJSONObject(JSONArray names,
JSONTokener x)
Produce a JSONObject from a row of comma delimited text, using a
parallel JSONArray of strings to provides the names of the elements.
|
JSONObject |
JSONObject.substract(java.lang.String key,
java.lang.Number value)
Substract a number to a property.
|
static JSONObject |
FileUtils.toJSONObject(java.io.BufferedReader reader)
Use a reader to load a JSONObject.
|
static JSONObject |
FileUtils.toJSONObject(java.io.File file)
Load a File as a JSONObject.
|
static JSONObject |
FileUtils.toJSONObject(java.io.File file,
JSONOptions options)
Load a File as a JSONObject.
|
static JSONObject |
FileUtils.toJSONObject(java.io.InputStream stream)
Load an InputStream as a JSONObject.
|
static JSONObject |
FileUtils.toJSONObject(java.io.InputStream stream,
JSONOptions options)
Load an InputStream as a JSONObject.
|
JSONObject |
JSONArray.toJSONObject(JSONArray names)
Produce a JSONObject by combining a JSONArray of names with the values of this JSONArray.
|
static JSONObject |
Property.toJSONObject(java.util.Properties properties)
Converts a property file object into a JSONObject.
|
static JSONObject |
XML.toJSONObject(java.io.Reader reader)
Convert a well-formed (but not necessarily valid) XML into a
JSONObject.
|
static JSONObject |
XML.toJSONObject(java.io.Reader reader,
boolean keepStrings)
Convert a well-formed (but not necessarily valid) XML into a
JSONObject.
|
static JSONObject |
Cookie.toJSONObject(java.lang.String string)
Convert a cookie specification string into a JSONObject.
|
static JSONObject |
CookieList.toJSONObject(java.lang.String string)
Convert a cookie list into a JSONObject.
|
static JSONObject |
HTTP.toJSONObject(java.lang.String string)
Convert an HTTP header string into a JSONObject.
|
static JSONObject |
JSONML.toJSONObject(java.lang.String string)
Convert a well-formed (but not necessarily valid) XML string into a
JSONObject using the JsonML transform.
|
static JSONObject |
XML.toJSONObject(java.lang.String string)
Convert a well-formed (but not necessarily valid) XML string into a
JSONObject.
|
static JSONObject |
JSONML.toJSONObject(java.lang.String string,
boolean keepStrings)
Convert a well-formed (but not necessarily valid) XML string into a
JSONObject using the JsonML transform.
|
static JSONObject |
XML.toJSONObject(java.lang.String string,
boolean keepStrings)
Convert a well-formed (but not necessarily valid) XML string into a
JSONObject.
|
static JSONObject |
FileUtils.toJSONObject(java.net.URL url)
Load an URL as a JSONObject.
|
static JSONObject |
FileUtils.toJSONObject(java.net.URL url,
JSONOptions options)
Load an URL as a JSONObject.
|
static JSONObject |
JSONML.toJSONObject(XMLTokener x)
Convert a well-formed (but not necessarily valid) XML string into a
JSONObject using the JsonML transform.
|
static JSONObject |
JSONML.toJSONObject(XMLTokener x,
boolean keepStrings)
Convert a well-formed (but not necessarily valid) XML string into a
JSONObject using the JsonML transform.
|
static JSONObject |
FileUtils.toJSONObjectFromXML(java.io.File file)
Convert an XML File to a JSONObject.
|
static JSONObject |
FileUtils.toJSONObjectFromXML(java.io.File file,
JSONOptions options)
Convert an XML File to a JSONObject.
|
static JSONObject |
FileUtils.toJSONObjectFromXML(java.net.URL url)
Convert an XML URL to a JSONObject.
|
static JSONObject |
FileUtils.toJSONObjectFromXML(java.net.URL url,
JSONOptions options)
Convert an XML URL to a JSONObject.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
JSONObject.getNames(JSONObject jo)
Get an array of field names from a JSONObject.
|
static java.util.Properties |
Property.toProperties(JSONObject jo)
Converts the JSONObject into a property file object.
|
static java.lang.String |
Cookie.toString(JSONObject jo)
Convert a JSONObject into a cookie specification string.
|
static java.lang.String |
CookieList.toString(JSONObject jo)
Convert a JSONObject into a cookie list.
|
static java.lang.String |
HTTP.toString(JSONObject jo)
Convert a JSONObject into an HTTP header.
|
static java.lang.String |
JSONML.toString(JSONObject jo)
Reverse the JSONML transformation, making an XML text from a JSONObject.
|
| Constructor and Description |
|---|
JSONObject(JSONObject jo,
java.lang.String[] names)
Construct a JSONObject from a subset of another JSONObject.
|
Copyright (C) 2017 Wei Song. Copyright (c) 2002 JSON.org. Copyright © 2018, 2019, 2026 Herve Girod. All Rights Reserved. elasticlunr Documentation and source under the MIT licence. JSON Documentation and source under the JSON licence