Solr doesn't support these kind of business rules inside of it. Not
intended to.

Thusly, you will have to manage them externally. What's unstable about a
cronjob?

You will have to run your business rules externally, then apply the
necessary
field updates to the documents in Solr, ensuring the doc id's remain the
same
so the updates overwrite the previous document.

On Fri, 2 Dec 2011 12:21:43 +0100, Mark Schoy <hei...@gmx.de> wrote:
> Hi,
> 
> I have an solr index for an online shop with a field "price" which
> contains the standard price of a product.
> But in the database, the shop owner can specify a period of time with
> an alternative price.
> 
> For example: standard price is $20.00, but 12/24/11 08:00am to
> 12/26/11 11:59pm = $12.59
> 
> Of course I could use an cronjob to updating the documents. But I
> think this is too unstable.
> I also could save all price campaigns in a field an then extracting
> the correct price. But then I could not sort by price or only by the
> standard price.
> 
> What I need is an field where I can put a condition like that: if
> [current_time between one of the price campains] then [return price of
> price campaign]. But (unfortunately) this is not possible.
> 
> Thanks for advice.

Reply via email to