Hi i know we look to create at index time however all values are dynamic
if(exists(query(COUNTRY:(22 33 44)),100,20),INCOME<http://devjs.infoedge.com:8080/solr/select?q=*:*&fq=GENDER:FEMALE&sort=sum(if(exists(query(AGE:22)),100,20),INCOME> ) IS NOT WORKING ALSO I NEED NESTED IF On Thu, Jul 26, 2012 at 8:48 PM, Erik Hatcher-4 [via Lucene] < ml-node+s472066n3997464...@n3.nabble.com> wrote: > How dynamic are those numbers? If this expression can be computed at > index time into a "sort_order" field, that'd be best. Otherwise, if these > factors are truly dynamic at run-time, look at the function query sorting > capability here: < > http://wiki.apache.org/solr/FunctionQuery#Sort_By_Function> and build up > the expression from there. I still encourage you to aim towards computing > as much of this at index-time as possible to minimize the functions (and > thus caches) you need at query time. > > Erik > > On Jul 26, 2012, at 03:47 , lavesh wrote: > > > am working on solr for search. I required to perform a expression sort > such > > that > > > > ORDER BY (IF(COUNTRY=1,100,0) + > IF(AVAILABLE=2,1000,IF(AVAILABLE=1,60,0)) + > > IF (DELIVERYIN IN (5,6,7),100,IF (DELIVERYIN IN (80,90),50,0))) DESC > > > > can anyone tell me hows is this possible? > > > > > > > > -- > > View this message in context: > http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3997369.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3997369p3997464.html > To unsubscribe from Expression Sort in Solr, click > here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3997369&code=bGF2ZXNoLnJhd2F0QGdtYWlsLmNvbXwzOTk3MzY5fDYyODA2MjY2MQ==> > . > NAML<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- "Never explain yourself. Your friends don’t need it and your enemies won’t believe it" . -- View this message in context: http://lucene.472066.n3.nabble.com/Expression-Sort-in-Solr-tp3997369p3997475.html Sent from the Solr - User mailing list archive at Nabble.com.