- Cleaned up unused or duplicate imports.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@149943 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Otis Gospodnetic 2003-01-29 17:43:13 +00:00
parent 201b56a2c4
commit 552bfaf4b1
13 changed files with 31 additions and 51 deletions

View File

@ -66,12 +66,12 @@ import java.io.FileInputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Date;
import java.util.Random;
class AnalysisTest {
public static void main(String[] args) {
try {
test("This is a test", true);
// FIXME: OG: what's with this hard-coded file name??
test(new File("words.txt"), false);
} catch (Exception e) {
System.out.println(" caught a " + e.getClass() +

View File

@ -56,8 +56,6 @@ package org.apache.lucene;
import org.apache.lucene.analysis.SimpleAnalyzer;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.TermPositions;
import org.apache.lucene.document.Document;
import org.apache.lucene.demo.FileDocument;
import java.io.File;
@ -67,12 +65,13 @@ class IndexTest {
public static void main(String[] args) {
try {
Date start = new Date();
// FIXME: OG: what's with this hard-coded dirs??
IndexWriter writer = new IndexWriter("F:\\test", new SimpleAnalyzer(),
true);
writer.mergeFactor = 20;
// FIXME: OG: what's with this hard-coded dirs??
indexDocs(writer, new File("F:\\recipes"));
writer.optimize();

View File

@ -54,8 +54,6 @@ package org.apache.lucene;
* <http://www.apache.org/>.
*/
import java.io.IOException;
import java.util.Date;
import java.util.GregorianCalendar;
import org.apache.lucene.store.*;

View File

@ -55,8 +55,6 @@ package org.apache.lucene;
*/
import java.io.IOException;
import java.util.Date;
import java.util.GregorianCalendar;
import org.apache.lucene.store.*;
import org.apache.lucene.document.*;

View File

@ -61,7 +61,6 @@ import org.apache.lucene.index.*;
import org.apache.lucene.search.*;
import org.apache.lucene.queryParser.*;
import java.io.File;
import java.util.Random;
class ThreadSafetyTest {

View File

@ -59,7 +59,6 @@ import junit.framework.*;
import org.apache.lucene.*;
import org.apache.lucene.analysis.*;
import org.apache.lucene.analysis.Token;
public class TestAnalyzers extends TestCase {

View File

@ -55,21 +55,15 @@ package org.apache.lucene.analysis.ru;
*/
import junit.framework.TestCase;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Token;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
/**
* Test case for RussianAnalyzer.

View File

@ -55,11 +55,10 @@ package org.apache.lucene.analysis.ru;
*/
import junit.framework.TestCase;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
public class TestRussianStem extends TestCase

View File

@ -63,9 +63,8 @@ import org.apache.lucene.search.Similarity;
import org.apache.lucene.demo.FileDocument;
import java.io.File;
import java.util.Date;
// FIXME: OG: remove hard-coded file names
class DocTest {
public static void main(String[] args) {
try {
@ -76,7 +75,7 @@ class DocTest {
printSegment("one");
indexDoc("two", "test2.txt");
printSegment("two");
merge("one", "two", "merge");
printSegment("merge");
@ -130,12 +129,12 @@ class DocTest {
for (int i = 0; i < reader.numDocs(); i++)
System.out.println(reader.document(i));
TermEnum tis = reader.terms();
while (tis.next()) {
System.out.print(tis.term());
System.out.println(" DF=" + tis.docFreq());
TermPositions positions = reader.termPositions(tis.term());
try {
while (positions.next()) {

View File

@ -75,9 +75,10 @@ class TermInfosTest {
}
}
// FIXME: OG: remove hard-coded file names
public static void test()
throws Exception {
File file = new File("words.txt");
System.out.println(" reading word file containing " +
file.length() + " bytes");

View File

@ -54,23 +54,21 @@ package org.apache.lucene.search;
* <http://www.apache.org/>.
*/
import junit.framework.TestCase;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Hits;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.analysis.SimpleAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import junit.framework.TestCase;
/** Document boost unit test.
*
* @author Doug Cutting
* @version $Revision$
*/
/** Document boost unit test.
*
* @author Doug Cutting
* @version $Revision$
*/
public class TestDocBoost extends TestCase {
public TestDocBoost(String name) {
super(name);

View File

@ -54,13 +54,11 @@ package org.apache.lucene.search;
* <http://www.apache.org/>.
*/
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.NotBoundException;
import java.rmi.registry.LocateRegistry;
import junit.framework.TestCase;
import java.rmi.Naming;
import java.rmi.registry.LocateRegistry;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.RAMDirectory;

View File

@ -54,25 +54,23 @@ package org.apache.lucene.search;
* <http://www.apache.org/>.
*/
import junit.framework.TestCase;
import java.util.Vector;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.Hits;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.analysis.SimpleAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import junit.framework.TestCase;
import java.util.Vector;
/** Similarity unit test.
*
* @author Doug Cutting
* @version $Revision$
*/
/** Similarity unit test.
*
* @author Doug Cutting
* @version $Revision$
*/
public class TestSimilarity extends TestCase {
public TestSimilarity(String name) {
super(name);