On Mon, Jul 16, 2012 at 4:43 AM, maurizio1976 <maurizio.picc...@gmail.com> wrote: > Yes, > sorry Just a typo. > I meant > q=*:*&fq=&start=0&rows=10&qt=&wt=&explainOther=&fl=product:(if(show_product:true, > product, "") > thanks
Functions normally derive their values from the fieldCache... there isn't currently a function to load stored fields (e.g. your "product" field"), but it's not a bad idea (given this usecase). Here's an example with the exampledocs that shows IN_STOCK_PRICE only if the item is in stock, and otherwise shows 0. This works because price is a single-valued indexed field that the fieldCache works on. http://localhost:8983/solr/query? q=*:* &fl=id, inStock, IN_STOCK_PRICE:if(inStock,price,0) -Yonik http://lucidimagination.com