Examples of prepareSearch()


Examples of org.sonar.server.search.SearchClient.prepareSearch()

  public void with_profiling_basic() {
    Profiling profiling = new Profiling(new Settings().setProperty(Profiling.CONFIG_PROFILING_LEVEL, Profiling.Level.BASIC.name()));
    SearchClient searchClient = new SearchClient(new Settings(), profiling);

    try {
      searchClient.prepareSearch(IndexDefinition.RULE.getIndexName()).get();

      // expected to fail because elasticsearch is not correctly configured, but that does not matter
      fail();
    } catch (Exception e) {
      assertThat(e).isInstanceOf(IllegalStateException.class);
View Full Code Here

Examples of org.sonar.server.search.SearchClient.prepareSearch()

  @Test
  public void with_profiling_basic() {
    try {
      Profiling profiling = new Profiling(new Settings().setProperty(Profiling.CONFIG_PROFILING_LEVEL, Profiling.Level.BASIC.name()));
      SearchClient searchClient = new SearchClient(new Settings(), profiling);
      SearchResponse search = searchClient.prepareSearch(IndexDefinition.RULE.getIndexName())
        .setSearchType(SearchType.SCAN)
        .setScroll(TimeValue.timeValueSeconds(3L))
        .get();
      searchClient.prepareSearchScroll(search.getScrollId()).get();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.