First of all, you should be using GET requests and not POST. Not sure
if POST works (I do not use REST), but it is best to stick with GET.
Most importantly, you are missing the actual endpoint for a service.
The URL you are using has graylog2 as the index and m_search as the
type. After that, you need to specify a service endpoint such as
_search.
On Monday, June 11, 2012 5:27:45 PM UTC-5, Ivan Brusic wrote:
First of all, you should be using GET requests and not POST. Not sure
if POST works (I do not use REST), but it is best to stick with GET.
Most importantly, you are missing the actual endpoint for a service.
The URL you are using has graylog2 as the index and m_search as the
type. After that, you need to specify a service endpoint such as
_search.
The m_search was actually a typo, but I've corrected that.
I think you need to wrap the data part in a "query": { ... } block.
The examples on the web are a bit tricky that way -- getting the whole
syntax to a working state is sometimes not trivial. And it gets even
crazier with more advanced syntax, like custom_score
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.