title: Lucene query with range
body: <p>I'm indexing some items which include <code>title</code> and <code>cost</code> as fields. Cost is a double value.
  I'm preparing a query such as:</p>
  
  <pre><code>(title:item~0.8) AND (cost:[0.0 TO 200.0])
  </code></pre>
  
  <p>After parsing, <code>query.toString()</code> looks like this:</p>
  
  <pre><code>+title:item~0 +cost:[0.0 TO 200.0]
  </code></pre>
  
  <p><strong>From the results returned, it is obvious that <code>cost</code> is not considered.</strong>
  I know for sure that <code>cost</code> is indexed because I can retrieve it.
  Indexing code:</p>
  
  <pre><code>public void index(Set&lt;Item&gt; items) throws IOException {
      String path = "D:\\lucenedata\\myproj";
      Directory fsDir = FSDirectory.open(new File(path));
      StandardAnalyzer analyzer = new StandardAnalyzer();
      IndexWriterConfig iwConf = new IndexWriterConfig(Version.LUCENE_4_10_3, analyzer);
      iwConf.setOpenMode(IndexWriterConfig.OpenMode.CREATE);
      IndexWriter indexWriter = new IndexWriter(fsDir, iwConf);
      for (Item item : items) {
          Document d = new Document();
          if (item.getCost() != null) {
              d.add(new DoubleField("cost", item.getCost().doubleValue(), Store.YES));
          }
          d.add(new TextField("title", item.getTitle(), Store.YES));
          indexWriter.addDocument(d);
      }
      indexWriter.commit();
      indexWriter.close();
      System.out.println("Indexed " + items.size() + " items");
  }
  </code></pre>