Closed dzhlobo closed 11 years ago
Hey, sorry for getting back that late...
In theory it is not, in practice I refrained from this, because it means I have to wait for requests to return inside of elasticsearch, where I think it might make sense to wait this on the client side.
Anything wrong with my assumption?
I'm not well with internals of plugin. If it will take 2x time for suggestions for 2 fields I agree with you that it's not very good idea.
One reason I see one request for multiple fields can be a little bit faster than multiple requests is reducing time on http handshake (and probably equal initializing of the same objects). But it also adds some questions:
size
parameter should work?Sorry, I was not clear here.
The main reason I do not want to put this into the main action, is that I need to wait in the REST action (or somewhere else in the code), until both requests have returned. As this requires for my code to be blocking somewhere, I would rather like to source this out to the requester.
Regarding your first question about the order: The order is always alphabetic, so it is pretty easy to sort this on the client side yourself.
About the size parameter: After sorting alphabetically reducing two requests into one is not a big deal then...
Does it make sense?
Yes, I agree with you.
I think I can close this issue.
Hi.
Is there any difficulties to add ability to suggest not only for one specific field?
For example it would be great to make queries like this: