Hi,
I have a strange exception when I'm trying to recreate an IndexWriter
that was previously defined.
I did the following steps:
1. mWriter = new IndexWriter(indexPath, analyzer, true);
2. mWriter.addDocument(document);
3. mWriter.optimize();
4.
Have a look at your fields to see if they share a certain term. eg if you
have a URL field then 'http' will probably bring them all up.
___
To help you stay safe and secure online, we've developed the all new Yahoo!
On Oct 5, 2005, at 9:32 PM, Cyril Barlow wrote:
Creating an IndexSearcher for every request goes against how to use
Lucene best. A _single_ IndexSearcher for all searches is optimum.
You really ought to look into using a single instance.
Erik
On Oct 6, 2005, at 8:45 AM, Cyril Barlow wrote:
I'm trying to pass an IndexSearcher over RMI but I'm getting a :
java.rmi.UnmarshalException: error unmarshalling return; nested
exception
is:
java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException:
There really is no need to close an IndexSearcher until you need to
instantiate another one, and even then you can let the old instance
go without closing and all will still be well. If you construct
IndexSearcher with a String directory name, there is no need to close
anything other than
- Original Message -
From: Erik Hatcher [EMAIL PROTECTED]
To: java-user@lucene.apache.org
Sent: Thursday, October 06, 2005 1:49 PM
Subject: Re: IndexSearcher over RMI
On Oct 6, 2005, at 8:45 AM, Cyril Barlow wrote:
I'm trying to pass an IndexSearcher over RMI but I'm getting a :
This is a question for java-user@ list, not java-dev@
Hello Shadab,
You need to make your application perform the primary key-like logic.
It can, for instance, look in the index first, before adding a
document, using a field designated to be the PK. If it finds an
existing document, delete it
On Oct 6, 2005, at 11:28 AM, Cyril Barlow wrote:
How long does the Hits object stay in memory for?
As long as you keep it around. Lucene isn't responsible for keeping
a reference to it, your application is.
Until the IndexSearcher closes? And if you just use 1 IndexSearcher
would there
Your site is down...but I would also liek to read that doc.
-Original Message-
From: jian chen [EMAIL PROTECTED]
To: java-user@lucene.apache.org; chai qiaozi [EMAIL PROTECTED]
Sent: Tue, 4 Oct 2005 20:38:25 -0700
Subject: Re: who could tell me the equation of the scoring in detail? i'm
I know that in general if you optimize an index the document id that a
HitCollector would see is not guarenteed to stay the same since any deleted
documents would get removed from the index completely and all later
documents pushed up to fill in the gaps. I'm wondering though, are the
document ids
ids can also change as the result of an add(), not just optimize(). An add
can trigger a segment merge which can squeeze out deleted docs and thus
change the ids. I think everything else you said is pretty much correct.
On 10/6/05, Jack McBane [EMAIL PROTECTED] wrote:
I know that in general if
How can I make it possible to search on words that includes special
characters like + and # as in C++ and C# ?
Filip
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
I'm getting this error from trying to access a document in my custom hit
collector:
java.lang.IllegalArgumentException: attempt to access a deleted document
at
org.apache.lucene.index.SegmentReader.document(SegmentReader.java:235
)
at
StandardAnalyzer's grammar tokenizes C# and C++ down to C. So you
can either use an analyzer that tokenizes differently (such as
WhitespaceAnalyzer), or modify the JavaCC grammar for StandardAnalyzer
and rebuild your own custom version. If you go the latter route, have
a look at NutchAnalysis.jj
I think my best option will just be to optimize the index after each
deletion. I guess this will be good for me anyways... For the cases
where optimizing is not a luxury one can afford, it would be nice if
there was another way around this.
Peter
-Original Message-
From: Peter Kim
Maybe somebody will suggest some workarounds, but I'll only suggest you
don't optimize your index after each deletion - see
http://www.lucenebook.com/search?query=when+to+optimize - the
suggestions are in the snippet of the 1st hit.
Otis
--- Peter Kim [EMAIL PROTECTED] wrote:
I think my best
Peter Kim wrote:
I noticed one way to get around this is to use IndexReader.isDeleted()
to check if it's deleted or not. The problem with that is I only have
access to a MultiSearcher in my HitCollector which doesn't give me
access to the underlying IndexReader. I don't want to have to open an
17 matches
Mail list logo