Monday, December 31, 2012
Increase the number of results in elasticsearch
curl -XGET '172.xx.xxx.xx:9200/document/post/_search?pretty=true' -d '{
"from" : 0, "size" : 30,
"query" : { "query_string" : { "query": "assistance in voting" }},
"highlight" : {
"fields" : {
"text" : {}
}
}
}'
http://www.elasticsearch.org/guide/reference/api/search/from-size.html
Thursday, December 27, 2012
Start, stop Apache server on ubuntu
Task: Start Apache 2 Server
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
Task: Restart Apache 2 Server
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
Task: Stop Apache 2 Server
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop
Monday, December 17, 2012
Highlighting search results with the query term in ElasticSearch
curl -XGET 'http://localhost:9200/document/_search?pretty=true' -d '{
"query" : { "query_string" : { "query": "assistance in voting" }},
"highlight" : {
"fields" : {
"text" : {}
}
}
}'
Subscribe to:
Posts (Atom)