title: How to make 2 fields (random string and a date) as index in mongodb, and what complexity would it be to access an element?
body: <p>The ideal for my project would be to have an index built with 2 fields: <code>some_key</code>+<code>some_date</code>.
  The <code>some_date</code> object should contain only the year, month, day, hour, minute.
  Is it possible to choose the format of the date object? When trying to create an index with a date object an exception is thrown, saying it's waiting for a number (timestamp I guess), and not a date.</p>
  
  <p>So the documents will look like that:
  <code>{_id: ..., _index: some_key, _date_index: some_date, data: some_data}</code></p>
  
  <p>I need the search by <code>some_date</code> or <code>some_key</code> or both to be very fast.
  In this scenario, what would be the search by date complexity?</p>
  
  <p>Is it possible to create such index in Mongo?
  What other databases should I consider?</p>