Skip to content

unable to find index for $geoNear query #1913

Description

@st0ffern

Issue Description

I have 2 classes: Cars and CarShops ( CarShops has a GeoPoint "location" )
I want to query the database for nearest cars.
When i execute the query i get this error:
planner returned error: unable to find index for $geoNear query

Steps to reproduce

var userGeo = new Parse.GeoPoint({longitude:longitude, latitude:latitude});

var locationQuery = new Parse.Query("CarShops");
locationQuery.near("location", userGeo);
var query = new Parse.Query("Cars");
query.include("carshop");
query.matchesQuery("carshop", locationQuery);
query.find()
.then( res => {
    response = res;
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions