My Solr data source is an SQL database where the primary key is a composite (i.e. two fields).
This is normal for my main DIH query , I just concatenate the fields and becomes my main Solr key. However, it is not clear from the documentation how I will write a delta import request to support this.
The documentation assumes that I need two queries - one for finding the primary key of the changed rows, and the other for actually receiving the individual documents corresponding to each of these keys. There is no example showing this for compound keys.
Ideally, I donβt want these two separate queries at all, it would reduce the database load if the two queries were simply combined, so the only difference between query and deltaQuery is the WHERE that the filters are based on last_changed .
So, if my main query :
SELECT key1 || key2 as pk FROM table
What do the corresponding deltaQuery (and / or deltaImportQuery ) look like?
I tried just adding the WHERE , but after starting the query, I got a warning about missing deltaImportQuery and then deltaImportQuery null pointer.
solr dih
Alnitak
source share