Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8475

Provide guidance on how to filter documents with Int64 fields

    • Type: Icon: Story Story
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.44.6
    • Component/s: None
    • Environment:
      OS: Windows 10, 22H2, OS Build 19045.5011
      Compass version: 1.44.6
      Additional info: Documents inserted with Go Driver 1.17.1
    • Needed
    • Hide

      Include in Compass docs the JS limits around large numbers and how to use them correctly

      Show
      Include in Compass docs the JS limits around large numbers and how to use them correctly
    • Developer Tools

      Problem Statement/Rationale

      I cannot use the Find option in Compass while filtering by `Int64` fields. A simple query like 

      { GuildId: NumberLong(507550989629521900) }

       won't return any data. However, a query like 

      {$expr: {$eq: [{ $toString: "$GuildId" },"507550989629521922"]}}

       does work.

      Steps to Reproduce

      Create a database and a collection, multiple documents with a indexed Int64 field, and try to query using it.

      Expected Results

      Both queries returning the same results.

      Actual Results

      Querying by an Int64 field is always returning zero documents.

      Additional Notes

      None.

        1. 672a23ae4ed815719c424e5b_log.gz
          8 kB
          Luigi Benedetti
        2. screenshot1.png
          71 kB
          Luigi Benedetti
        3. screenshot2.png
          28 kB
          Luigi Benedetti

            Assignee:
            Unassigned Unassigned
            Reporter:
            accs@ljre.cc Luigi Benedetti
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: