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

nearSphere method in QueryBuilder class

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0
    • Affects Version/s: None
    • Component/s: API
    • None

      Hello guys,
      .
      I was wondering if it is possible to add 2 nearSphere() methods in QueryBuilder?

      There are 2 near() methods there now:
      near( double x , double y )
      near( double x , double y , double maxDistance )

      It would be cool to have following 2 methods as well:

      public QueryBuilder nearSphere(double longitude, double latitude)
      {
      addOperand( "$nearSphere" , new Double[]

      { longitude , latitude }

      );
      return this;
      }

      public QueryBuilder nearSphere(double longitude, double latitude, double radius)
      {
      addOperand( "$nearSphere" , new Double[]

      { longitude , latitude, radius}

      );
      return this;
      }

      Thanks in advance,
      Damir

            Assignee:
            bryan.reinero Bryan Reinero
            Reporter:
            dpalinic Damir Palinic
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: