26 sep 2007 kl. 16.49 skrev John Wang:
I have my own versioning system and I use it to keep index in sync
with
other parts of the system. Just wanted to know if there is a
shortcut to
keep it in the Lucene index and be able to read it by using something
similar to getCurrentVersion.
I guess
I have my own versioning system and I use it to keep index in sync with
other parts of the system. Just wanted to know if there is a shortcut to
keep it in the Lucene index and be able to read it by using something
similar to getCurrentVersion.
I guess I will have to store it somewhere outside of t
Would IndexReader:
/**
* Reads version number from segments files. The version number is
* initialized with a timestamp and then increased by one for each
change of
* the index.
*
* @param directory where the index resides.
* @return version number.
* @throws CorruptIndexEx
Haven't got a clue. And I can't have a clue since the answer would be
different if each doc had one field or 100 . About the only
thing I can think of is to try it and measure...
What is the use case where you'll be opening this index just to find
its version? Could you just do that once at progr
what do you think about the overhead of opening the IndexReader just to find
out the version?
e.g. if you have a large index, say 10M docs, just opening it to find out
the version, how big is the overhead?
-John
On 9/25/07, John Wang <[EMAIL PROTECTED]> wrote:
>
> cool, thanks!
>
> On 9/25/07, Er
cool, thanks!
On 9/25/07, Erick Erickson <[EMAIL PROTECTED]> wrote:
>
> Sure, just index a *very special* document with one field that is
> shared by no other documents in your index. Put your
> custom signature in there.
>
> You can even get it very efficiently with TermEnum if you
> don't want t
Sure, just index a *very special* document with one field that is
shared by no other documents in your index. Put your
custom signature in there.
You can even get it very efficiently with TermEnum if you
don't want to search for it, but searching would also be very
fast. Put, say, two fields in th
Hi:
Is there a way to added custom signature data to a lucene index, e.g data
version etc?
Thanks
-John