}
Iterator contentMetaNames = content.getMetaNames().iterator();
while (contentMetaNames.hasNext()) {
String metaName = (String) contentMetaNames.next();
MetaInfo metaInfo = (MetaInfo) content.getMetaInfo(metaName);
if (metaInfo == null) {
throw new WGSystemException("MetaInfo for meta '" + metaName + "' not found.");
}
if (!metaInfo.isLuceneSpecialTreatment() && !metaInfo.getLuceneIndexType().equals(MetaInfo.LUCENE_INDEXTYPE_NOINDEX)) {
addMeta(document, metaInfo, content.getMetaData(metaName));
} else {
if (metaInfo.getName().equals(WGContent.META_IS_HIDDEN_FROM)) {
// split hidden from
List isHiddenFrom = content.isHiddenFrom();
addKeyword(document, "HIDDENINNAV", Boolean.valueOf(isHiddenFrom.contains(WGContent.DISPLAYTYPE_NAVIGATOR)), metaInfo.getLuceneBoost());
addSortField(document, "HIDDENINNAV", Boolean.valueOf(isHiddenFrom.contains(WGContent.DISPLAYTYPE_NAVIGATOR)));
addKeyword(document, "HIDDENINSEARCH", Boolean.valueOf(isHiddenFrom.contains(WGContent.DISPLAYTYPE_SEARCH)), metaInfo.getLuceneBoost());
addSortField(document, "HIDDENINSEARCH", Boolean.valueOf(isHiddenFrom.contains(WGContent.DISPLAYTYPE_SEARCH)));
addKeyword(document, "HIDDENINSITEMAP", Boolean.valueOf(isHiddenFrom.contains(WGContent.DISPLAYTYPE_SITEMAP)), metaInfo.getLuceneBoost());
addSortField(document, "HIDDENINSITEMAP", Boolean.valueOf(isHiddenFrom.contains(WGContent.DISPLAYTYPE_SITEMAP)));
} else if (metaInfo.getName().equals(WGContent.META_VALID_FROM)) {
// bugfix B00003432 by tb 10.03.2006
if (content.getValidFrom() != null) {
addKeyword(document, WGContent.META_VALID_FROM, content.getValidFrom(), metaInfo.getLuceneBoost());
addSortField(document, WGContent.META_VALID_FROM, content.getValidFrom());
} else {
// index not set validFrom as 00000 ...
addKeyword(document, WGContent.META_VALID_FROM, EMPTY_VALID_FROM, metaInfo.getLuceneBoost());
addSortField(document, WGContent.META_VALID_FROM, EMPTY_VALID_FROM);
}
} else if (metaInfo.getName().equals(WGContent.META_VALID_TO)) {
// bugfix B00003432 by tb 10.03.2006
if (content.getValidTo() != null) {
addKeyword(document, WGContent.META_VALID_TO, content.getValidTo(), metaInfo.getLuceneBoost());
addSortField(document, WGContent.META_VALID_TO, content.getValidTo());
} else {
// index not set validTo as 99999...
addKeyword(document, WGContent.META_VALID_TO, EMPTY_VALID_TO, metaInfo.getLuceneBoost());
addSortField(document, WGContent.META_VALID_TO, EMPTY_VALID_TO);
}
}
}
}