-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>enhancementTeam:SearchMeta label for search teamMeta label for search team
Description
To allow client applications to page through many autocomplete suggestions we should offer a search_after parameter. Calling applications would pass the last term value from the previous set of results and the returned results would be all those matching the provided prefix string param but after the supplied search_after parameter. An example might be:
Request 1
localhost:9200/myindex/_terms_enum
{
"field" : "url",
"string" : "www."
}}
Result 1
{
"terms": [
"www.aa.com",
"www.abc.com",
...
"www.bbc.com"
]
Request 2 (with new search_after param)
localhost:9200/myindex/_terms_enum
{
"field" : "url",
"string" : "www.",
"search_after" : "www.bbc.com"
}}
Result 2
{
"terms": [
"www.breitling.com",
"www.bt.com",
...
"www.cnn.com"
]
It would be a client error to pass a search_after string that does not start with the provided string prefix.
Example invalid request that would produce an error
"search_after": "www.bbc.com",
"string": "some_other_prefix"
Related to #71550
Metadata
Metadata
Assignees
Labels
:Search/SearchSearch-related issues that do not fall into other categoriesSearch-related issues that do not fall into other categories>enhancementTeam:SearchMeta label for search teamMeta label for search team