title: ElasticSearch and MongoDB
body: <p>I'm willing to run full-text queries in MongoDB, using ElasticSearch. I found some guides about how to setup ElasticSearch using <a href="https://github.com/richardwilly98/elasticsearch-river-mongodb" rel="nofollow">this</a>, but I have a few questions.</p>
  
  <p>1: I'm supposed to run this</p>
  
  <pre><code>curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{ 
      "type": "mongodb", 
      "mongodb": { 
          "db": "testmongo", 
          "collection": "person"
      }, 
      "index": {
          "name": "mongoindex", 
          "type": "person" 
      }
  }'
  </code></pre>
  
  <p>to make ElasticSearch index that collection. Do I need to run this more than once? (Every time my collection is updated? Once per day?)</p>
  
  <p>2: Is there full support for paging and ordering? I'd like to search for something, but limiting the result to N results per page, and skip some pages. Also, I'd like to order by any field.</p>
  
  <p>3: My data looks like this:</p>
  
  <pre><code>{
      question: 'text here', 
      date: '01/01/2000 01:01',
      title: 'Some title',
      client: 'name',
      assigned_to: ['name1', 'name2', 'name3'],
      answers: [
          {answer: 'bla bla'}, 
          {answer: 'bla bla'}, 
          {answer: 'bla bla'}
      ]
  }
  </code></pre>
  
  <p>Will I be able to search in <code>question</code>, <code>title</code> and all the <code>answers</code>?</p>