Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

direct push to elastic search #12

Open
RobTranquillo opened this issue Oct 15, 2015 · 0 comments
Open

direct push to elastic search #12

RobTranquillo opened this issue Oct 15, 2015 · 0 comments

Comments

@RobTranquillo
Copy link
Contributor

A extra start option should be available. By changing an new file, named es-config.ini.
available options:

  • use ES push : on|off
  • host : localhost
  • port : 9200
  • index : ratsinfo //comparable to a sql db
  • doctype : sitzungen //comparable to a sql table

Function diagram:

  1. get last known index_id from ES to append
  2. after scraping changes sessions/files overwrite metadata.json in ES
  3. after scraping new sessions/files insert metadata.json in ES

talk to elastic search:
http/curl request:

CURLOPT_URL : http://$es_host:$es_port/$es_index/$doc_type/$index_id
CURLOPT_PORT : $es_port
CURLOPT_TIMEOUT : 200
CURLOPT_RETURNTRANSFER : 1
CURLOPT_FORBID_REUSE : 0
CURLOPT_CUSTOMREQUEST : PUT | POST //index-id known = PUT, index-id unknown = POST
CURLOPT_POSTFIELDS : string{metadata.json}

A good response:

{"_index":"ratsinfo","_type":"sessions","_id":"1595","_version":1,"created":true}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant