my question seems to be dumb, because in "habit" we make queries and
try to making them faster by creating indexes, so why it's not the
case with geospatial indexing? is it because they're pair of values?
Hi,
With a normal unindexed query, the query can still be satisfied by scanning the documents. You can add an index later to improve the performance.
A geospatial query uses a 2d index, which encodes geohash codes on top of a MongoDB b-tree index. You need to add the index first in order to have some geospatial context for your queries.
For some further reading on how the geospatial indexes work, see:
Cheers,
Stephen