You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Cheolgoo Kang <ap...@gmail.com> on 2009/02/24 03:15:20 UTC
Why is the constructor of TopFieldDocs not public?
I'm subclassing MultiSearcher and writing a customized searcher on my own.
The search( Weight, Filter, int, Sort ) method on MultiSearcher should
return TopFieldDocs, but I cannot instantiate one cause TopFieldDocs
constructor is declared as package-private. (TopFieldDocs itself is
public!)
Is there any reason the constructor of TopFieldDocs has no modifier declaration?
- Cheolgoo Kang
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Why is the constructor of TopFieldDocs not public?
Posted by Cheolgoo Kang <ap...@gmail.com>.
Here are two package-private issues I've met. But I could find
workarounds on these issues easily.
o.a.l.search.FieldDocSortedHitQueue
o.a.l.search.HitQueue
I think any of package-private methods of those two class should be public.
- Cheolgoo Kang
On Tue, Feb 24, 2009 at 9:05 PM, Michael McCandless
<lu...@mikemccandless.com> wrote:
>
> Good question. Are you hitting any other package-private issues in creating
> your own searcher? (Seems likely you may).
>
> TopDocs, in contrast, has a public ctor.
>
> If there are no objections I'll switch it to public...
>
> Mike
>
> Cheolgoo Kang wrote:
>
>> I'm subclassing MultiSearcher and writing a customized searcher on my own.
>>
>> The search( Weight, Filter, int, Sort ) method on MultiSearcher should
>> return TopFieldDocs, but I cannot instantiate one cause TopFieldDocs
>> constructor is declared as package-private. (TopFieldDocs itself is
>> public!)
>>
>> Is there any reason the constructor of TopFieldDocs has no modifier
>> declaration?
>>
>> - Cheolgoo Kang
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Why is the constructor of TopFieldDocs not public?
Posted by Michael McCandless <lu...@mikemccandless.com>.
Good question. Are you hitting any other package-private issues in
creating your own searcher? (Seems likely you may).
TopDocs, in contrast, has a public ctor.
If there are no objections I'll switch it to public...
Mike
Cheolgoo Kang wrote:
> I'm subclassing MultiSearcher and writing a customized searcher on
> my own.
>
> The search( Weight, Filter, int, Sort ) method on MultiSearcher should
> return TopFieldDocs, but I cannot instantiate one cause TopFieldDocs
> constructor is declared as package-private. (TopFieldDocs itself is
> public!)
>
> Is there any reason the constructor of TopFieldDocs has no modifier
> declaration?
>
> - Cheolgoo Kang
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org