On 2 November 2016 at 12:59, Guillaume Smet <guillaume.smet(a)gmail.com>
wrote:
The other important point (mentioned in the issue but I think
it's
important to outline it here) concerning the analyzers is that they are now
defined per index: there are no global analyzers, you have to define them
for every index using the analyzer. It is totally different from our
current approach and make defining them manually (and maintaining them)
even more cumbersome. Thus I don't think we can consider defining them
manually as an option.
Yes, and that's the reason our automatic mapping generation is broken.
Since the scope of analyzers is now the index, posting analyzer definitions
should take place after index creation. But it should also happen before
mappings are put in the index (since they reference analyzers). In
practice, that means we must have users create indexes themselves (which
can't be done in bulk, which is cumbersome) and post analyzer definitions
themselves (which can be done in bulk and is relatively easy).
On 2 November 2016 at 12:59, Guillaume Smet <guillaume.smet(a)gmail.com>
wrote:
If we want to support Es 5, we need to provide a way to define these
analyzers in HS and make HS post them to Es.
Agreed: once we automate posting analyzer definitions to Elasticsearch from
HS, the actual API used to create indexes or post analyzers and its
"cumbersomeness" become irrelevant.
Our options are:
- Using the existing annotations and try as best we can to translate
Lucene analyzers to their name and parameters in ES: it won't help when
using non-Lucene analyzers, and it feels like something we can't maintain
forever.
- Introducing a new analyzer definition API: is it the right time, with
HS 6.0 looming over the horizon?
- Using the simple JSON file solution I proposed. Ok, maybe
*simplistic* rather
than *simple*, but it'd be easy to implement and probably wouldn't
require much maintenance work if we decide to keep it in 6.0.
Yoann Rodière <yoann(a)hibernate.org>
Hibernate NoORM Team