Reindex only records that changed

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Reindex only records that changed

Debra-3
Hi all,

This is not a direct solr issue but I need it for indexing.

Is there a way to check if a database record changed since the last index (with-out using a special flag field that has to be set any-where the record is updated). I would like to re-index only records that changed.
Any hints greatly appreciated.

Debra
Reply | Threaded
Open this post in threaded view
|

Re: Reindex only records that changed

Sergey Polzunov-2
additional field in your DB as flag? 1 - dirty, 0 - clean.

Debra wrote:

> Hi all,
>
> This is not a direct solr issue but I need it for indexing.
>
> Is there a way to check if a database record changed since the last index
> (with out using a specail flag field that has to be set any-where the record
> is updated). I would like to re-index only records that changed.
>
> TIA
> Debra
>  

Reply | Threaded
Open this post in threaded view
|

Re: Reindex only records that changed

Debra-3
I would like to avoid such  a field in case  tables are updated  in programs not under my control + any program that updates these tables has to add logic for updating this field.

Sergey Polzunov-2 wrote
additional field in your DB as flag? 1 - dirty, 0 - clean.

Debra wrote:
> Hi all,
>
> This is not a direct solr issue but I need it for indexing.
>
> Is there a way to check if a database record changed since the last index
> (with out using a specail flag field that has to be set any-where the record
> is updated). I would like to re-index only records that changed.
>
> TIA
> Debra
>  
Reply | Threaded
Open this post in threaded view
|

Re: Reindex only records that changed

Ryan McKinley
MySQL has a TIMESTAMP field that can autoupdate everytime something
changes... i've never used it, but that may be a place to look.

alternativly you could add a TRIGGER to automatticaly dump stuff to a
bucket when it changes and clear the bucket when you index


On 3/6/07, Debra <[hidden email]> wrote:

>
> I would like to avoid such  a field in case  tables are updated  in programs
> not under my control + any program that updates these tables has to add
> logic for updating this field.
>
>
> Sergey Polzunov-2 wrote:
> >
> > additional field in your DB as flag? 1 - dirty, 0 - clean.
> >
> > Debra wrote:
> >> Hi all,
> >>
> >> This is not a direct solr issue but I need it for indexing.
> >>
> >> Is there a way to check if a database record changed since the last index
> >> (with out using a specail flag field that has to be set any-where the
> >> record
> >> is updated). I would like to re-index only records that changed.
> >>
> >> TIA
> >> Debra
> >>
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Reindex-only-records-that-changed-tf3358652.html#a9343307
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Reindex only records that changed

Debra-3
Thanks for the good advice.  


ryan mckinley wrote
MySQL has a TIMESTAMP field that can autoupdate everytime something
changes... i've never used it, but that may be a place to look.

alternativly you could add a TRIGGER to automatticaly dump stuff to a
bucket when it changes and clear the bucket when you index


On 3/6/07, Debra <devoraf@netvision.net.il> wrote:
>
> I would like to avoid such  a field in case  tables are updated  in programs
> not under my control + any program that updates these tables has to add
> logic for updating this field.
>
>
> Sergey Polzunov-2 wrote:
> >
> > additional field in your DB as flag? 1 - dirty, 0 - clean.
> >
> > Debra wrote:
> >> Hi all,
> >>
> >> This is not a direct solr issue but I need it for indexing.
> >>
> >> Is there a way to check if a database record changed since the last index
> >> (with out using a specail flag field that has to be set any-where the
> >> record
> >> is updated). I would like to re-index only records that changed.
> >>
> >> TIA
> >> Debra
> >>
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Reindex-only-records-that-changed-tf3358652.html#a9343307
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>