Skip to content

Redis OM Find Non-Null #232

@j0hnw0rk3r

Description

@j0hnw0rk3r

Hi, can anyone help please? I'm try to integrate geospatial search together with filtering object keys containing null values and I only need to find all records that are 'verified'. Can someone point me into the right direction? The following code I have written seems to throw an error:

async searchNearby(longitude: number, latitude: number, radius: number = 10) {
        try {
            // Perform geospatial search
            const results = await branchesRepository.search()
                .where("verified_at").not.eq(null)
                .and('location')
                .inRadius(
                    circle => circle
                        .longitude(longitude)
                        .latitude(latitude)
                        .radius(radius)
                        .kilometers
                )
                .return.all()
            return results;
        } catch (e) {
            console.log(e);
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions