Getting IOException for lucene code
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   parag_dharmadhikari
Posted On:   Tuesday, October 23, 2001 01:44 AM

HI all, I am new to lucene and i am constatntly getting IOException in follwing code: import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.apache.lucene.analysis.*; import org.apache.lucene.document.*; import org.apache.lucene.queryParser.*; public class Search { public static void main(String[] args) { try{ String indexPath = "D:\org", queryString = "parag"; Searcher searcher = new IndexSearcher(indexPath); Query query = QueryParser.parse(queryString, null,null); Hits hits = searcher.search(query); for (int i=0; i System.out.println(hits.   More>>

HI all,


I am new to lucene and i am constatntly getting IOException in follwing code:



			
import org.apache.lucene.index.*;
import org.apache.lucene.search.*;
import org.apache.lucene.analysis.*;
import org.apache.lucene.document.*;
import org.apache.lucene.queryParser.*;

public class Search {
public static void main(String[] args) {

try{
String indexPath = "D:\org", queryString = "parag";

Searcher searcher = new IndexSearcher(indexPath);
Query query = QueryParser.parse(queryString, null,null);

Hits hits = searcher.search(query);

for (int i=0; i
System.out.println(hits.doc(i).get("path") + "; Score: " +
hits.score(i));
}
}
catch(Exception e)
{
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}





ERROR I get is that:



D:/org/segments (The system can not find the specified file)
Then it gives filenotfound exception.


Can anybody help me to solve it??



thanx in advance


parag    <<Less
About | Sitemap | Contact