Package com.google.appengine.api.search

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


        if (keyword != null && !keyword.isEmpty()) {
          queryString.append(keyword);
        }

        listResult = new ArrayList<News>();
        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


      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

      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;

        options = QueryOptions
            .newBuilder()
View Full Code Here

      String prefix = cacheSide + cachePrefix + "recentView_";
      mapCacheKey.put(prefix, prefix);
      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
      } else {
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;

        options = QueryOptions
            .newBuilder()
View Full Code Here

      if (cache != null && cache.containsKey(prefix)) {
        listResult = (ArrayList<Tube>) cache.get(prefix);
        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        QueryOptions options;
        Query query;
        Results<ScoredDocument> docResult;

        options = QueryOptions
            .newBuilder()
View Full Code Here

        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("playlistId:" + playlistId);
        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

        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("channelId:" + channelId);
        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

        totalResult = (Integer) cache.get(totalResultPrefix);
        limit = (Integer) cache.get(limitPrefix);
      } else {
        StringBuilder queryString = new StringBuilder();
        queryString.append("authorUrl=\"" + authorId + "\"");
        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

        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

      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

TOP

Related Classes of com.google.appengine.api.search.QueryOptions

Copyright © 2018 www.massapicom. 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.