Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Duplicate data in the result #57

Open
KasemJaffer opened this issue Sep 23, 2019 · 6 comments · May be fixed by #181
Open

Duplicate data in the result #57

KasemJaffer opened this issue Sep 23, 2019 · 6 comments · May be fixed by #181

Comments

@KasemJaffer
Copy link

KasemJaffer commented Sep 23, 2019

I am getting duplicate data result.

Here is my code:

// I only have one document in the database
GeoFlutterfire()
        .collection(
            collectionRef: Firestore.instance.collection('countries'))
        .within(
            center: GeoFirePoint(45.208794, -133.5497394),
            radius: 50000,
            field: "location",
            strictMode: true).listen((snapshots){
int count = snapshots.length; // snapshots has two items of the same document.
});
@marvinsxtr
Copy link

Interestingly, I found the same behavior for any radius value over 1250. Below this number, everything works fine for me.

@Thibault2ss
Copy link

Hey everyone, I had the same issue, I found the bug and fixed it. It was because of an edge case not handled by the lib, which created a duplicate query.

To fix it (until @DarshanGowda0 merges my fix) you can update your pubspec.yaml file to fetch my fixed branch:

geoflutterfire:
    git:
      url: git://github.com/Thibault2ss/GeoFlutterFire
      ref: fix-duplicate-results-on-large-radius

Cheers 👍

@fly-qp
Copy link

fly-qp commented Jun 5, 2021

This issue still exists?! + Fix not compatible with the latest version of Firestore

@lemohammed
Copy link

Stil getting this

@enqvida
Copy link

enqvida commented Jan 15, 2022

Getting the same issue, please fix it its been 2 years :D

@Gatos90
Copy link

Gatos90 commented Nov 3, 2022

Any chance of fixing this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants