Elasticsearch (ES) is a search server based on Lucene.
Currently it has been widely used in different products to provide near
real-time search capacity. As a Python user focusing on analytics, having ES
integrated with existing Python experience would be mostly helpful &
convenient. Recently, I found the following two official ES client quite
useful:
Preparation
Step 2: install python analytics packages (iPython Notebook,
pip install elasticsearch-py and elasticsearch-dsl), then open the iPython
Notebook (or called Jupyter notebook now)
Step 3: set up the connection between the iPython notebook
with your local server.
from elasticsearch import Elasticsearch
es = Elasticsearch('localhost:9200')
That's it! Now the "es" variable refers to the
elastic search instance you just initiated.
Explore ES Client
Step 1.: install ES on local machine to start the game.
(version: 1.7.5) After download the package, unzip it, and then run
"./bin/elasticsearch", a new ES server will be started. By default,
the url to access is "localhost:9200"
The mostly used one (beside es itself) is the es.indices,
since it includes all operations about the index.
Index Operation
The index operation includes: create, display, and delete.
Those operations are shown below:
nice post. keep blogging. python training in Chennai
ReplyDeleteYour blog is quite helpful to me and i am sure to others too. I appreciate your post, it is usually nice and contains useful information
ReplyDeleteHome elevators UAE
Home elevators Malaysia
Home lifts Melbourne
Home lifts India