lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <markus.jel...@openindex.io>
Subject Trouble making tests with BaseDistributedSearchTestCase
Date Fri, 04 Sep 2015 09:28:45 GMT
Hello - i am trying to create some tests using BaseDistributedSearchTestCase but two errors
usually appear. Consider the following test:

  @Test
  @ShardsFixed(num = 3)
  public void test() throws Exception {
    del("*:*");

    index(id, "1", "lang", "en", "text", "this is some text");
    index(id, "2", "lang", "en", "text", "this is some other text");
    index(id, "3", "lang", "en", "text", "more text");
    index(id, "4", "lang", "en", "text", "just some text");
    commit();
                                                                                         

    QueryResponse rsp;
    rsp = query("indent", "true", "q", "*:*");
    assertFieldValues(rsp.getResults(), id, 1, 2, 3, 4); 
  }
}

Executing the above text either results in a: IOException occured when talking to server at:
https://127.0.0.1:44761//collection1
Or it fails with a curous error: .response.maxScore:1.0!=null

The score correctly changes according to whatever value i set for parameter q.

I have checked other tests that extend BaseDistributedSearchTestCase but many are just as
plain simple as the test above. Any idea as to what i am missing?

Many thanks!
Markus

Mime
View raw message