distributed facet support

15 views
Skip to first unread message

Yonik Seeley

unread,
Nov 10, 2014, 12:54:45 PM11/10/14
to helio...@googlegroups.com
OK, I just pushed distributed support for the new JSON Facet API
http://heliosearch.org/json-facet-api/

=== For Helio developers ===
The distributed and non-distributed tests are now one and the same
(TestJsonFacets ) thanks to some new test classes. See
SolrTestCaseHS, in particular the SolrInstances class...

// this starts up 3 helio/solr jetty instances
SolrInstances servers = new SolrInstances(3,
"solrconfig-tlog.xml","schema_latest.xml");

// The "Client" class is either backed by a number of running jetties,
or the embedded
// local core (use Client.local singleton to talk to the embedded core).
Client = servers.getClient(0);

client.add(sdoc("id", "3"), null); // document adds are partitioned
based on a hash
client.commit(); // this will call commit on all servers
client.testJQ(params("q", "*:*"), "/response/numFound==3") // will
send request to a random server

servers.stop();

So in the future, consider going through a "Client" for your tests and
then it will be easy to adapt the tests for distributed mode.

-Yonik
Reply all
Reply to author
Forward
0 new messages