Examples of QueryOptions


Examples of com.google.appengine.api.search.QueryOptions

        limit = (Integer) cache.get(limitPrefix);
      } else {
        listResult = new ArrayList<Tube>();
        StringBuilder queryString = new StringBuilder();
        queryString.append("tags:" + tag + " OR title:" + tag);
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        if (cache != null && cache.containsKey(totalResultPrefix)
            && cache.containsKey(limitPrefix)) {
          totalResult = (Integer) cache.get(totalResultPrefix);
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("playlistId:" + playlistId);
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        SortOptions sortOptions = SortOptions
            .newBuilder()
            .addSortExpression(
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("channelId:" + channelId);
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        SortOptions sortOptions = SortOptions
            .newBuilder()
            .addSortExpression(
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      String playlistKeyPoolPrefix = cachePrefix + "playlistIdPool_"
          + obj.getPlaylistId();
      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
      } else {
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        // get pool id by playlist
        List<String> keyPool = new ArrayList<String>();
        if (cache != null && cache.containsKey(playlistKeyPoolPrefix)) {
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      String prefix = cacheSide + cachePrefix + "mostview_" + limit;
      mapCacheKey.put(prefix, prefix);
      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
      } else {
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        SortOptions sortOptions = SortOptions
            .newBuilder()
            .addSortExpression(
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("title:" + keyword + " OR description:"
            + keyword);
        listResult = new ArrayList<Tube>();
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;
        if (cache != null && cache.containsKey(totalResultPrefix)
            && cache.containsKey(limitPrefix)) {
          totalResult = (Integer) cache.get(totalResultPrefix);
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

      String prefix = cachePrefix + "id_" + id;
      Tube obj = new Tube();
      if (cache != null && cache.containsKey(prefix)) {
        obj = (Tube) cache.get(prefix);
      } else {
        QueryOptions options = QueryOptions.newBuilder().setLimit(1)
            .build();
        Query query = Query.newBuilder().setOptions(options)
            .build("id:\"" + id + "\"");
        Results<ScoredDocument> docResult = INDEX.search(query);
        if (docResult.getNumberFound() > 0) {
View Full Code Here

Examples of com.google.appengine.api.search.QueryOptions

        } else {
          queryString.append(" AND channelId:" + channelId);
        }
      }
      listResult = new ArrayList<Tube>();
      QueryOptions options = QueryOptions.newBuilder()
          .setNumberFoundAccuracy(1000).build();
      Query query = Query.newBuilder().setOptions(options)
          .build(queryString.toString());
      Results<ScoredDocument> docResult = INDEX.search(query);
      totalResult = (int) docResult.getNumberFound();
View Full Code Here

Examples of com.google.visualization.datasource.query.QueryOptions

  public void testOptions() throws Exception {
    Query query = QueryBuilder.getInstance().parseQuery(
        "  OpTiOnS   nO_ValUes   ");

    QueryOptions options = query.getOptions();
    assertTrue(options.isNoValues());
    assertFalse(options.isNoFormat());
  }
View Full Code Here

Examples of com.google.visualization.datasource.query.QueryOptions

    labels.addLabel(new SimpleColumn("A"), "bar");
    q.setLabels(labels);
    QueryFormat format = new QueryFormat();
    format.addPattern(new SimpleColumn("A"), "foo");
    q.setUserFormatOptions(format);
    QueryOptions options = new QueryOptions();
    options.setNoFormat(true);
    q.setOptions(options);
    QueryGroup group = new QueryGroup();
    group.addColumn(new SimpleColumn("A"));
    q.setGroup(group);
    QueryPivot pivot = new QueryPivot();
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.