Hm, it seems that I'm screwed with CLucnee 0.9.21 because in fact I'm not
using an IndexWriter but an IndexModifier - and nowhere in the IndexModifier
documentation there's a mention of "commit":
http://clucene.sourceforge.net/doc/html/classlucene_1_1index_1_1IndexModifier.html

- Mike
aka...@gmail.com


On Wed, Sep 23, 2009 at 12:42 PM, Michel Nadeau <aka...@gmail.com> wrote:

> Hi!
>
> Is there a way to open an IndexWriter with autoCommit=true when using
> CLucene 0.9.21 or is it a 2_3_2 branch only option?
>
> In the documentation I saw this option:
>
> void     setCommitLockTimeout (int64_t commitLockTimeout)
> *     Sets the maximum time to wait for a commit lock (in milliseconds). *
> -->
> http://clucene.sourceforge.net/doc/html/classlucene_1_1index_1_1IndexWriter.html#75b72d973d3b470d53d6e163a3dc6e41
>
> I thought that maybe I could set it to 0 and get a behavior like
> "autoCommit" ?
>
> Thanks,
>
> - Mike
> aka...@gmail.com
>
>
> On Mon, Sep 21, 2009 at 9:33 PM, Isidor Zeuner <cluc...@quidecco.de>wrote:
>
>> Hi Mike,
>>
>> >
>> > I never saw the test suite before (shame on me). It will be VERY useful
>> in
>> > the future. Thank you very much!!
>> >
>>
>> No blame on you. You point out an important area where our
>> documentation is lacking.
>>
>> > I have another question - maybe someone knows the answer:
>> >
>> > It seems that CLucene is keeping stuff in memory between the open/close
>> of
>> > the IndexWriter object. For example, if you create a brand new index and
>> > create a document in it with just the field "TEST" containing "TEST",
>> and
>> > right after inserting it you search in the index for "TEST:TEST",
>> without
>> > closing the IndexWriter object, it will never be found. But, if you
>> close
>> > the IndexWriter before searching, and then search, it will find it. So
>> my
>> > question is: is there a way to change that behavior? I'd like all
>> changes to
>> > the index to be "instant" and to be able to search for newly created
>> > documents right after inserting them.
>> >
>>
>> You can open the IndexWriter with autoCommit set to true so it will
>> commit the written documents to the segments file immediately, causing
>> it to become visible to readers. For performance reasons, documents
>> are still not written to the physical storage immediately, so
>> you'll have to call IndexWriter::flush() after inserting a
>> document.
>>
>> Best regards,
>>
>> Isidor
>>
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9&#45;12, 2009. Register
>> now&#33;
>> http://p.sf.net/sfu/devconf
>> _______________________________________________
>> CLucene-developers mailing list
>> CLucene-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/clucene-developers
>>
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to