Re: Delete by Query with limited number of rows

2011-11-14 Thread mikr00
Hi Erick, hi Yury, thanks to your input I found a perfect solution for my case. Even though this is not a solr-only solution, I will just briefly describe how it works since it might be of interest to others: I have put up a mysql database holding two tables. The first only has a primarykey with

Re: Delete by Query with limited number of rows

2011-11-13 Thread Erick Erickson
There's nothing built into Solr that lets you do this automatically. About the best you can do is probably a delete by query going back some fixed time interval. So rather than keeping the last N documents, you keep documents that are, say, no more than 1 month old (or whatever you determine your i

Re: Delete by Query with limited number of rows

2011-11-13 Thread mikr00
Hi Yury, thank you very much for your quick reply. Currently I have a timestamp field (solr.DateField) and every time I add a document I use "NOW" for the timestamp field. I only commit documents on the core every four hours. This works fine with the timestamp since I can use "NOW". However, I cou

Re: Delete by Query with limited number of rows

2011-11-12 Thread Yury Kats
On 11/12/2011 4:08 PM, mikr00 wrote: > Similar to a first in first out list. The problem is: It's easy to check the > limit, but how can I delete the oldest documents to go again below the > limit? Can I do it with a delete by query request? In that case, I would > probably have to limit the number