Vert.x module to modify and search a lucene index.
The following JSON structure shows an example configuration.
{
"base_address": "indexer", # the base address of the module
"storage": "filesystem", # can be "memory" or "filesystem"
"max_results": 10, # maximal number of search results
"default_field": "id" # the default field to search in
"fields": { # field type definitions
"id": "numeric", # fields can have the types "numeric", "string" and "text".
"name": "text", # while "numeric" and "string" allows only exact matches,
"email": "string" # "text" will match against sub-strings of it's content.
}
}
The indexer will respond to the following addresses.
<base_address>.add
Example:
{
"id": 1,
"name": "Dummy"
}
Example response:
{ "done": true }
<base_address>.update
Example:
{
"field": "id",
"value": "1",
"document": {
"id": 1,
"name: "Another dummy"
}
}
Example response:
{ "done": true }
<base_address>.remove
Example:
{
"query": "id:1"
}
Example response:
{ "done": true }
<base_address>.search
Example:
{
"query": "Dum*"
}
Example response:
{
"results": [
{ "id": 1, "name": "Dummy" }
]
}
<base_address>.clear
Example:
{ }
Example response:
{ "done": true }