Lucene in java method not found
<p>I am using those code below for searching but some methods shows error;</p>

<pre><code>FSDirectory.open(new File(indexDirectoryPath));
  writer = new IndexWriter(indexDirectory, 
     new StandardAnalyzer(),true,
     IndexWriter.MaxFieldLength.UNLIMITED);
</code></pre>

<p>In this code open and MaxFieldLength shows error. I am using lucene 6.0.0. </p>

<p>The open() method shows the error</p>

<blockquote>
  <p>The method open(Path) in the type FSDirectory is not applicable for
  the arguments (File)</p>
</blockquote>

<p>and MaxFieldLength shows:</p>

<blockquote>
  <p>MaxFieldLength cannot be resolved or is not a field</p>
</blockquote>

<p>I used the code provided here:</p>

<pre><code>http://www.tutorialspoint.com/lucene/lucene_first_application.htm
</code></pre>