lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acottr...@blacksunplc.com (Andrew Cottrell)
Subject Re(2): newbi question
Date Mon, 22 Oct 2001 16:04:04 GMT
puffmail@darksleep.com writes:
>> public class Search {
>>   public static void main(String[] args) {
>> 	try{
>>     String indexPath = "d:\\org", queryString = "parag";
>>     Searcher searcher = new IndexSearcher(indexPath);
>
>     Hm, are you sure it should be two slashes?  Alternately, try using
>forward-slashes (java will map // to whatever your system uses, but not
>necessarily \\).

Two back-slashes is correct, the first being the Java escape character.

Should the path passed to IndexSearcher have a trailing back-slash?

i.e. 

public class Search {
  public static void main(String[] args) {
    try{
      String indexPath = "d:\\org\\", queryString = "parag";
      Searcher searcher = new IndexSearcher(indexPath);

Regards,
-Andrew Cottrell


Mime
View raw message