UNPKG

cruk-searchkit

Version:

Set of overriden and new searchkit components designed specifically for Cancer Research UK

25 lines (21 loc) 445 B
import * as axios from "axios" /** * CRUKCustomElasticGetter JavascriptClass. */ export default class CRUKCustomElasticGetter { constructor(url) { this.url = url; } autocompleteRequest(value, config = {}) { const payload = { title_suggest : { text : value, completion : { field : 'suggest', size: 5 } } }; return axios.post(this.url, payload, config); } }