Thats not a simple feature to implemented. First, you need a component that
would build the suggestions, since you can't build it for every request.
Then, you need to have that component periodically refresh itself (which is
why I am not a fan of it, it requires a full rebuild of it). The suggest
service (shard level) can be injected with teh IndexShard to get a hold of
an index reader.
Once that service is there (on the shard level), then an API (first,
Java/transport level API) is needed to be exposed, and then build the REST
API on top of it.
On Thu, Nov 3, 2011 at 11:11 PM, Alexander Reelsen <
On Nov 3, 6:35 pm, Shay Banon kim...@gmail.com wrote:
Its kind of hard..., as its such open ended question.
True. Would have asked more exactly if I knew more I guess - I am
going to read some sources over the weekend I guess.
What I would like to do, is to use the lucene fst suggester, and
implement a restcontroller on top of that (for which there is a
wonderful working documentation in the blog). The correct way for this
would possibly to patch the Client interface and to add a
SuggestRequest (does this also mean there is no chance to have it as
an external plugin?). This means also to implement the correct Action
in order to have the same behaviour like for example a SearchRequest.
The quick and dirty way would possibly be to simply get an lucene
indexreader and fire off the suggester on top of that (does not scale,
does not support multiple shards, but works in my case and works until
I understand more of ES :-).
So my question would be: How to get an indexreader in a restcontroller
without implementing the whole layers in order to be fully compatible
About other code samples: I checked github for some plugins (not
rivers), but there do not seem to exist any further modules for
elasticsearch. If anyone knows some, please post.
Thanks and have a nice day!