lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MMach...@LEVI.com
Subject RE: Using lucene with HSSF from Apache
Date Thu, 01 May 2003 05:25:39 GMT
Hi, 
I did it, but I use only lucene. You need to create an IndexWriter with
SimpleAnalyzer, an InputStream as new FileInputStream, create Document with
two Fields: one contains the file path and one contains the file's content).
That's all. 
Michel

-----Original Message-----
From: Shoba Ramachandran [mailto:shoba_duruvan@yahoo.com] 
Sent: Wednesday, April 30, 2003 6:10 PM
To: lucene-user@jakarta.apache.org
Subject: Using lucene with HSSF from Apache

Hi,

Has anyone tried to index xls and doc files?
I'm trying to do with HSSF from apache and using
lucene1.2

This code returns me binary and printing it out gives
junk chracters. File indexed like this returns nothing
upon search. 

public static byte[] parse(File file) throws Exception
  {
    POIFSFileSystem fs = new POIFSFileSystem(new
FileInputStream(file));
HSSFWorkbook wb = new HSSFWorkbook(fs);
byte[] xlsInfo = wb.getBytes();
    System.out.println("xls content :  "+
xlsInfo.toString());
return xlsInfo;
  }

Thanks in advance for your help
Shoba


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message