s = Search(hosts='localhost:9200')
s = s.suggest('my_sugestion', keyword, completion={ 'field' : 'test' })
# s = s.extra(size=10) or s = s.params(size=10) **dosen`t work**
results = response.suggest.my_suggestion
Let me know how to do it.
Thanks.
The easiest way is to use python's slicing primitives:
s = s[0:100]
s = Search(hosts='localhost:9200')
s = s.suggest('my_sugestion', keyword, completion={ 'field' : 'test', 'size':100})
results = response.suggest.my_suggestion
Thanks
Most helpful comment
s = Search(hosts='localhost:9200')
s = s.suggest('my_sugestion', keyword, completion={ 'field' : 'test', 'size':100})
results = response.suggest.my_suggestion
Thanks