Uploaded image for project: 'Spring Data for Apache Solr'
  1. Spring Data for Apache Solr
  2. DATASOLR-130

geodist() cannot be used in projection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.0 GA, 1.1 M1 (Codd)
    • Fix Version/s: 1.1 RC1 (Codd)
    • Component/s: Core
    • Labels:
      None

      Description

      following code throws UncategorizedSolrExecption while parsing filed geodist() having not enought parameters.

      ProductBean locatedInBuffalow = createProductBean("100", 5, true);
      locatedInBuffalow.setLocation("45.17614,-93.87341");
      
      ProductBean locatedInNYC = createProductBean("200", 5, true);
      locatedInNYC.setLocation("40.7143,-74.006");
      
      repo.save(Arrays.asList(locatedInBuffalow, locatedInNYC));
      
      Criteria criteria = new Criteria("popularity").is(5).and("store").within(new GeoLocation(45.15, -93.85), new Distance(5));
      SimpleQuery query = new SimpleQuery(criteria);
      query.addProjectionOnField("*");
      query.addProjectionOnField("score");
      query.addProjectionOnField("distance:geodist()");
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cstrobl Christoph Strobl
              Reporter:
              cstrobl Christoph Strobl
              Last updater:
              Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: