Solr has implemented from version 4 the !join query.

I'd like to know if the following  case is possible.
For example, we have documents of the following form:
   doc1:
        field1:123
        field2:A
        field3:456
   doc2:
       field1:123
       field2:B
       field3:789
    doc3:
       field1:23456
       field2:A
       field3:264

We need to retrieve all the documents that the field field2 equals to
B and no other document with the same field field1 value containing
the field field2 with value A.

In SQL this can be done with the operation "not in": select * from doc
where field2 = 'B' and field1 not in (select field1 from doc where
field2 = 'A')

The join operator is the equivalent of the SQL in operator.

Can we use the solr join or another function to implements our needs?

Thanks

Reply via email to