You have couple of options to delete:
1) Explicit delete request
2) Expiration management:
https://lucene.apache.org/solr/8_1_0//solr-core/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.html
3) If you are indexing in clear batches (e.g. monthly, and keep last 3
month), you could look at
https://lucene.apache.org/solr/guide/8_0/time-routed-aliases.html . Or just
manual alias management to the same effect.

Regards,
   Alex.

On Tue, Jun 25, 2019, 7:04 AM Anuj Bhargava, <anujb...@gmail.com> wrote:

> Then I'll need to delete records more than 30 days old. I was wonder if I
> could add something in the cron script itself.
>
> Regards,
>
> Anuj
>
> On Tue, 25 Jun 2019 at 16:11, Vadim Ivanov <
> vadim.iva...@spb.ntk-intourist.ru> wrote:
>
> >
> > ... and &clean=false  if you want to index just new records and keep old
> > ones.
> > --
> > Vadim
> >
> >
> > > -----Original Message-----
> > > From: Jan Høydahl [mailto:jan....@cominvent.com]
> > > Sent: Tuesday, June 25, 2019 10:48 AM
> > > To: solr-user
> > > Subject: Re: Solr 8.0.0 Customized Indexing
> > >
> > > Adjust your SQL (located in data-config.xml) to extract just what you
> > need
> > > (add a WHERE clause)
> > >
> > > --
> > > Jan Høydahl, search solution architect
> > > Cominvent AS - www.cominvent.com
> > >
> > > > 25. jun. 2019 kl. 07:23 skrev Anuj Bhargava <anujb...@gmail.com>:
> > > >
> > > > Customized Indexing date specific
> > > >
> > > > We have a huge database of more than 10 years. How can I index just
> > some
> > > of
> > > > the records - say for last 30 days. One of the fields in the database
> > is
> > > > *date_upload* which contains the date when the record was uploaded.
> > > >
> > > > Currently using Cron to index -
> > > > curl -q
> > > > http://loaclhost:8983/solr/newsdata/dataimport?command=full-
> > > import&clean=true&commit=true
> > > >> /dev/null 2>&1
> >
> >
> >
>

Reply via email to