#solr
#solr
Вопрос:
У меня проблема во время переноса данных. Я использую solr 3.3 на Tomcat 7 и пытаюсь получить данные с MS SQL Server 2008. Я выполнил настройку DHI без каких-либо проблем, и DHI уже работал. Это был объект, который я использовал для импорта:
<entity name="hhh" query="Select
tbl_hhh.ID,
tbl_hhh.ID_breed,
tbl_hhh.ID_Color,
tbl_hhh.ID_sex,
tbl_verkauf.VD,
tbl_verkauf.Basisfornegation,
tbl_verkauf.Price_Euros AS Price,
tbl_verkauf.Buisiness,
tbl_verkauf.LastEdit,
tbl_verkauf.Date,
tbl_hhh.Temperament,
tbl_hhh.Age AS Age,
tbl_hhh.Name,
C_tbl_weight.weight_g,
C_tbl_handshigh.handshigh_cm,
tbl_hhh.ID_description,
f1.Name As f1Name ,
m1.Name As m1Name ,
ff2.Name As ff2Name ,
fm2.Name As fm2Name ,
fff3.Name As fff3Name ,
FFM3.Name As FFM3Name ,
FMF3.Name As FMF3Name ,
FMM3.Name As FMM3Name ,
MF2.Name As MF2Name ,
MM2.Name As MM2Name ,
MFF3.Name As MFF3Name ,
MFM3.Name As MFM3Name ,
MMF3.Name As MMF3Name ,
MMM3.Name As MM3Name
From
tbl_verkauf Inner Join
tbl_hhh On tbl_verkauf.ID_Hhh = tbl_hhh.ID Inner Join
C_tbl_weight On tbl_hhh.ID_Weight = C_tbl_weight.ID Inner Join
C_tbl_handshigh On tbl_hhh.ID_handshigh = C_tbl_handshigh.ID
left outer Join
A_tbl_ancestry as f1 On tbl_hhh.ID_ancestry_F1 = f1.ID
left outer Join
A_tbl_ancestry as m1 On tbl_hhh.ID_ancestry_M1 = m1.ID
left outer Join
A_tbl_ancestry as ff2 On tbl_hhh.ID_ancestry_FF2 = ff2.ID
left outer Join
A_tbl_ancestry as fm2 On tbl_hhh.ID_ancestry_FM2 = fm2.ID
left outer Join
A_tbl_ancestry as fff3 On tbl_hhh.ID_ancestry_FFF3 = fff3.ID
left outer Join
A_tbl_ancestry as FFM3 On tbl_hhh.ID_ancestry_FFM3 = FFM3.ID
left outer Join
A_tbl_ancestry as FMF3 On tbl_hhh.ID_ancestry_FMF3 = FMF3.ID
left outer Join
A_tbl_ancestry as FMM3 On tbl_hhh.ID_ancestry_FMM3 = FMM3.ID left outer Join
A_tbl_ancestry as MF2 On tbl_hhh.ID_ancestry_MF2 = MF2.ID left outer Join
A_tbl_ancestry as MM2 On tbl_hhh.ID_ancestry_MM2 = MM2.ID left outer Join
A_tbl_ancestry as MFF3 On tbl_hhh.ID_ancestry_MFF3 = MFF3.ID left outer Join
A_tbl_ancestry as MFM3 On tbl_hhh.ID_ancestry_MFM3 = MFM3.ID left outer Join
A_tbl_ancestry as MMF3 On tbl_hhh.ID_ancestry_MMF3 = MMF3.ID
left outer Join
A_tbl_ancestry as MMM3 On tbl_hhh.ID_ancestry_MMM3 = MMM3.ID
">
</entity>
Теперь я добавил несколько вложенных объектов:
<entity name="hhh" query="Select
tbl_hhh.ID,
tbl_hhh.ID_breed,
tbl_hhh.ID_Color,
tbl_hhh.ID_sex,
tbl_verkauf.VD,
tbl_verkauf.Basisfornegation,
tbl_verkauf.Price_Euros AS Price,
tbl_verkauf.Buisiness,
tbl_verkauf.LastEdit,
tbl_verkauf.Date,
tbl_hhh.Temperament,
tbl_hhh.Age AS Age,
tbl_hhh.Name,
C_tbl_weight.weight_g,
C_tbl_handshigh.handshigh_cm,
tbl_hhh.ID_description,
f1.Name As f1Name ,
m1.Name As m1Name ,
ff2.Name As ff2Name ,
fm2.Name As fm2Name ,
fff3.Name As fff3Name ,
FFM3.Name As FFM3Name ,
FMF3.Name As FMF3Name ,
FMM3.Name As FMM3Name ,
MF2.Name As MF2Name ,
MM2.Name As MM2Name ,
MFF3.Name As MFF3Name ,
MFM3.Name As MFM3Name ,
MMF3.Name As MMF3Name ,
MMM3.Name As MM3Name
From
tbl_verkauf Inner Join
tbl_hhh On tbl_verkauf.ID_Hhh = tbl_hhh.ID Inner Join
C_tbl_weight On tbl_hhh.ID_Weight = C_tbl_weight.ID Inner Join
C_tbl_handshigh On tbl_hhh.ID_handshigh = C_tbl_handshigh.ID
left outer Join
A_tbl_ancestry as f1 On tbl_hhh.ID_ancestry_F1 = f1.ID
left outer Join
A_tbl_ancestry as m1 On tbl_hhh.ID_ancestry_M1 = m1.ID
left outer Join
A_tbl_ancestry as ff2 On tbl_hhh.ID_ancestry_FF2 = ff2.ID
left outer Join
A_tbl_ancestry as fm2 On tbl_hhh.ID_ancestry_FM2 = fm2.ID
left outer Join
A_tbl_ancestry as fff3 On tbl_hhh.ID_ancestry_FFF3 = fff3.ID
left outer Join
A_tbl_ancestry as FFM3 On tbl_hhh.ID_ancestry_FFM3 = FFM3.ID
left outer Join
A_tbl_ancestry as FMF3 On tbl_hhh.ID_ancestry_FMF3 = FMF3.ID
left outer Join
A_tbl_ancestry as FMM3 On tbl_hhh.ID_ancestry_FMM3 = FMM3.ID left outer Join
A_tbl_ancestry as MF2 On tbl_hhh.ID_ancestry_MF2 = MF2.ID left outer Join
A_tbl_ancestry as MM2 On tbl_hhh.ID_ancestry_MM2 = MM2.ID left outer Join
A_tbl_ancestry as MFF3 On tbl_hhh.ID_ancestry_MFF3 = MFF3.ID left outer Join
A_tbl_ancestry as MFM3 On tbl_hhh.ID_ancestry_MFM3 = MFM3.ID left outer Join
A_tbl_ancestry as MMF3 On tbl_hhh.ID_ancestry_MMF3 = MMF3.ID
left outer Join
A_tbl_ancestry as MMM3 On tbl_hhh.ID_ancestry_MMM3 = MMM3.ID
">
<entity name="Miscellaneous" processor="CachedSqlEntityProcessor" query="Select
M_tbl_hhh_miscellaneous.ID_Miscellaneous
From
M_tbl_hhh_miscellaneous
where deleted = 'false' and M_tbl_hhh_miscellaneous.ID_Hhh = '${hhh.ID}'
">
<field column="ID_Miscellaneous" name="ID_Miscellaneous" />
</entity>
<entity name="Success_Dressage" processor="CachedSqlEntityProcessor" query="Select
L_tbl_cattegory_discipline_local.Name As Dressage_success
From
L_tbl_success Inner Join
L_tbl_discipline On L_tbl_success.ID_discipline = L_tbl_discipline.ID
Inner Join
L_tbl_cattegory_discipline On L_tbl_discipline.ID_cattegory_discipline =
L_tbl_cattegory_discipline.ID Inner Join
L_tbl_cattegory_discipline_local On
L_tbl_cattegory_discipline_local.ID_cattegory_discipline =
L_tbl_cattegory_discipline.ID
Where
L_tbl_cattegory_discipline_local.ID_local = '2' And
L_tbl_success.ID_Hhh = '${hhh.ID}' And
L_tbl_success.deleted = 'false' And
L_tbl_discipline.ID_cattegory = '3'
Group By
L_tbl_cattegory_discipline_local.Name
">
</entity>
<entity name="Success_Jumping" processor="CachedSqlEntityProcessor" query="Select
L_tbl_cattegory_discipline_local.Name As Jumping_success
From
L_tbl_success Inner Join
L_tbl_discipline On L_tbl_success.ID_discipline = L_tbl_discipline.ID
Inner Join
L_tbl_cattegory_discipline On L_tbl_discipline.ID_cattegory_discipline =
L_tbl_cattegory_discipline.ID Inner Join
L_tbl_cattegory_discipline_local On
L_tbl_cattegory_discipline_local.ID_cattegory_discipline =
L_tbl_cattegory_discipline.ID
Where
L_tbl_cattegory_discipline_local.ID_local = '2' And
L_tbl_success.ID_Hhh = '${hhh.ID}' And
L_tbl_success.deleted = 'false' And
L_tbl_discipline.ID_cattegory = '4'
Group By
L_tbl_cattegory_discipline_local.Name
">
</entity>
<entity name="Success_Eventing" processor="CachedSqlEntityProcessor" query="Select
L_tbl_cattegory_discipline_local.Name As Eventing_success
From
L_tbl_success Inner Join
L_tbl_discipline On L_tbl_success.ID_discipline = L_tbl_discipline.ID
Inner Join
L_tbl_cattegory_discipline On L_tbl_discipline.ID_cattegory_discipline =
L_tbl_cattegory_discipline.ID Inner Join
L_tbl_cattegory_discipline_local On
L_tbl_cattegory_discipline_local.ID_cattegory_discipline =
L_tbl_cattegory_discipline.ID
Where
L_tbl_cattegory_discipline_local.ID_local = '2' And
L_tbl_success.ID_Hhh = '${hhh.ID}' And
L_tbl_success.deleted = 'false' And
L_tbl_discipline.ID_cattegory = '5'
Group By
L_tbl_cattegory_discipline_local.Name
">
</entity>
<entity name="Success_Draghunting" processor="CachedSqlEntityProcessor" query="Select
L_tbl_cattegory_discipline_local.Name As Draghunting_success
From
L_tbl_success Inner Join
L_tbl_discipline On L_tbl_success.ID_discipline = L_tbl_discipline.ID
Inner Join
L_tbl_cattegory_discipline On L_tbl_discipline.ID_cattegory_discipline =
L_tbl_cattegory_discipline.ID Inner Join
L_tbl_cattegory_discipline_local On
L_tbl_cattegory_discipline_local.ID_cattegory_discipline =
L_tbl_cattegory_discipline.ID
Where
L_tbl_cattegory_discipline_local.ID_local = '2' And
L_tbl_success.ID_Hhh = '${hhh.ID}' And
L_tbl_success.deleted = 'false' And
L_tbl_discipline.ID_cattegory = '6'
Group By
L_tbl_cattegory_discipline_local.Name
">
</entity>
</entity>
Первые 3 также работали, но с того момента, как я добавил 4-е, окно отладки dhi остается пустым. Не имеет значения, какой из объектов я удаляю или добавляю, 4-й всегда является проблемой.
Я заглянул в журнал, там было только сообщение:
14.10.2011 13:39:33 org.apache.solr.handler.dataimport.DataImporter verifyWithSchema INFO: Lastedэто обязательное поле в SolrSchema. Но не найдено в DataConfig
Существует ли ограничение на количество вложенных объектов? Или другая причина, по которой не выполняется отладочный импорт?
Большое спасибо!!!