- App Search Guide: other versions:
- Installation
- Getting started
- Authentication
- Limits
- Security & Users
- Guides
- Analytics Tags
- Crawl web content
- Curations
- Facets
- Hierarchical Facets
- Indexing Documents
- Language Optimization
- Log settings
- Meta Engines
- Precision tuning (beta)
- Query Suggestions
- Reference UI
- Relevance Tuning
- Result Settings
- Result Suggestions
- Role Based Access Control
- Sanitization, Raw or Snippet
- Search
- Synonyms
- View web crawler events logs
- Web crawler (beta)
- Web crawler (beta) FAQ
- Web crawler (beta) reference
- Web crawler (beta) events logs reference
- API Reference
- Analytics APIs
- Analytics clicks API
- Analytics counts API
- Analytics queries API
- API logs API
- Click API
- Credentials API
- Curations API
- Documents API
- Engines API
- Log settings API
- Multi search API
- Query suggestion API
- Schema API
- Search API
- Search API boosts
- Search API facets
- Search API filters
- Search API group
- Search API precision (beta)
- Search API result fields
- Search API search fields
- Search API sort
- Search API analytics tags
- Search settings API
- Source engines API
- Synonyms API
- Web crawler (beta) API reference
- API Clients
- Configuration
- Troubleshooting
IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Multi search API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Multi search API
editSubmit multiple searches and receive multiple sets of results with metadata.
GET /api/as/v1/engines/<engine_name>/multi_search
POST /api/as/v1/engines/<engine_name>/multi_search
Request body
edit-
queries
(required) -
Array of objects, where each object represents a search API request body.
The length of the array must be less than or equal to
10
.Within a single request, you are submitting multiple searches. The analytics APIs therefore count each search within the request as a separate query.
Response body
editArray of objects, where each object represents a search API response body.
Examples
editRequest:
curl -X POST 'http://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/multi_search' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer search-soaewu2ye6uc45dr8mcd54v8' \ -d '{ "queries": [ {"query": "california"}, {"query": "florida"} ] }'
Response:
[ # First query result { "meta": { "alerts": [], "warnings": [], "page": { "current": 1, "size": 10, "total_pages": 1, "total_results": 4 } }, "results": [ { "nps_link": { "raw": "https://www.nps.gov/yose/index.htm" }, "id": { "raw": "park_yosemite" }, "visitors": { "raw": 5028868 }, "title": { "raw": "Yosemite" }, "date_established": { "raw": "1890-10-01T05:00:00+00:00" }, "world_heritage_site": { "raw": "true" }, "_meta": { "score": 7543316 }, "description": { "raw": "Yosemite features sheer granite cliffs, exceptionally tall waterfalls, and old-growth forests at a unique intersection of geology and hydrology. Half Dome and El Capitan rise from the park's centerpiece, the glacier-carved Yosemite Valley, and from its vertical walls drop Yosemite Falls, one of North America's tallest waterfalls at 2,425 feet (739 m) high. Three giant sequoia groves, along with a pristine wilderness in the heart of the Sierra Nevada, are home to a wide variety of rare plant and animal species." }, "states": { "raw": [ "California" ] }, "acres": { "raw": 761747.5 }, "location": { "raw": "37.83,-119.5" }, "square_km": { "raw": 3082.7 } }, # ... More documents (truncated) ] }, # ... Second query result (truncated) ]
On this page
Was this helpful?
Thank you for your feedback.