That *is* the actual id in the index. There is no other.
You should be careful using it outside of Lucene though, because
Lucene may rearrange the document ids during optimization for example.

If you need an application id, add it as an additional stored field to
each document and retrieve that.

Hope this helps
Philipp

2007/4/5, Mohammad Norouzi <[EMAIL PROTECTED]>:
sorry to correct my answer:
I need something like this result.doc( i ).getId();

this id from the result (the i ) is starting from 1 but I need the actual id
in the index.

On 4/5/07, Mohammad Norouzi <[EMAIL PROTECTED]> wrote:
>
>
> Hi
> I need the id of the document that returned by Hits as a result of a
> query.
>
> Hits result = searchable.find(myQuery....);
>
> now I need something like result.getId ()
>
> is there any way to get it?
>
> Thanks so much
>
> --
> Regards,
> Mohammad Norouzi
>



--
Regards,
Mohammad


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to