On Wed, May 6, 2009 at 7:32 AM, Andrew Ingram <a...@andrewingram.net> wrote: > Basically, a product has two price values and a date, the product > effectively has one price before the date and the other one after. > This poses no problem for the site itself since I can use conditional > logic, but I have no idea how to approach this with regards to solr > queries. > > The price of a product is used for both faceting and sorting and > should use whichever price is active at the time of the query. Is > there any way to do define a field whose value is a simple algorithm > operating on the value of other fields?
Sort of - function queries. We don't have any conditional function queries yet, but that's easy. You can't yet sort by a function query, but we should fix that. You can't yet facet on a function query, but we should fix that too. Short term, Erick's index the doc twice idea may be best. Long term, out-of-the-box functionality after volunteers help develop out the function query approach :-) -Yonik http://www.lucidimagination.com