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

Reply via email to