2

Is there, in SOLR, a way to use values from outer query in inner query.

Basically what i want to do, is to compare two documents

I have made SQL equivalent query. But no idea how to implement in SOLR

select * from Versions v1
    where 1=1
    and v1.ItemId in (select ItemId from Versions where v1.ItemId = ItemId AND v1.Checksum != Checksum  AND [From] <= '2016-01-01' and [To] >= '2016-01-01')
    and v1.[From] <= '2015-01-01' and s1.[To] >= '2015-01-01'

As a result i would get all version which have actually change between given time range

Tom Harrison
  • 13,533
  • 3
  • 49
  • 77
maxlego
  • 4,864
  • 3
  • 31
  • 38
  • Have you tried these [Solr join examples](https://wiki.apache.org/solr/Join)? – heenenee Jan 12 '16 at 18:08
  • This isn't a real answer, but check https://lucidworks.com/blog/2009/03/31/nested-queries-in-solr/ -- you might also google for "solr correlated subquery" – Tom Harrison Jan 16 '16 at 21:48

0 Answers0