Curl -xget works, but fail when use RESTful client in java

2014-08-01 Thread Chia-Eng Chang
I tried to send http/get to my elasticsearch server.if I query: curl 'http://localhost:9200/index/_search?scroll=1msize=50pretty' -d '{query : {match_all : {}}}' it works perfect. But when I tried to use jersy to build my client, I did the follwoing: public class

Re: Curl -xget works, but fail when use RESTful client in java

2014-08-01 Thread Chia-Eng Chang
, Chia-Eng Chang wrote: Updated. I figured out that I need to do url-encode to process some characters like { , } , ... so I change part my code to: String string1=-d {\query\ : {\match_all\ : {}}}; WebResource webResource = client .resource(http://localhost:9200/obd2/_search?scroll=1msize

Re: Remote access through SSH

2014-07-31 Thread Chia-Eng Chang
javascript: web: www.campaignmonitor.com On 31 July 2014 10:35, Chia-Eng Chang chia...@uci.edu javascript: wrote: Thank you for the links. Yeah, I am new to ES. (and http rest) What I understand is that if I want to get the index documents on my SSH server, I can SSH log in the server

Remote access through SSH

2014-07-30 Thread Chia-Eng Chang
About the HTTP API, I wonder if I want to remote access a cluster on SSH server, what should I include in my http rest command: example as mapping: curl -XGET ' http://localhost:9200/ index /_mapping/ type ' I tried something like below but got failed: curl -XGET -u user_name:

Re: Remote access through SSH

2014-07-30 Thread Chia-Eng Chang
On 31 July 2014 09:35, Chia-Eng Chang chia...@uci.edu javascript: wrote: Thanks @Mark I have a public key on server and I know how to SSH to server then get the index from localhost:9200. But what I want to do is remotely obtain the index on the SSH server (which I know its public IP

Use java Api to set a document's field as _id

2014-07-25 Thread Chia-Eng Chang
I want to ask if the unique field _id be assigned by certain field within document. I see with Rest, it can achieve by path: { tweet : { _id : { path : post_id } } } But if I want to do it with java API, is there any way to achieve