Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-1266

Incorrect example for Coordinates in Spatial document

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects versions: 4.2.0.Final
    • Fix versions: None
    • Components: spatial
    • Labels:
    • Environment:
      JBoss 7.1.1.Final.
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Suitable for new contributors:
      Yes, likely

      Description

      In the spatial documentation on http://docs.jboss.org/hibernate/search/4.2/reference/en-US/html/spatial.html under section 9.1.2. "Indexing coordinates in a Grid with Quad Trees", it says "add the @Latitude and @Longitude annotations on the properties representing your coordinates; "

      However, to make it work I had to use "9.1.3. Implementing the Coordinates interface", because I have to use @Latitude(of="location") as well. I ended up mixing 9.1.2 and 9.1.3.

      Here is my code:

         public Double getLat() {
            return lat;
         }
          
         public void setLat(Double lat) {
            this.lat = lat;
         }
         
         @Override
         public Double getLatitude() {
            return lat;
         }
      
         @Override
         public Double getLongitude() {
            return lon;
         }
      

      I wonder is this a feature or a bug in the document that it doesn't describe the implementation correctly, or it is something that I've completely misunderstood?

      Attached is my sample project again. Thank you for anyone whom look into this issue.

      Thanks a lot
      Sam

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              samsam9988 samw
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: