Commit eb48b7b8 authored by Mathias Goebel's avatar Mathias Goebel 🎠
Browse files

adjust search doc

parent b0412647
......@@ -94,11 +94,11 @@ This object is specified according to the [Elasticsearch Query DSL](https://www.
{
"query": {
"simple_query_string": {
"query": "term1 term2 terminat*"
"query": "term termina*"
}
},
"from": 0,
"size": 10,
"size": 10
}
```
......@@ -121,7 +121,7 @@ This object is specified according to the [Elasticsearch Query DSL](https://www.
| Field Name | Cardinality | Type | Description |
|----|----|----|----|
| value | 1 | int | number of total hits |
| relation | 1 | string | `eq` (from Elasticsearch) |
| relation | 1 | string | `eq` (from Elasticsearch), means that there are exactly this number of total hits available |
### Hits Array
This describes a single object from the `hits` array that MUST be present but MAY be empty.
......@@ -131,6 +131,7 @@ This describes a single object from the `hits` array that MUST be present but MA
| item | 1 | URI | path to the item context, w/o base uri |
| label | 1 | string | label of the manifest [see TextAPI](../text-api-specs/#manifest-object) |
| n | 1 | string | page number as in `tei:pb/@n` [see TextAPI](../text-api-specs/#item-object) |
| match | 1 | [ ] | array of matched strings according to the search terms (useful to present matches when using wildcards). Cannot be empty by definition. |
### Sample Response
......@@ -144,13 +145,15 @@ This describes a single object from the `hits` array that MUST be present but MA
"hits" : [ {
"item": "/api/textapi/ahikar/syriac/3r678-186v/latest/item.json",
"label": "Cod. Arab. 236 Copenhagen",
"n": "123v"
"n": "123v",
"match": [ "term", "term", "terminator" ]
}, {
"item": "/api/textapi/ahikar/syriac/3r678-126r/latest/item.json",
"label": "Cod. Arab. 236 Copenhagen",
"n": "126r"
"n": "126r",
"match": [ "terminal" ]
} ]
},
"took": 1
"took": 678
}
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment