lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Karman <pe...@peknet.com>
Subject Re: [lucy-user] Get doc_id during indexing?
Date Tue, 14 Jan 2014 15:18:04 GMT
On 1/14/14 3:03 AM, Aleksandar Radovanovic wrote:
> Hi there,
>
> I was wondering is it possible to get doc_id during the indexing
> process, or can I simply assume that doc_id starts from 0 and increments
> with each record added?
>
>

Even if you could, I would not recommend that approach for solving your 
problem. The doc_id is an internal implementation detail.

Instead, why not assign a unique term (like a URI) to each document in 
your index, and reference that externally?

You could also, post indexing, iterate over the Lexicons in an index and 
create a new index based on your keyword identification. Note that 
'keyword' might be a misnomer depending on what Analysis classes you 
apply to your documents: i.e., you might have phrases, etc., not just 
single terms.


-- 
Peter Karman  .  http://peknet.com/  .  peter@peknet.com

Mime
View raw message