lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rok Rejc <rokrej...@gmail.com>
Subject Distributed search component.
Date Mon, 04 Apr 2011 07:06:02 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message