title: Lucene query language and numeric range
body: <p>I'm applying the following Lucene query predicate in order to get all inclusive numbers in 2 to 6 range:</p>
  
  <pre><code>value:[2 TO 6]
  </code></pre>
  
  <p>and receive the documents with the following values:</p>
  
  <pre><code>567986400000
  567986400000
  567986400000
  536450400000
  536450400000
  599608800000
  536450400000
  567986400000
  </code></pre>
  
  <p>I'm interested in the numeric range query and obviously, for example, the <code>Long</code> value <code>567986400000</code> is not in the range of <code>[2 TO 6]</code>. Looks like the range searches are strings and I don't know how to workaround it in mine application for the different numeric values.</p>
  
  <p>How to properly use numeric range queries in Lucene?</p>