Indexes auto creation

2005-06-13 Thread Stephane Bailliez
I have a very stupid question that puzzles me so far in the API. (I'm using Lucene 1.4.3) There is a boolean flag over the creation of the Directory which is basically: use it as is or delete the storage area Same for the index, the IndexWriter use a flag 'use the existing or create a new on

Re: Indexes auto creation

2005-06-13 Thread Stephane Bailliez
Stephane Bailliez wrote: [...] try { writer = new IndexWriter(directory, analyzer, false) } catch (IOException e){ writer = new IndexWriter(directory, analyzer, true); } On a related note, the code above does not work if the index does not exist because of the lock created by the first

Re: Indexes auto creation

2005-06-13 Thread Stephane Bailliez
Luke Francl wrote: You may want to try using IndexReader's indexExists family of methods. They will tell you whether or not an index is there. http://lucene.apache.org/java/docs/api/org/apache/lucene/index/IndexReader.html#indexExists(org.apache.lucene.store.Directory) Good grief ! I missed th

Sorting by field from a given 'offset'

2005-06-24 Thread Stephane Bailliez
Hi all, I'm trying to do the following: "starting from document that has field f1 = a, give me the first n documents sorted by field 'z' ordered by asc/desc" Is it possible to build a complex query more efficient than: 1) search for the document where f1 = a 2) get the field f2 from this do

Re: Sorting by field from a given 'offset'

2005-06-24 Thread Stephane Bailliez
Stephane Bailliez wrote: Hi all, "starting from document that has field f1 = a, give me the first n documents sorted by field 'z' ordered by asc/desc" To be more specific, that's something like: [...] // get the document field 'dt' from a search ... //

Index Replication / Clustering

2005-06-25 Thread Stephane Bailliez
I have been browsing the archives concerning this particular topic. I'm in the same boat and the customer has clustering requirements. To give some background: I have a constant flow of incoming messages flying over the network that need to be archived in db, indexed and dispatched to thousand

Re: Index Replication / Clustering

2005-06-26 Thread Stephane Bailliez
Nader Henein wrote: Our setup is quite similar to yours, but in all honesty, you will need to do some for of batching on your updates simply because, you don't want to keep the Index Writter open all the time. For now, the index writer is closed after each added document. It does not seem to

Re: Index Replication / Clustering

2005-06-27 Thread Stephane Bailliez
Hi Paul, Thanks for the reply. Many interesting points. Paul Smith wrote: Why not try using JMS messaging to send messages to the indexing server that Document X needs to be updated via a JMS queue? This gives you the flexibility to have the indexing system down but not lose the message t

Re: Index Replication / Clustering

2005-06-30 Thread Stephane Bailliez
Nader Henein wrote: Considerations that you may want to think about when sanitizing your clustered indecies: 1) Number of documents available vs. number of documents in the persistent store. 2) Are all the document up to date (involves comparing the existence and the last date updated of Luce