FAQ
Hi,
I'm creating an index from several database tables. Every item within
every table has a unique id which is saved in some kind of id-field
and the table name in an other one. So together they form a unique
identifier within the index. When deleting / updating an item I need
to retrieve it. My first idea was
indexreader.delete(new Term("id", "id-value"));
but this could delete several entries as id-value may appear in
several databases.
My second idea was to combine database name and id to form a kind of
unique identifier but this seems to be not the right way as the
problem may occur again with some sub-ids within a certain table.
So my question is: is it possible to determine the item to be deleted
by more than one term?

thx,
Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org

Search Discussions

  • Aad Nales at Oct 22, 2004 at 3:55 pm
    Paul,

    We are doing similar stuff. We actually do create a hash of database
    name, table name and id to form a unique id. So far I have not had any
    problems with it.

    Cheers,
    Aad

    Hi,
    I'm creating an index from several database tables. Every item within
    every table has a unique id which is saved in some kind of id-field and
    the table name in an other one. So together they form a unique
    identifier within the index. When deleting / updating an item I need to
    retrieve it. My first idea was indexreader.delete(new Term("id",
    "id-value")); but this could delete several entries as id-value may
    appear in several databases. My second idea was to combine database name
    and id to form a kind of unique identifier but this seems to be not the
    right way as the problem may occur again with some sub-ids within a
    certain table. So my question is: is it possible to determine the item
    to be deleted by more than one term?

    thx,
    Paul

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: lucene-user-help@jakarta.apache.org





    ---------------------------------------------------------------------
    To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
    For additional commands, e-mail: lucene-user-help@jakarta.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedOct 22, '04 at 3:42p
activeOct 22, '04 at 3:55p
posts2
users2
websitelucene.apache.org

2 users in discussion

Aad Nales: 1 post Paul: 1 post

People

Translate

site design / logo © 2021 Grokbase