Problem with indexing/merging indices - documents not indexed.

2004-12-06 Thread [EMAIL PROTECTED]
Hello all After reading the list for more than a year, I've finally decided (got courage) to post my first question. I'm not an expert in Lucene or Java, but I can find my way around it and right now I'm having a problem that I hope this list could help me out with. I'm using MySQL to store

Re: Problem with indexing/merging indices - documents not indexed.

2004-12-06 Thread Chris Hostetter
: I would appreciate any feedback on my code and whether I'm doing : something in a wrong way, because I'm at a total loss right now : as to why documents are not being indexed at all. I didn't try running your code (because i don't have a DB to test it with) but a quick read gives me a good

Re: Problem with indexing/merging indices - documents not indexed.

2004-12-06 Thread [EMAIL PROTECTED]
Hi Chris actually for merging indices that's how Otis did it in the article I quoted: // if -r argument was specified, use RAMDirectory RAMDirectory ramDir= new RAMDirectory(); IndexWriter ramWriter = new IndexWriter(ramDir, analyzer, true

Re: Weird NPE in RAMInputStream when merging indices

2003-10-22 Thread Otis Gospodnetic
Hm, beat me. The code in question seems to be: public RAMInputStream(RAMFile f) { file = f; length = file.length; } ...which is called from: /** Returns a stream reading an existing file. */ public final InputStream openFile(String name) { RAMFile file =

Re: Weird NPE in RAMInputStream when merging indices

2003-10-22 Thread petite_abeille
Hi Otis, On Wednesday, Oct 22, 2003, at 18:06 Europe/Amsterdam, Otis Gospodnetic wrote: Since 'files' is a Hashtable, neither the key nor the value (file) can be null, even though the NPE in RAMInputStream constructor implies that file was null. Yep... pretty weird... but looking at

Re: Weird NPE in RAMInputStream when merging indices

2003-10-22 Thread Otis Gospodnetic
That's why I emphasized that Hashtable doesn't allow nulls. If this is happening often, then yes, that is the thing to be suspicious about, and is easily to test by modifying your local copy of RAMDirectory. Otis --- petite_abeille [EMAIL PROTECTED] wrote: Hi Otis, On Wednesday, Oct 22,

Weird NPE in RAMInputStream when merging indices

2003-10-21 Thread petite_abeille
Hello, What could cause such weird exception? RAMInputStream.init: java.lang.NullPointerException java.lang.NullPointerException at org.apache.lucene.store.RAMInputStream.init(RAMDirectory.java:217) at org.apache.lucene.store.RAMDirectory.openFile(RAMDirectory.java:182) at

Re: merging indices

2003-09-16 Thread Otis Gospodnetic
Tom, Not sure which one would be better for you. It would be easy for you to test that, though. My guess would be that a single index will work better. To merge indices, create a new instance of FSDirectory. Directory dir = new FSDirectory(/path/to/new/index); Then create an array of your

Error merging indices with Lucene 1.3 RC1

2003-08-19 Thread Joseph Wilkicki
Hi all! I am working with Lucene 1.3 RC1 and found what I think is a problem. Basically, I am indexing into a RAMDirectory and then using addIndexes to merge the RAMDirectory into a file system index. Adding in a small number of documents doesn't seem to work. My test code is like this: