Hello George,
The Problem is the speed, some samples:

All Counts include writing IDs to file and BULK Insert to SQL:
18260 ID's - 72.2 s
352 ID's - 1.08s
96 ID's - 1.05s
29 ID's - 0.66s
3000 ID's - 10.02s
350 ID's - 0.98s
278 ID's - 0.48s
830 ID's - 2.25s

As you can see - the time it takes for Records >500 is absolutely slow...
If I write back the internal ID - it's a LOT faster...

I'm not using the lucene-ordering because this also slowed down the
returning process a lot.
And I'd like to count the results in different ways (which I was not able to
do in lucene) so I have to give back all ID's into SQL...

Thanks for helpin'!


On 10/30/06, George Aroush <[EMAIL PROTECTED]> wrote:

Hi Marc,

You can't depend on Lucene's internal ID, it will change every time when
you
update the index -- this is something you can't control.  The way you are
currently doing it, by storing an ID in a field named "id" is the right
way
to do it.  Don't worry about slowing down Lucene if you call the API to
get
the ID of your field "id".  Lucene is supper fast.

Regards,

-- George Aroush

-----Original Message-----
From: Kaufmann M. [mailto:[EMAIL PROTECTED]
Sent: Friday, October 27, 2006 4:20 PM
To: [email protected]
Subject: Storing primary key / Change lucene's document ID

Hello everybody,
I've got a little question concerning the unique ID stored in the Lucene
index (hits.ID(i)).
Is it possible to change this ID, or set it on doc.add?

Currently I'm running a test-project wich stores an external primary key
in
a field named 'id', but if I call it from the search-engine I have to use
the get-method - wich slows it down.
If I could use this primary key as lucene-ID the whole engine would be a
lot
faster because I just need the ID's returned...

Does anybody know if this is possible?

Thanks!
Best Regards, Marc


Reply via email to