The Codec itself may not be needed to be specified in META-INF/services, but the DVFormat it uses is. So it's not like you can define a Codec today which does not list anything in 'services', unless your Codec just reuses one of the predefined DVF/PF listed under core/codecs. Is that right?
Perhaps the Codec indeed does not need to be listed under services - I admit if it was the case, I may not have hit this weird situation and reported ... I'm still learning my way through Codecs, so what you say could be the solution and we don't need Lucene45Codecs to own their name. It's confusing that these per-field things are used differently while indexing and reading. At indexing, the Codec decides what to return per-field, at search the Codec is more or less not used, cause the per-field formats are read from FI.attributes and initialized directly. I can try to remove it from the Codecs service and see if anything breaks... Shai On Fri, Aug 30, 2013 at 3:50 PM, Adrien Grand <[email protected]> wrote: > Hi Shai, > > I think the issue is that Facet45Codec shouldn't be declared in > META-INF/services. This codec is exactly the same one as > Lucene45Codec, it only sets different defaults at writing time but > reading segments written with Lucene45 or Facet45 is exactly the same > for Lucene. We could set up different names but I prefer the way it is > today, since it allows for customizing the per-field formats for > postings lists and doc values without the burden of having to declare > a new codec in META-INF/services, it is even possible to use anonymous > classes. > > -- > Adrien > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
