You could implement a custom "search component" with that logic, if you
don't mind the complexity of writing Java code that runs inside the Solr
environment. Otherwise, just implement that logic in your app. Or, or
implement an "app server" which sits between Solr and your app.
http://wiki.apache.org/solr/SearchComponent
-- Jack Krupansky
-----Original Message-----
From: Gustav
Sent: Wednesday, September 12, 2012 5:09 PM
To: solr-user@lucene.apache.org
Subject: Is it possible to do an "if" statement in a Solr query?
Hello everyone, I'm working on an e-commerce website and using Solr as my
Search Engine, im really enjoying its funcionality and the search
options/performance.
But i am stucky in a kinda tricky cenario... That what happens:
I Have a medicine web-store, where i indexed all necessary products in my
Index Solr.
But when i search for some medicine, following my business rules, i have to
verify if the result of my search contains any Original medicine, if there
is any, then i wouldn't show the generics of this respective medicine, on
the other hand, if there wasnt any original product in the result i would
have to return its generics.
Im currently returning the original and generics, is there a way to do this
kind of "checking" in solr?
Thanks! :)
--
View this message in context:
http://lucene.472066.n3.nabble.com/Is-it-possible-to-do-an-if-statement-in-a-Solr-query-tp4007311.html
Sent from the Solr - User mailing list archive at Nabble.com.