Hi, A work around could be to add columns from the second table as fields to the Solr document from the first table. E.g. For DB query:
SELECT project_id FROM projects MINUS SELECT project_id FROM archived_project; Add archived_projects as a boolean field to Projects in Solr & then query as: q=(*:* -archived_projects:true) Regards, Aloke On Sun, Jun 2, 2013 at 9:27 PM, Bala <balaraju.kagid...@gmail.com> wrote: > Thanks for the info Shawn. > > > On Sun, Jun 2, 2013 at 6:22 AM, Shawn Heisey-4 [via Lucene] < > ml-node+s472066n4067630...@n3.nabble.com> wrote: > > > On 6/1/2013 10:32 AM, Bala wrote: > > > Can somebody tell me if i can achieve SQL MINUS query in solr . here is > > > Sample SQL MINUS query. Need how to get the same in solr > > > > > > select field1, field2, ... field_n > > > from tables > > > MINUS > > > select field1, field2, ... field_n > > > from tables; > > > > I had to look up what this meant. New versions of Solr do have some > > *limited* join capability that also works between cores. It looks like > > currently it only works for matching, not excluding: > > > > http://wiki.apache.org/solr/Join > > > > > http://stackoverflow.com/questions/12665797/is-solr-4-0-capable-of-using-join-for-multiple-core > > > > It's currently not possible to do mass comparisons between separate Solr > > indexes in any way that would give you MINUS. You could probably write > > the capability in client code, but it would not be efficient. > > > > Solr is not designed to replace relational databases, and in fact works > > best with a completely flattened schema. Relational database software > > is designed to do a lot of things very efficiently that are difficult or > > impossible in a search-oriented system. > > > > If you come up with a way to modify Solr to add this capability, > > patches are always welcome. > > > > Thanks, > > Shawn > > > > > > > > ------------------------------ > > If you reply to this email, your message will be added to the discussion > > below: > > > > > http://lucene.472066.n3.nabble.com/SQL-MINUS-equivalent-in-solr-tp4067569p4067630.html > > To unsubscribe from SQL MINUS equivalent in solr, click here< > http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4067569&code=YmFsYXJhanUua2FnaWRhbGFAZ21haWwuY29tfDQwNjc1Njl8OTkwNDY1MDI1 > > > > . > > 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 > > > > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/SQL-MINUS-equivalent-in-solr-tp4067569p4067650.html > Sent from the Solr - User mailing list archive at Nabble.com. >