Re: Is it possible to do an if statement in a Solr query?

2012-09-14 Thread Gustav
Hello Hoss! The case here would be: if total result set contains any original medicines X, then remove all generic medicines Y such that Y is a generic form of X. In your example and in my case, the result should be Vaxidrop + Generipill -- View this message in context:

Re: Is it possible to do an if statement in a Solr query?

2012-09-14 Thread Chris Hostetter
: Hello Hoss! : The case here would be: if total result set contains any original medicines : X, : then remove all generic medicines Y such that Y is a generic form of X. : : In your example and in my case, the result should be Vaxidrop + Generipill then wunder's suggestion of grouping on the

Re: Is it possible to do an if statement in a Solr query?

2012-09-13 Thread Gustav
Walter Underwood wrote You may be able to do this with grouping. Group on the medicine family, and only show the Original if there are multiple items in the family. wunder On Sep 12, 2012, at 2:09 PM, Gustav wrote: Hello everyone, I'm working on an e-commerce website and using Solr

Re: Is it possible to do an if statement in a Solr query?

2012-09-13 Thread Chris Hostetter
: 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

Is it possible to do an if statement in a Solr query?

2012-09-12 Thread Gustav
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

Re: Is it possible to do an if statement in a Solr query?

2012-09-12 Thread Walter Underwood
You may be able to do this with grouping. Group on the medicine family, and only show the Original if there are multiple items in the family. wunder On Sep 12, 2012, at 2:09 PM, Gustav wrote: Hello everyone, I'm working on an e-commerce website and using Solr as my Search Engine, im really

Re: Is it possible to do an if statement in a Solr query?

2012-09-12 Thread Jack Krupansky
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.

Re: Is it possible to do an if statement in a Solr query?

2012-09-12 Thread Amit Nithian
If the fact that it's original vs generic is a field is_original 0/1 can you sort by is_original? Similarly, could you put a huge boost on is_original in the dismax so that document matches on is_original score higher than those that aren't original? Or is your goal to not show generics *at all*?