LUCENE-5859, LUCENE-5871: Remove Version.LUCENE_CURRENT from javadocs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1619623 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2014-08-21 23:18:04 +00:00
parent 451aee2e66
commit 5e5072d3c2
1 changed files with 3 additions and 3 deletions

View File

@ -30,13 +30,13 @@ to check if the results are what we expect):</p>
<!-- = Java2Html Converter 5.0 [2006-03-04] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<pre class="prettyprint">
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_CURRENT);
Analyzer analyzer = new StandardAnalyzer();
// Store the index in memory:
Directory directory = new RAMDirectory();
// To store an index on disk, use this instead:
//Directory directory = FSDirectory.open("/tmp/testindex");
IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_CURRENT, analyzer);
IndexWriterConfig config = new IndexWriterConfig(analyzer);
IndexWriter iwriter = new IndexWriter(directory, config);
Document doc = new Document();
String text = "This is the text to be indexed.";
@ -48,7 +48,7 @@ to check if the results are what we expect):</p>
DirectoryReader ireader = DirectoryReader.open(directory);
IndexSearcher isearcher = new IndexSearcher(ireader);
// Parse a simple query that searches for "text":
QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, "fieldname", analyzer);
QueryParser parser = new QueryParser("fieldname", analyzer);
Query query = parser.parse("text");
ScoreDoc[] hits = isearcher.search(query, null, 1000).scoreDocs;
assertEquals(1, hits.length);