ElasticSearch Howto
ElasticSearch Howto
Example:
http://localhost:9200/_ingest/pipeline/<pipelinename>
{
"description" : "Extract attachment information",
"processors" : [
{
"attachment" : {
"field" : "data",
"properties" : [
"title",
"author",
"content",
"date" ,
"keywords" ,
"content_type",
"content_length",
"language"
]
}
},
{ "remove" : { "field": "data" } }
]
}
- The above index includes filename as an mapping to match the physical file. Additional
location uri can also be included. These fields are not part of ES API, user defined.
Searching index:
- Index is again searched via ES REST APIs. The query can be sent with query string(q
parameter or JSON obeject). ES defines separate language for it.
References:
https://www.elastic.co/blog/ingesting-and-exploring-scientific-papers-using-elastic-cloud
https://www.elastic.co/guide/en/elasticsearch/plugins/master/using-ingest-attachment.html
https://gist.github.com/karmi/5594127 - old ver
https://github.com/rahulsinghai/elasticsearch-ingest-attachment-plugin-example - old ver ex
with node,
https://www.elastic.co/guide/en/elasticsearch/client/java-
rest/current/_performing_requests.html java rest 5.0 making req
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/_getting_started.html
https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/java-docs.html - check if
bulk api available for rest api
https://github.com/mauricio/elasticsearch-with-
attachment/blob/master/src/main/java/org/techbot/Sample.java- java sample for base64 conv
and old indexing
http://elasticsearch-cheatsheet.jolicode.com/
http://okfnlabs.org/blog/2013/07/01/elasticsearch-query-tutorial.html