title: hash indexes - any workaround for searching large values
body: <p>I'm new to mongo, and I have a bit of a unique scenario.</p>
  
  <p>Lets say we have a collection the documents with something like:</p>
  
  <pre><code>{date: ISODate(), text: "this is a large character field with over 1024 bytes"}
  </code></pre>
  
  <p>Lets imagine that we have 1 billion documents with 100,000 unique text values. It would be nice to normalize this data, but since mongo isn't relational, we're not doing that.</p>
  
  <p>Other than the fact that this is taking up much more diskspace than necessary, it's not really causing any big problems. We have a hash index on text and as long as we know the specific text value we can pull records based off of it.</p>
  
  <p>But what if we don't know the value? How can we find it? I am curious if there is any workaround to allow this.</p>
  
  <p>For instance if we could do something like this, it would be useful. Is this possible?</p>
  
  <pre><code>var cursor = collection.myindex.find();
  
  while(cursor.hasNext()) {
      var hash = cursor.next().numberLong;
      var doc = db.collection.findOne({text: {$hash: hash}});
      print(doc.text);
  }
  </code></pre>