Tag : elastic-index
Tag : elastic-index
Creating indexwatch full The Great Wall film online
It is very easy to create index in elastic search. There are various php api/lib available couple of most used are …
https://github.com/nervetattoo/elasticsearch
https://github.com/ruflin/Elastica
curl -XPUT 'http://localhost:9200/database/user/1' -d ' { "user_login": "appa", "name": "Appasaheb Sawant", "postDate": "2013-03-11", "body": "I am a Sr. Software Engineer." , "email": "appasaheb.sawant@gmail.com" }' //Command Output {"ok":true,"_index":"database","_type":"user","_id":"1","_version":2} curl -XPUT 'http://localhost:9200/database/user/2' -d ' { "user_login": "sarita", "name": "Sarita Sawant", "postDate": "2013-03-25", "body": "I am a Payroll Assistant", "email": "test@gmail.com" }' //Command Output {"ok":true,"_index":"database","_type":"user","_id":"2","_version":1} //Search Index http://127.0.0.1:9200/database/user/1 http://127.0.0.1:9200/database/user/2 http://127.0.0.1:9200/database/user/_search?q=body:software http://127.0.0.1:9200/database/user/_search?q=-body:engineer http://127.0.0.1:9200/database/user/_search?q=user_login:sarita&body:software&pretty=true
Categories: Elasticsearch, Linux, Website Peformance
Elasticsearch is …
It is …..
 Installation
Elasticsearch is based on java, so we need to install JAVA>6
yum install java-1.7.0-openjdk.x86_64
java -version
Download source from
wget https://download.elasticsearch.org/
elasticsearch/elasticsearch/elasticsearch-0.20.5.tar.gz
tar -xvf elasticsearch-0.20.5.tar.gz
cp -r elasticsearch-0.20.5.tar.gz elasticsearch
cd elasticsearch
Add elastic home path in “.bash_profile”
export $ES_HOME=/home/elasticsearch
Start/Run Elasticsearch
cd elasticsearch
bin/elasticsearch -f
Is it started?
You can confirm it by browsing URL like - http://127.0.0.1:9200/, it will shows something like
{
"ok" : true,
"status" : 200,
"name" : "Neville, Kate",
"version" : {
"number" : "0.20.5",
"snapshot_build" : false
},
"tagline" : "You Know, for Search"
}
Categories: Elasticsearch, Linux, Website Peformance