mirror of https://github.com/apache/lucene.git
SOLR-2245: Don't use the default date from dataimport.properties and remove duplicated entry in mail-data-config.xml
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1610893 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
09bb6ddad1
commit
2169e473bb
|
@ -108,10 +108,19 @@ public class MailEntityProcessor extends EntityProcessorBase {
|
|||
String varName = ConfigNameConstants.IMPORTER_NS_SHORT + "." + cname + "."
|
||||
+ DocBuilder.LAST_INDEX_TIME;
|
||||
Object varValue = context.getVariableResolver().resolve(varName);
|
||||
if ("1970-01-01 00:00:00".equals(varValue) &&
|
||||
!"".equals(getStringFromContext("fetchMailsSince", ""))) {
|
||||
// favor fetchMailsSince in this case because the value from
|
||||
// dataimport.properties is the default/init value
|
||||
varValue = getStringFromContext("fetchMailsSince", "");
|
||||
}
|
||||
|
||||
LOG.info(varName+"="+varValue);
|
||||
if (varValue == null || "".equals(varValue)) {
|
||||
varName = ConfigNameConstants.IMPORTER_NS_SHORT + "."
|
||||
+ DocBuilder.LAST_INDEX_TIME;
|
||||
varValue = context.getVariableResolver().resolve(varName);
|
||||
LOG.info(varName+"="+varValue);
|
||||
}
|
||||
|
||||
if (varValue != null && varValue instanceof String) {
|
||||
|
|
|
@ -10,15 +10,3 @@
|
|||
name="mail_entity"/>
|
||||
</document>
|
||||
</dataConfig>
|
||||
<dataConfig>
|
||||
<document>
|
||||
<!--
|
||||
Note - In order to index attachments, set processAttachement="true" and drop
|
||||
Tika and its dependencies to example-DIH/solr/mail/lib directory
|
||||
-->
|
||||
<entity processor="MailEntityProcessor" user="email@gmail.com"
|
||||
password="password" host="imap.gmail.com" protocol="gimaps"
|
||||
fetchMailsSince="2014-06-30 00:00:00" batchSize="20" folders="inbox" processAttachement="false"
|
||||
name="mail_entity"/>
|
||||
</document>
|
||||
</dataConfig>
|
||||
|
|
Loading…
Reference in New Issue