Examples of withText()


Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

      return true;
    }

    // Create the search expression and the query
    SearchQuery q = new SearchQueryImpl(site);
    q.withText(true, queryString);
    q.withVersion(Resource.LIVE);
    q.withRececyPriority();
    q.withOffset(offset);
    q.withLimit(limit);
    q.withTypes(Page.TYPE);
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

  @Test
  public void testGetWithPath() throws Exception {
    String path = livePage.getURI().getPath();
    SearchQuery q = new SearchQueryImpl(site).withPathPrefix(path);
    assertEquals(2, idx.getByQuery(q).getItems().length);
    q.withText(path);
    assertEquals(1, idx.getByQuery(q).getItems().length);
  }

  /**
   * Test method for
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

   */
  @Test
  public void testGetWithSubject() throws Exception {
    SearchQuery q = new SearchQueryImpl(site).withFulltext(livePage.getSubjects()[0]);
    assertEquals(2, idx.getByQuery(q).getItems().length);
    q.withText(livePage.getSubjects()[0]);
    assertEquals(0, idx.getByQuery(q).getItems().length);
  }

  /**
   * Test method for
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

   */
  @Test
  public void testGetWithCoverage() throws Exception {
    SearchQuery q = new SearchQueryImpl(site).withFulltext(livePage.getCoverage());
    assertEquals(2, idx.getByQuery(q).getItems().length);
    q.withText(livePage.getCoverage());
    assertEquals(0, idx.getByQuery(q).getItems().length);
  }

  /**
   * Test method for
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

  @Test
  public void testGetWithSubjects() throws Exception {
    String subject = "subject";
    SearchQuery q = new SearchQueryImpl(site).withFulltext(subject);
    assertEquals(2, idx.getByQuery(q).getItems().length);
    q.withText(subject);
    assertEquals(0, idx.getByQuery(q).getItems().length);
  }

  /**
   * Test method for
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

   */
  @Test
  public void testGetWithProperty() throws Exception {
    SearchQuery q = new SearchQueryImpl(site).withFulltext(pagelet.getProperty("propertyid"));
    assertEquals(2, idx.getByQuery(q).getItems().length);
    q.withText(pagelet.getProperty("propertyid"));
    assertEquals(0, idx.getByQuery(q).getItems().length);
  }

  /**
   * Helper method to test existence of search text and parts thereof in the
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

    // Partial matches
    for (String part : StringUtils.split(searchText)) {
      q = new SearchQueryImpl(site).withFulltext(true, part);
      assertTrue(idx.getByQuery(q).getItems().length >= expectedInFulltext);
      q.withText(true, part);
      assertTrue(idx.getByQuery(q).getItems().length >= expectedInText);
    }
  }

}
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

        q.withSubject(subjects.nextToken());
    }

    // Search terms
    if (StringUtils.isNotBlank(searchterms))
      q.withText(true, searchterms);

    Calendar today = Calendar.getInstance();
    today.set(Calendar.HOUR_OF_DAY, 0);
    today.set(Calendar.MINUTE, 0);
    today.set(Calendar.SECOND, 0);
View Full Code Here

Examples of ch.entwine.weblounge.common.content.SearchQuery.withText()

        q.withSubject(subjects.nextToken());
    }

    // Search terms
    if (StringUtils.isNotBlank(searchterms))
      q.withText(true, searchterms);

    Calendar today = Calendar.getInstance();
    today.set(Calendar.HOUR_OF_DAY, 0);
    today.set(Calendar.MINUTE, 0);
    today.set(Calendar.SECOND, 0);
View Full Code Here

Examples of ch.entwine.weblounge.common.impl.content.SearchQueryImpl.withText()

      return true;
    }

    // Create the search expression and the query
    SearchQuery q = new SearchQueryImpl(site);
    q.withText(true, queryString);
    q.withVersion(Resource.LIVE);
    q.withRececyPriority();
    q.withOffset(offset);
    q.withLimit(limit);
    q.withTypes(Page.TYPE);
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.