Package com.google.appengine.api.search

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


        }

        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();

        SortOptions sortOptions = SortOptions
View Full Code Here


    index(obj);
  }

  public static void remove(String alias) {
    try {
      Query query = Query.newBuilder().build("alias:\"" + alias + "\"");
      Results<ScoredDocument> docResult = INDEX.search(query);
      if (docResult.getNumberFound() > 0) {
        for (ScoredDocument scoredDocument : docResult) {
          INDEX.delete(scoredDocument.getId());
        }
View Full Code Here

        }

        Index index = getDocumentIndex(userModel);


        Query query = Query.newBuilder()
                .setOptions(QueryOptions
                    .newBuilder()
                    .setLimit(100)
                    .setSortOptions(SortOptions.newBuilder()
                    .addSortExpression(SortExpression.newBuilder()
View Full Code Here

      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) {
          for (ScoredDocument scoredDocument : docResult) {
            obj = TubeSearchEngine
View Full Code Here

        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()
            .setNumberFoundAccuracy(1000)
View Full Code Here

      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()
            .setNumberFoundAccuracy(1000)
View Full Code Here

        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()
            .setNumberFoundAccuracy(1000)
View Full Code Here

        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);
          limit = (Integer) cache.get(limitPrefix);
View Full Code Here

        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);
          limit = (Integer) cache.get(limitPrefix);
View Full Code Here

        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);
          limit = (Integer) cache.get(limitPrefix);
View Full Code Here

TOP

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

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.