From c78bab0c18fb9db18408f1601280997ee8b0779f Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 30 Apr 2012 22:14:02 +0200 Subject: first index and search test --- scripts/search.php | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 scripts/search.php (limited to 'scripts/search.php') diff --git a/scripts/search.php b/scripts/search.php new file mode 100644 index 0000000..b6273b4 --- /dev/null +++ b/scripts/search.php @@ -0,0 +1,61 @@ +setBody( + json_encode( + (object)array( + 'query' => (object)array( + 'bool' => (object)array( + 'should' => array( + (object)array( + 'query_string' => (object)array( + 'query' => 'test' + ), + ), + (object)array( + 'has_child' => (object)array( + 'type' => 'file', + 'query' => (object)array( + 'query_string' => (object)array( + 'query' => 'test' + ) + ) + ) + ) + ) + ), + ) + ) + ) +); +$res = $r->send(); +echo $res->getBody() . "\n"; +?> -- cgit v1.2.3