I am still fighting (after a month of doing other things) with the first
part of the problem. Any ideas?

Many thanks,
Rok

On Mon, Apr 4, 2011 at 9:06 AM, Rok Rejc <rokrej...@gmail.com> wrote:

> Hi all,
>
> I am trying to create a distributed search component in solr which is quite
> difficult (at least for me, because I am new in solr and java). Anyway I
> have looked into solr source (FacetComponent, TermsComponent...) and created
> my own search component (it extends SearchComponent) but I still have two
> questions (for now):
>
> 1.) In the prepare method I have the following code:
>
>         String shards = params.get(ShardParams.SHARDS);
>         if (shards != null) {
>             List<String> lst = StrUtils.splitSmart(shards, ",", true);
>             rb.shards = lst.toArray(new String[lst.size()]);
>             rb.isDistrib = true;
>         }
>
> If I remove "rb.isDistrib = true;" line the distributed methods are not
> called. But to set the isDistrib my code must be in the
> "org.apache.solr.handler.component" package (because it is not visible from
> the outside). Is this  correct procedure/behaviour/design?
>
> 2.) Functions (process, distributedProcess, handleResponses...) are all
> called properly. I can read partial responses in the handleResponses but I
> don't know how to build "final" response. I see that for example
> TermsComponent has a helper in the ResponseBuilder which collects all the
> terms. Is this the only way (to edit the ResponseBuilder source), or can I
> achive that without editing the solr's source?
>
> Many thanks,
>
> Rok
>

Reply via email to