Additional parameters (not related to query) with Java API


(Rafał Kuć) #1

Hello!

I have a question - is it possible to add parameters using ES
Java API such that they won't be causing queries to be failing
because of parsing ? For example, using HTTP REST api call I can do
the following:

curl 'localhost:9200/test/_search?pretty=true&myParam=12345' -d 'QUERY_BODY'

And even though ES doesn't know anything about 'myParam' it won't
complain.

Is this possible to do with Java API ?

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

--


(Rafał Kuć) #2

Hello,

Would it be useful for anyone (except me) if I would provide a patch with
modification that allows to pass additional parameters along with the
requests ? For example one could send the following:

{
"from" : 0,
"size" : 60,
"query" : {
"term" : {
"name" : "value"
}
},
"additional" : {
"token" : "56789",
"userId" : "12345"
}
}

Regards
Rafał

W dniu piątek, 14 września 2012 22:50:47 UTC+2 użytkownik Rafał Kuć napisał:

Hello!

I have a question - is it possible to add parameters using ES
Java API such that they won't be causing queries to be failing
because of parsing ? For example, using HTTP REST api call I can do
the following:

curl 'localhost:9200/test/_search?pretty=true&myParam=12345' -d
'QUERY_BODY'

And even though ES doesn't know anything about 'myParam' it won't
complain.

Is this possible to do with Java API ?

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
ElasticSearch

--


(system) #3