Hi
Do you have any examples of how a dls query should be written via the Roles API . I can’t find any documentation with examples. This post states it should be supported Redirecting to Google Groups
If I save down the following example the query is ignored:
{“indices”:{““:{””:[“SEARCH”],“dls”:“‘{"bool":{"filter":[{"type":{"value":"countries"}}]}}’”}}}
This is how it is stored when I query via sg_admin.
dls: “‘{"bool":{"filter":[{"type":{"value":"countries"}}]}}’”
I can also use sg_admin to reload the role so that the start / end quotes and the escaping backslashes are removed. This works:
dls: ‘{“bool” : {“filter”: {“type” : { “value” : “countries”}}}}’
but I can’t save it down like that via the REST API.
How should I proceed ?
Thanks
After wrestling with this for a day I solved it within minutes of posting this question :
The answer was not to use single quotes anywhere when saving the dls field down via the REST API.
It would be good if this were documented somewhere though.
Thanks
···
On Friday, September 1, 2017 at 1:55:00 PM UTC+1, Terry Quigley wrote:
Hi
Do you have any examples of how a dls query should be written via the Roles API . I can’t find any documentation with examples. This post states it should be supported https://groups.google.com/forum/#!topic/search-guard/KLGE1vxdAxQ
If I save down the following example the query is ignored:
{“indices”:{““:{””:[“SEARCH”],“dls”:“‘{"bool":{"filter":[{"type":{"value":"countries"}}]}}’”}}}
This is how it is stored when I query via sg_admin.
dls: “‘{"bool":{"filter":[{"type":{"value":"countries"}}]}}’”
I can also use sg_admin to reload the role so that the start / end quotes and the escaping backslashes are removed. This works:
dls: ‘{“bool” : {“filter”: {“type” : { “value” : “countries”}}}}’
but I can’t save it down like that via the REST API.
How should I proceed ?
Thanks
thx for letting us know. we will update the docs accordingly
···
Am 01.09.2017 um 15:38 schrieb Terry Quigley <topquigley@gmail.com>:
After wrestling with this for a day I solved it within minutes of posting this question :
The answer was not to use single quotes anywhere when saving the _dls_ field down via the REST API.
It would be good if this were documented somewhere though.
Thanks
On Friday, September 1, 2017 at 1:55:00 PM UTC+1, Terry Quigley wrote:
Hi
Do you have any examples of how a _dls_ query should be written via the Roles API . I can't find any documentation with examples. This post states it should be supported Redirecting to Google Groups
If I save down the following example the query is ignored:
{"indices":{"*":{"*":["SEARCH"],"_dls_":"'{\"bool\":{\"filter\":[{\"type\":{\"value\":\"countries\"}}]}}'"}}}
This is how it is stored when I query via sg_admin.
_dls_: "'{\"bool\":{\"filter\":[{\"type\":{\"value\":\"countries\"}}]}}'"
I can also use sg_admin to reload the role so that the start / end quotes and the escaping backslashes are removed. This works:
_dls_: '{"bool" : {"filter": {"type" : { "value" : "countries"}}}}'
but I can't save it down like that via the REST API.
How should I proceed ?
Thanks
--
You received this message because you are subscribed to the Google Groups "Search Guard Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to search-guard+unsubscribe@googlegroups.com.
To post to this group, send email to search-guard@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/f1a374d8-971b-414b-b34b-e5f614c81cd1%40googlegroups.com\.
For more options, visit https://groups.google.com/d/optout\.