0
私はsolrを新しくしました。 db-data-configと管理スキーマのすべてのフィールドでクエリを定義しましたが、solrを実行するとEntityに何もありません。ソリティアにエンティティ名が表示されません
これはdb-data-configファイル内のsqlクエリです。
<entity name="Ticket" pk="ID" query="SELECT DISTINCT t.component_id,
DATE(t.createddate)
AS callLogDate,
dm.dealercode,
dm.name1,
t.ticketnumber,
ibm.ibasecustomername,
ibm.contactpersonmobile1,
ibm.pincode,
ibm.city,
divm.name1_lastname
AS Division,
pgm.productgroupdescription,
pm.productname,
mm.modeldesc, mm.modelcode,
fsr.OBLIGATIONTYPE_ID,
t.problemdescription
AS ProblemDescription,
DATE(t.createddate)
AS Call_Log_Date,
TIME (t.createddate)
AS CallLoggingTime,
CONCAT(CONCAT(MONTH(t.createddate), '-'),
(YEAR(t.createddate))) AS
CALLLOG_MMYYYY,
(SELECT Max(TDS.updatedon) AS DISPATCHED_DATE_AND_TIME
FROM serveit.ticketdetails TDS
WHERE TDS.status_id = 1001
AND t.ticket_id = tds.ticket_id),
(SELECT Min(TDS.updatedon) AS Response_Call_Date_And_Time
FROM serveit.ticketdetails TDS
WHERE TDS.status_id = 1042
AND t.ticket_id = tds.ticket_id),
(SELECT Min(TIME(TDS.updatedon)) AS Response_Call_Time
FROM serveit.ticketdetails TDS
WHERE TDS.status_id = 1042
AND t.ticket_id = tds.ticket_id),
(SELECT
Max(TDS.RESPONSE_SCHEDULED) AS Last_Response_Scheduled_Date_And_Time
FROM serveit.ticketdetails TDS
WHERE TDS.status_id = 1042
AND t.ticket_id = tds.ticket_id),
(SELECT Max(TDS.updatedon) AS Resolved_Date_And_Time
FROM serveit.ticketdetails TDS
WHERE TDS.status_id = 1009
AND t.ticket_id = tds.ticket_id),
(SELECT Max(TDS.updatedon) AS Closed_Date_And_Time
FROM serveit.ticketdetails TDS
WHERE TDS.status_id = 1014
AND t.ticket_id = tds.ticket_id),
t.tat,
fsr.fsrnumber,
fsr.technicianname,
wkm.work_type
AS Worktype_code,
(SELECT Sum(fa.amount)
FROM serveit.fsramountcollected fa
WHERE fa.fsr_id = FSR.fieldservicereport_id
GROUP BY fa.fsr_id)
AS AMOUNT,
rd.symptom,rd.DEFECT , rd.ACTIONTAKEN,
dm.name1,
dm.city
AS Location,
CONCAT(CONCAT(emp.name1, ' '), emp.name2)
AS SDE_NAME,
t.payout_rate
AS Call_Amount,
t.travel_allowance_rate
AS Travel_Amount,
(t.payout_rate + t.travel_allowance_rate)
AS Total_Amount,
cds.productserialnumber,t.CALL_TYPE_ID , fsr.MODEL_ID
FROM serveit.ticket t
INNER JOIN serveit.ticketdetails td
ON t.ticket_id = td.ticket_id
INNER JOIN serveit.dealermaster dm
ON dm.dealer_id = td.dealer_id
INNER JOIN serveit.productmaster pm
ON pm.product_id = td.product_id
INNER JOIN serveit.productgroupmaster pgm
ON pm.productgroup_id = pgm.productgroup_id
INNER JOIN serveit.divisionmaster divm
ON divm.division_id = pgm.SALESDIVISION_ID
INNER JOIN serveit.fieldservicereport fsr
ON fsr.ticket_id = t.ticket_id
INNER JOIN serveit.employeemaster emp
ON td.sde_id = emp.employee_id
INNER JOIN serveit.cdaufdetails cds
ON cds.ticket_id = t.ticket_id
INNER JOIN serveit.modelmaster mm
ON mm.MODEL_ID=fsr.MODEL_ID
INNER JOIN serveit.ibasemaster ibm
ON ibm.ibase_id = t.ibase_id
INNER JOIN (SELECT rds.FIELDSERVICEREPORT_ID, Max(rds.RESOLUTION_ID) as res_ID
FROM serveit.resolutiondetails rds group by rds.FIELDSERVICEREPORT_ID) DFSR on Dfsr.FIELDSERVICEREPORT_ID = fsr.FIELDSERVICEREPORT_ID
INNER JOIN serveit.resolutiondetails rd ON DFSR.res_ID = rd.RESOLUTION_ID
inner JOIN serveit.work_type_master wkm
ON wkm.id = t.work_type_id
WHERE t.call_type_id <> 30 and t.SCENARIONUMBER in ('1','2')
AND td.status_id = 1014;
"/>
なぜエンティティがsolrに表示されないのか分かりません。
実際にはクエリの最後の2行目に<>があり、solrではサポートされていません。 solrの!=で表される等価ではありません。これにより問題が解決されます。 –