Package com.google.appengine.api.search

Examples of com.google.appengine.api.search.Index.search()


                    .addSortExpression(SortExpression.newBuilder()
                        .setExpression("published")
                        .setDefaultValueDate(new Date())
                        .setDirection(SortDirection.DESCENDING)))
                    .build()).build(qstr);
        Results<ScoredDocument> results = index.search(query);

        // 対象のアクティビティを取得
        List<ActivityModel> activityList = new ArrayList<ActivityModel>();
        for (ScoredDocument document : results) {
            String activityId = document.getId();
View Full Code Here


  public List<Article> searchArticles(String query) {
    initIndex();
    Index index = getArticleIndex();

    Results<ScoredDocument> indexResult = index.search(query);

    List<Article> articles = new ArrayList<Article>();
    for (ScoredDocument doc : indexResult) {
      Long articleKey = Long.valueOf(doc.getId());
      articles.add(articleDao.get(articleKey));
View Full Code Here

  public List<Blog> searchBlogs(String query) {
    initIndex();
    Index index = getBlogIndex();

    Results<ScoredDocument> indexResult = index.search(query);

    List<Blog> blogs = new ArrayList<Blog>();
    for (ScoredDocument doc : indexResult) {
      Long blogKey = Long.valueOf(doc.getId());
      blogs.add(blogDao.get(blogKey));
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.