Schema stops working after filter RESET with 0 results

Edit: The problem is clicking on RESET after a schema query that results in a sample with 0 documents. This breaks Schema on my setup.

To replicate the problem:

  • Go to ship.shipwrecks
  • Do a geo search on schema/coordinates that produces 0 results (like somewhere in Russia)
  • Click RESET
  • Refresh Schema or go to the schema tab on another collection

Original post:
Schema is giving 0 documents after clicking reset

What happened:
I was working on Lab 1.7 when I (as a test) selected a geo search on Aruba and it gave me 0 results.
So then I clicked reset (on filter), but it still gave me 0 results.
I did some more tests and with all the datasets (like video.movies for example) it is no longer giving me results, stating:
“Query returned 0 documents. This report is based on a sample of 0 documents (0.00%).”

I returned to Compass after writing this post and it was working again.
I do the cancun query and again get 0 results.
And again with this and other datasets, schema is returning 0 documents (even though clearly the documents are there). Even after restarting and reinstalling the product.

Some additional info on my system: Win10, 60 mbit internet connection, located in the Netherlands. Installed using mongodb-compass-1.17.0-win32-x64.exe (MSI quits when started and doesn’t install anything).

Have you checked the “Filter” textbox in Compass? Sometimes, we write the query and if it returns 0 documents then the Schema will show you the same.

Please share the screenshot of the error you are seeing when using Schema Analysis.

Also, if you keep Compass connection open for a long time, due to network issues, it might be cached. So, you just need to re-connect.

Kanika

Hi Kanika,

Thanks for responding. I’ve tried to replicate the problem. Everything worked fine till I did a filter query that results in a few or no documents with no sample size, for example {bikeid: 22000,‘birth year’: {$gte: 1940,$lt: 1945}} in citybike.trips or do a geo search for a shipwreck in the middle of Russia in ships.shipwrecks. If I then press ‘RESET’ it no longer resets the query results:

After this I can switch to another collection and the ‘Analyze Schema’ button no longer works:

Only after quitting and restarting Compass it works again.

I have the same problem; I clicked on Schema and 0 documents returned.
“Query returned 0 documents. This report is based on a sample of 0 documents (0.00%).”

But I’ve try with another cluster and it works, so I guess the problem is on the class cluster
(cluster0-shard-00-00).

Dear Kanika,

Can you please try this:

  • Go to ship.shipwrecks
  • Do a geo search on schema/coordinates that produces 0 results (like somewhere in Russia)
  • Click RESET
  • Refresh Schema or go to the schema tab on another collection

Does schema then still continue to work for you? For me it stops working any time I go through these steps.

Clicking on RESET is crucial, if I don’t click it and switch to another collection, Schema continues to work just fine.