Import delta Solr nie działa
Używam solr 4.2. Zauważ, że pełny import działa, ale jakoś import delta nie. Import delta nie daje żadnego błędu, ale nigdy nie pobiera żadnych zmian. Oto plik konfiguracyjny danych.
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver:testsql;databaseName=test"
user="dba"
password="dba"/>
<script>
<![CDATA[
function metadataTransformer (row) {
var attributeName = row.get("attribute_name");
var attributeValue = row.get("attribute_value");
row.put(attributeName, attributeValue);
return row;
}
]]>
</script>
<document name="PRODUCTS">
<entity name="product" query="select distinct p.product_id as id from products p
inner join products_meta pm on p.product_id = pm.product_id
inner join meta m on pm.meta_id = m.meta_id
where m.meta_type_id = 11 order by id desc"
deltaImportQuery="select distinct p.product_id as id from products p
inner join products_meta pm on p.product_id = pm.product_id
inner join meta m on pm.meta_id = m.meta_id
where m.meta_type_id = 11 and p.product_id='${dih.delta.product_id}'"
deltaQuery= "select distinct product_id as id from products
where updtime > '${dih.last_index_time}'">
<field column="id" name="id"/>
<entity name="attribute" query="select attribute_name,attribute_value from solr_import
where id =${product.id}" transformer= "script:metadataTransformer">
</entity>
</entity>
</document>
</dataConfig>
Oto, co próbowałem bez szczęścia.
zmiana p.product_id = '$ {dih.delta.product_id} na p.product_id =' $ {dih.delta.id} oraz w inny sposób. zmiana gdzie updtime> '$ {dih.last_index_time}' "do gdzie updtime> '$ {dih.last_index_time}'"
Proszę pomóż.