Package sensei :: Module sensei_client_lib :: Class SenseiServiceProxy
[hide private]
[frames] | no frames]

Class SenseiServiceProxy

source code

Sensei client class.

Instance Methods [hide private]
 
__init__(self, host='localhost', port=8080, path='sensei', sysinfo=None) source code
 
buildJsonString(self, req, sort_keys=True, indent=None)
Build a Sensei request in JSON format.
source code
 
doQuery(self, req, using_json=True)
Execute a search query.
source code
 
get(self, ids)
Get the source data through a list of document IDs.
source code
 
get_sysinfo(self) source code
 
get_facet_map(self) source code
Static Methods [hide private]
 
buildUrlString(req) source code
Method Details [hide private]

buildJsonString(self, req, sort_keys=True, indent=None)

source code 
Build a Sensei request in JSON format.

Once built, a Sensei request in JSON format can be sent to a Sensei
broker using the following command:

$ curl -XPOST http://localhost:8080/sensei -d '{
  "fetchStored": "true", 
  "from": 0, 
  "size": 10
}'

get(self, ids)

source code 

Get the source data through a list of document IDs. The input is either a list of ID numbers, or ID strings; The output is a jsonarray string;