title: Lucene 5.2.1 PhraseQuery was indexed without position data cannot run PhraseQuery
body: <p>I receive an exception when I make a research with a <code>PhraseQuery</code> on the field named 'content'.<br>
  To index this one, I use the <code>org.apache.lucene.document.TextField</code> class because this field contains many words.<br>
  I use the <code>FrenchAnalyzer</code> and <code>RAMDirectory</code> class to create the index.</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.IllegalStateException: field "comment" was indexed without position data; cannot run PhraseQuery (phrase=comment:"the skype")
        at org.apache.lucene.search.PhraseQuery$PhraseWeight.scorer(PhraseQuery.java:301)
        at org.apache.lucene.search.Weight.bulkScorer(Weight.java:137)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:768)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:485)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:694)
        at org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:410)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:439)
        at org.memory.LuceneIndexer.wildcardSearchIndex(LuceneIndexer.java:189)
        at org.memory.Mem_04.main(Mem_04.java:60)</p>
  </blockquote>
  
  <pre><code>idxfld = new TextField(field.getFieldname(),(String) field.getValue(),Field.Store.YES);
  
  PhraseQuery query = new PhraseQuery();
  query.setSlop(0);
  query.add(new Term("comment","the"));
  query.add(new Term("comment","skype"));
  System.out.println(query.toString());
  int numResults = 1000;
  ScoreDoc[] hits = searcher.search(query, numResults).scoreDocs;
  </code></pre>
  
  <p>Can you help me ?
  Serge</p>