У меня есть 2 индекса с именами index1 и index2, я хочу вернуть все поля из index2 на основе полей даты, доступных в обоих индексах за последний промежуток времени?
Список использованных URL:
http://localhost:8983/solr/index2/select?q=*:*&fl=updated_dt&fq={!join from=article_no to=article_no fromIndex=index1}store_s:SFCC&(dt:[2019-05-03 TO *] OR updated_dt:[2019-05-05 TO *]
http://localhost:8983/solr/index2/select?q=*:*&fl=article_no,updated_dt&fq={!join from=article_no to=article_no fromIndex=index1}store_s:SFCC&(dt:[2019-04-08 TO *] OR updated_dt:[2019-05-05 TO *]
http://localhost:8983/solr/index2/select?q=updated_dt:[2019-04-08T01:00:00Z TO *]&fl=article_no,updated_dt&fq={!join from=article_no to=article_no fromIndex=index1}store_s:SFCC&sort=updated_dt asc
http://localhost:8983/solr/index2/select?q=*:*&fl=article_no,updated_dt&fq=(store_s:SFCC AND dt:[2019-04-08T01:00:00Z TO *]) AND updated_dt:[2018-11-05T01:00:00Z TO *]&sort=updated_dt asc&collection=index2,index1
http://localhost:8983/solr/JoinResult/select?q=*:*&fl=article_no,updated_dt&fq=store_s:SFCC&fq=((dt:[2019-04-08 TO *]) OR (updated_dt:[2018-11-05T00:00:00Z TO *]))
http://localhost:8983/solr/JoinResult/select?q=*:*&fl=article_no,updated_dt&fq=store_s:SFCC&fq=((dt:[2019-04-08T01:00:00Z TO *]) OR (updated_dt:[2018-11-05T01:00:00Z TO *]))
http://localhost:8983/solr/JoinResult/select?&q={!join from=article_no to=article_no v=$q1} OR {!join from=article_no to=article_no v=$q2}
&q1=store_s:SFCC AND dt:[2019-04-08T01:00:00Z TO *]&q2=updated_dt:[2018-11-05T00:00:00Z TO *]
http://localhost:8983/solr/JoinResult/select?q=*:*&fq=((dt:[2019-04-08 TO *]) AND (updated_dt:[2018-04-05T00:00:00Z TO *]))
index1 DATA
{
"ecom`":"TRUE",
"dt":"2019-04-29",
"str":"SFCCLOAD",
"article_no":"FTW10001"},
{
"com":"TRUE",
"dt":"2019-04-30",
"str":"SFCCLOAD",
"article_no":"FTW1206"},
{
"com":"TRUE",
"dt":"2019-05-03",
"str":"SFCCLOAD",
"article_no":"FTW1207"},
{
"com":"TRUE",
"dt":"2019-05-03",
"str":"SFCCLOAD",
"article_no":"FTW1208"},
{
"com":"TRUE",
"str":"SFCCLOAD",
"dt":"2019-04-20",
"article_no":"FTW1210"}
index2 DATA
{
"parent":"Parent01",
"updated_dt":"2019-05-04",
"article_no":"FTW1207"},
{
"parent":"Parent02",
"updated_dt":"2019-05-05",
"article_no":"FTW1208"},
{
"parent":"Parent02",
"updated_dt":"2019-05-05",
"article_no":"FTW1209"},
{
"parent":"Parent03",
"updated_dt":"2019-05-05",
"article_no":"FTW1210"}
Ожидается, что из второго индекса (FTW1207, FTW1208, FTW1210)
и тот же SQL-запрос:
select article_no,updated_dt
from Index2
where updated_dt > 2018-11-05
and article_no in (select article_no from Index1 where str='SFCC' and dt > 2019-04-08)