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
: 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
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
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 =
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
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,
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
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
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: