> For the complete documentation index, see [llms.txt](https://docs.hotwax.co/documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hotwax.co/documents/integrate-with-hotwax/components/admin/search.md).

# Search

search

## execute SolrQuery

> Execute a Solr query using the JSON Request API and return the raw response.\
> \
> &#x20;           Request body (Solr JSON Request API format):\
> &#x20;           {\
> &#x20;             "query":  "docType:ORDER",\
> &#x20;             "filter": \["orderStatusId:ORDER\_COMPLETED"],\
> &#x20;             "fields": "orderId,orderDate",\
> &#x20;             "params": { "rows": 10, "sort": "orderDate desc", "defType": "edismax" },\
> &#x20;             "collection": "enterpriseSearch"\
> &#x20;           }\
> \
> &#x20;           query      — Solr query string, required\
> &#x20;           filter     — fq filter(s), String or List of Strings\
> &#x20;           fields     — comma-separated fl field list\
> &#x20;           params     — extra URL parameters (rows, start, sort, defType, etc.)\
> &#x20;           collection — collection to query (default: solr.default.collection)

```json
{"openapi":"3.1.1","info":{"title":"Commerce Admin REST API","version":"4.0.0"},"tags":[{"name":"search","description":"search"}],"servers":[{"url":"https://dev-maarg.hotwax.io/rest/s1/admin"}],"security":[{"basicAuth":[]},{"api_key":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"},"api_key":{"type":"apiKey","name":"api_key","in":"header","description":"HTTP Header api_key"}},"schemas":{"co.hotwax.solr.SolrServices.executeSolrQuery.Out":{"type":"object","properties":{"response":{"type":"object","description":"Raw Solr JSON response — contains response.docs, response.numFound, etc."}}},"co.hotwax.solr.SolrServices.executeSolrQuery.In":{"type":"object","properties":{"query":{"type":"string","description":"Solr query string, e.g. \"docType:ORDER AND orderStatusId:ORDER_APPROVED\""},"filter":{"type":"array","description":"One or more filter queries (fq). String or List of Strings."},"facet":{"type":"object","description":"One or more facets."},"fields":{"type":"string","description":"Comma-separated field list (fl), e.g. \"orderId,orderDate,status\"."},"params":{"type":"object","description":"Extra Solr URL parameters: rows, start, sort, defType, etc."},"collection":{"type":"string","description":"Collection to query. Defaults to solr.default.collection."}},"required":["query"]}}},"paths":{"/search/query":{"post":{"tags":["search"],"summary":"execute SolrQuery","description":"Execute a Solr query using the JSON Request API and return the raw response.\n\n            Request body (Solr JSON Request API format):\n            {\n              \"query\":  \"docType:ORDER\",\n              \"filter\": [\"orderStatusId:ORDER_COMPLETED\"],\n              \"fields\": \"orderId,orderDate\",\n              \"params\": { \"rows\": 10, \"sort\": \"orderDate desc\", \"defType\": \"edismax\" },\n              \"collection\": \"enterpriseSearch\"\n            }\n\n            query      — Solr query string, required\n            filter     — fq filter(s), String or List of Strings\n            fields     — comma-separated fl field list\n            params     — extra URL parameters (rows, start, sort, defType, etc.)\n            collection — collection to query (default: solr.default.collection)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/co.hotwax.solr.SolrServices.executeSolrQuery.Out"}}}},"401":{"description":"Authentication required"},"403":{"description":"Access Forbidden (no authz)"},"429":{"description":"Too Many Requests (tarpit)"},"500":{"description":"General Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/co.hotwax.solr.SolrServices.executeSolrQuery.In"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/co.hotwax.solr.SolrServices.executeSolrQuery.In"}}},"required":true}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hotwax.co/documents/integrate-with-hotwax/components/admin/search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
