You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Mikhail Khludnev <mk...@griddynamics.com> on 2015/12/11 20:47:04 UTC

accessing Lucene package members from Solr

Good day!

While working on SOLR-5743, which nobody wants to comment, I face the
problem.
Collector from Solr codebase should call package visible member:
o.a.l.s.join.ToParentBlockJoinQuery.BlockJoinScorer.swapChildDocs(int[])

I see the following alternatives:
- straightforwardly, make BlockJoinScorer.swapChildDocs(int[]) public;
- trickily add public class, which allows to call swapChildDocs() into
o.a.l.s.join. and call this accessor from Solr.
- meanly put Solr class in Solr codebase into lucene package o.a.l.s.join.

The context is that so far it seems like an experimental feature at 5.5,
and I can imagine that it will be removed in 6.0.Thus, the first option
seems more doubtful to me.

Which one will be healthier for Lucene?

--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mk...@griddynamics.com>

Re: accessing Lucene package members from Solr

Posted by "david.w.smiley@gmail.com" <da...@gmail.com>.
Good day Mikhail.
Without looking at the details, I have no qualms about making a method
public if you need to call it from another package.  Just add
@lucene.internal to the method; perhaps warn in comments that it’s likely
going away in 6.0.
~ David

On Fri, Dec 11, 2015 at 2:47 PM Mikhail Khludnev <mk...@griddynamics.com>
wrote:

> Good day!
>
> While working on SOLR-5743, which nobody wants to comment, I face the
> problem.
> Collector from Solr codebase should call package visible member:
> o.a.l.s.join.ToParentBlockJoinQuery.BlockJoinScorer.swapChildDocs(int[])
>
> I see the following alternatives:
> - straightforwardly, make BlockJoinScorer.swapChildDocs(int[]) public;
> - trickily add public class, which allows to call swapChildDocs() into
> o.a.l.s.join. and call this accessor from Solr.
> - meanly put Solr class in Solr codebase into lucene package o.a.l.s.join.
>
> The context is that so far it seems like an experimental feature at 5.5,
> and I can imagine that it will be removed in 6.0.Thus, the first option
> seems more doubtful to me.
>
> Which one will be healthier for Lucene?
>
> --
> Sincerely yours
>
> Mikhail Khludnev
> Principal Engineer,
> Grid Dynamics
>
> <http://www.griddynamics.com>
> <mk...@griddynamics.com>
>
-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com