Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1852

how apply pagination and sorting functionality issue collection.distinct()

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • unix- eclipse- java

    Description

      sample code:
      String where="

      {'photo_id':"+photoId+",'flag':true,'type':\""+type+"\"}

      ";
      DBObject whereCond = (DBObject) JSON.parse(where);
      DBCollection collection = mongoTemplate.getCollection("photo_user_action_log");
      List<Integer> userList=collection.distinct("user_id", whereCond);
      =========================================================
      like this i want :
      //cursor.skip(startIndex);
      //cursor.limit(recordPerPage);
      //cursor.sort(new BasicDBObject("created.date", 1));

      Attachments

        Activity

          People

            Unassigned Unassigned
            basker basker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: