Re: Index Excel File

2006-12-13 Thread rajan
Hello,

Please try to use jexcelapi.
I done it successfully. 
While using POI it gave me exception while image is present in excel file.

Regards
Rajan.

-Original Message-
From: spinergywmy <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Date: Wed, 13 Dec 2006 17:21:11 -0800 (PST)
Subject: Index Excel File

> 
> Hi,
> 
>Is anyone index an excel file before? I took a look at the API
> classes
> provided by POI HSSF, however, I did not find any method to extract the
> text
> from excel file and index them.
> 
>Please assist and leet me know where I can find the example to refer
> to.
> Thanks
> 
> 
> regards,
> Wooi Meng
> -- 
> View this message in context:
> http://www.nabble.com/Index-Excel-File-tf2817920.html#a7865192
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Index Excel File

2006-12-13 Thread rajan
Hello,

i used jexcepapi. Within that there is class called CSV.java in demo 
package.
By using that i extracted text from excel, and added that text into the 
index.

I hope this will help you.
Regards
Rajan.


-Original Message-
From: spinergywmy <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Date: Wed, 13 Dec 2006 18:05:29 -0800 (PST)
Subject: Re: Index Excel File

> 
> Hi,
> 
>Can you show me the example on how to extract the text from excel
> file
> and index them?
> 
>Thanks
> 
> regards,
> Wooi Meng
> -- 
> View this message in context:
> http://www.nabble.com/Index-Excel-File-tf2817920.html#a7865632
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Index Excel File

2006-12-13 Thread rajan
I think there is problem with following line...

row = sheet.getRow(i); -> row = sheet.getRow(j);

Also following code with give you the contents:
===
   Workbook excelDoc = Workbook.getWorkbook(new FileInputStream(
 file));
   String content = "";
   for (int i = 0; i < excelDoc.getNumberOfSheets(); i++) {
Sheet sheet = excelDoc.getSheet(i);
Cell[] row = null;
for (int j = 0; j < sheet.getRows(); j++) {
 row = sheet.getRow(j);
 for (int rows = 0; rows < row.length; rows++) {
  content = row[rows].getContents();
  System.err.println("content inside loop is ::: "
+ content);
 }
}
   }
===
Regards
Rajan

-Original Message-
From: spinergywmy <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Date: Wed, 13 Dec 2006 19:10:30 -0800 (PST)
Subject: Re: Index Excel File

> 
> Hi,
> 
>I did use jexcelapi to extract the contents out of excel file,
> however, I
> couldn't get the content when I sysout. Below are the codes that I
> wrote,
> perhaps you can point out where I have done wrong. Thanks.
> 
> 
>Workbook excelDoc = Workbook.getWorkbook(new FileInputStream(file));
>   String content = "";
>   
>   for(int i = 0; i < excelDoc.getNumberOfSheets(); i++)
>   {
>  Sheet sheet = excelDoc.getSheet(i);
>  
>  Cell[] row = null;
>  
>  for(int j = 0; j < sheet.getRows(); j++)
>  {
> row = sheet.getRow(i);
> 
> System.err.println("row is ::: " +row.length);
> 
> if(row.length > 0)
> {
>content = row[i].getContents();
>System.err.println("content inside loop is ::: " +content);
> }
>  }
>   }
>   
>   System.err.println("content is ::: " +content);
>   
>   doc.add(new Field(DsConstant.idxFileContent, content,
> Field.Store.YES,
> Field.Index.TOKENIZED));
>   doc.add(new Field(DsConstant.idxFileName, file.getName(),
> Field.Store.YES,
> Field.Index.UN_TOKENIZED));
>   doc.add(new Field(DsConstant.idxPath, file.getPath(),
> Field.Store.YES,
> Field.Index.UN_TOKENIZED));
>   
>   excelDoc.close();
> 
> regards,
> Wooi Meng
> -- 
> View this message in context:
> http://www.nabble.com/Index-Excel-File-tf2817920.html#a7866165
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SearchFiles demo fails with exception while IndexFiles works

2009-10-27 Thread s rajan
hi, I am playing with lucene 2.9.0 source build, ant 1.7.1, jdk1.6.0, win XP
home edition.
I dont have clover or jFlex installed.
I built the srcs and ran IndexFiles demo and that worked. However when I run
SearchFiles
I have an exception that says:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The field directory is defined in an inherited type and an enclosing
sco
pe
The field directory is defined in an inherited type and an enclosing
sco
pe
The field directory is defined in an inherited type and an enclosing
sco
pe
at
org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:71)

I run the build again and its the same thing.
Is there anything else I need to do?

tks,
-rajan


Re: SearchFiles demo fails with exception while IndexFiles works

2009-10-28 Thread s rajan
Mike, thanks for that URL, I saw a similar issue being discussed on
stackoverflow.

I am doing an external ant build and trying to debug through eclipse. For
some reason eclipse is failing to import the ant build file as a project so
i use a debug configuration and build externally.

I now have the problem solved by a clean build but my hunch is that the jar
had 1.4 and 1.6 object files -for a brief period I had a few sources build
via eclipse and it had a jdk1.4 as its setting.
I still have the 'bad' jar but have not investigated further - the only
thing I can think of is object file mismatch.
It beats me why the loader flags compilation error or perhaps does it means
JIT compilation?  I think there is an issue here in that the jar creation
should have failed or the loader should have reported a version mismatch.

On Wed, Oct 28, 2009 at 3:05 PM, Michael McCandless <
luc...@mikemccandless.com> wrote:

> Are you using an IDE (Eclipse)?  This may help?:
>
>  http://forums.java.net/jive/thread.jspa?messageID=363989
>
> Or maybe try building from the command line instead ("ant compile-demo")?
>
> Mike
>
> On Tue, Oct 27, 2009 at 8:34 PM, s rajan  wrote:
> > hi, I am playing with lucene 2.9.0 source build, ant 1.7.1, jdk1.6.0, win
> XP
> > home edition.
> > I dont have clover or jFlex installed.
> > I built the srcs and ran IndexFiles demo and that worked. However when I
> run
> > SearchFiles
> > I have an exception that says:
> > Exception in thread "main" java.lang.Error: Unresolved compilation
> problems:
> >The field directory is defined in an inherited type and an
> enclosing
> > sco
> > pe
> >The field directory is defined in an inherited type and an
> enclosing
> > sco
> > pe
> >The field directory is defined in an inherited type and an
> enclosing
> > sco
> > pe
> >at
> > org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:71)
> > 
> > I run the build again and its the same thing.
> > Is there anything else I need to do?
> >
> > tks,
> > -rajan
> >
>
>  -
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>


Matching accented with non-accented characters

2006-07-25 Thread Rajan, Renuka
Hi All

 

I am trying to match accented characters with non-accented characters in 
French/Spanish and other Western European languages.  The use case is that the 
users may type letters without accents in error and we still want to be able to 
retrieve valid matches.  The one idea, albeit naïve, is to normalize the data 
on the inbound side as well as the data in the database (prior to full text 
indexing) and retrieve matches.  

 

For instance if the database contains a word like BE/BE/ (/ being the 
equivalent of aigu since I don't have a French keyboard:-)) and the input is 
erroneously provided as BE/BE (last aigu missing), we still want to be able 
retrieve BE/BE/ as a candidate match admittedly with an error margin.  

 

Has anyone using Lucene successfully (ie in terms of decent performance AND 
validity of results) to match non-accented characters with accented ones using 
some method?  Any method?  Anyone have suggestions to improve the suggestion 
above?

 

Any input will be greatly appreciated! Merci beaucoup :-)

Renuka



The information contained in this communication may be CONFIDENTIAL and is 
intended only for the use of the recipient(s) named above.  If you are not the 
intended recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication, or any of its contents, is 
strictly prohibited.  If you have received this communication in error, please 
notify the sender and delete/destroy the original message and any copy of it 
from your computer or paper files.