[Yanel-commits] rev 57553 - public/yanel/trunk/src/contributions/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost
michi at wyona.com
michi at wyona.com
Mon Mar 28 11:21:17 CEST 2011
Author: michi
Date: 2011-03-28 11:21:17 +0200 (Mon, 28 Mar 2011)
New Revision: 57553
Modified:
public/yanel/trunk/src/contributions/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost/PersonalizedContentResource.java
Log:
also check last modified
Modified: public/yanel/trunk/src/contributions/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost/PersonalizedContentResource.java
===================================================================
--- public/yanel/trunk/src/contributions/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost/PersonalizedContentResource.java 2011-03-28 09:20:08 UTC (rev 57552)
+++ public/yanel/trunk/src/contributions/resources/personalized-content/src/java/org/wyona/yanel/impl/resources/boost/PersonalizedContentResource.java 2011-03-28 09:21:17 UTC (rev 57553)
@@ -51,9 +51,11 @@
if (userInterests != null && userInterests.length > 0) {
for (int k = 0; k < userInterests.length; k++) {
String query = userInterests[k];
- String queryInclModDate = userInterests[k] + " AND mod_date:[" + df.format(lastAccess) + " TO " + df.format(new Date()) + "]"; // INFO: See http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#Range%20Searches
+ //String queryInclModDate = userInterests[k] + " AND mod_date:[" + df.format(lastAccess) + " TO " + df.format(new Date()) + "]"; // INFO: See http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#Range%20Searches
+ String queryInclModDate = userInterests[k] + " AND yarep_lastModified:[" + lastAccess.getTime() + " TO " + new Date().getTime() + "]"; // INFO: See http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#Range%20Searches
log.warn("DEBUG: Query: " + queryInclModDate);
- org.wyona.yarep.core.Node[] nodes = getRealm().getRepository().getSearcher().search(query);
+ //org.wyona.yarep.core.Node[] nodes = getRealm().getRepository().getSearcher().search(query);
+ org.wyona.yarep.core.Node[] nodes = getRealm().getRepository().getSearcher().search(queryInclModDate);
if (nodes != null && nodes.length > 0) {
for (int i = 0; i < nodes.length; i++) {
org.w3c.dom.Element result = doc.createElementNS(NAMESPACE, "result");
@@ -98,4 +100,11 @@
java.text.DateFormat df = new java.text.SimpleDateFormat("yyyy.MM.dd");
return df.parse("2011.02.16");
}
+
+ /**
+ * @see org/wyona/yanel/core/api/attributes/ViewableV2#exists()
+ */
+ public boolean exists() throws Exception {
+ return true;
+ }
}
More information about the Yanel-commits
mailing list