Perform a server-side search.
POST {{baseUrl}}/search?next_batch=YWxsCgpOb25lLDM1ODcwOA
Performs a full text search across different categories.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
next_batch | string | The point to return events from. If given, this should be a | |
next_batch result from a previous call to this endpoint. |
Request Body
{"search_categories"=>{"room_events"=>{"keys"=>["content.body"], "search_term"=>"martians and men", "order_by"=>"recent", "groupings"=>{"group_by"=>[{"key"=>"room_id"}]}}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"search_categories":{"room_events":{"groups":{"room_id":{"!qPewotXpIctQySfjSy:localhost":{"order":1,"next_batch":"BdgFsdfHSf-dsFD","results":["$144429830826TWwbB:localhost"]}}},"highlights":["martians","men"],"next_batch":"5FdgFsd234dfgsdfFD","count":1224,"results":[{"rank":0.00424866,"result":{"$ref":"../../event-schemas/examples/m.room.message$m.text.yaml"}}]}}}