Kaholo plugin for elasticsearch
Method – Insert document
Stores a JSON document(object) in an index, making it searchable using elasticsearch.
Parameters
- Index(required) – The index to store the document in.
- Type – Document Type. If not provided then default is ‘_doc’.
- ID – The ID in the index to store the document in. If not provided elastic search will generate one.
- Body – The body of the document to store in the index. Has to be passed from code as an object.
Method – Search by Query String
Searches and returns documents matching a query.
Parameters
- Index – The index to search in.
- Type – The document Type to search for.
- Query – The query to use to search in elasticsearch. Needs to be provided as a string.
Method – Search by Body
Searches and returns documents matching a query.
Parameters
- Index – The index to search in.
- Type – The document Type to search for.
- Body – The Body Query to use to search in elasticsearch. Needs to be provided as an object from code.
Notice: the object inside the body will be placed inside the JSON in the following format: { “body”: { “query”: { Body Search Object } } }