Vladimir,

Think of Solr/Lucene index as a single, flat, denormalized table, where the 
"columns" are called "fields".

client_id:walmart
client_name:Walmart
client_parent_id:walmart

The query that I think you are looking for then becomes:

+client_id:walmart -client_parent_id:walmart


Otis 
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Hadoop ecosystem search :: http://search-hadoop.com/



----- Original Message ----
> From: Vladimir Sutskever <vladimir.sutske...@jpmorgan.com>
> To: "solr-user@lucene.apache.org" <solr-user@lucene.apache.org>
> Sent: Tue, March 23, 2010 3:36:42 PM
> Subject: Solr Self-Join Query
> 
> Hi Guys/Gals,


I have columns like so in my index

> 
client_id,
client_name,
client_parent_id


Does SOLR support 
> queries of self-join.

Example:

client_name:wallmart AND 
> (client_parent_id!=client_id)

I need all entries that match "wallmart" 
> and do NOT have client_parent_id==client_id

Thank you for your 
> help
-Vladimir
This email is confidential and subject to important 
> disclaimers and
conditions including on offers for the purchase or sale 
> of
securities, accuracy and completeness of information, 
> viruses,
confidentiality, legal privilege, and legal entity 
> disclaimers,
available at 
> href="http://www.jpmorgan.com/pages/disclosures/email"; target=_blank 
> >http://www.jpmorgan.com/pages/disclosures/email.

Reply via email to