wam 2003/09/18 00:11:46
Modified: src/share/org/apache/slide/search/basic
BasicQueryEnvelope.java
Log:
put eror of last subquery to envelope
take max-depth (in web-xml) into account
Revision Changes Path
1.6 +14 -6
jakarta-slide/src/share/org/apache/slide/search/basic/BasicQueryEnvelope.java
Index: BasicQueryEnvelope.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/share/org/apache/slide/search/basic/BasicQueryEnvelope.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- BasicQueryEnvelope.java 3 Jun 2003 07:05:02 -0000 1.5
+++ BasicQueryEnvelope.java 18 Sep 2003 07:11:46 -0000 1.6
@@ -177,7 +177,10 @@
throws BadQueryException
{
//topLevelQuery.parseQueryElement (basicSearchElement, propertyProvider);
- queryDepth = topLevelQueryScope.getDepth();
+ // queryDepth = topLevelQueryScope.getDepth();
+
+ // WAM restrict depth to what is defined in web.xml
+ queryDepth = Math.min (topLevelQueryScope.getDepth(), token.getMaxDepth());
Iterator it = subQueries.keySet().iterator();
while (it.hasNext()) {
@@ -220,7 +223,12 @@
BasicQuery query = (BasicQuery)subQueries.get (scope);
query.setScope (calculateSubQueryScope(scope));
- result.add (query.execute());
+ SearchQueryResult subResult = query.execute();
+ result.add (subResult);
+ if (subResult.getStatus() != 0) {
+ result.setStatus (subResult.getStatus());
+ result.setDescription (subResult.getDescription());
+ }
}
return result;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]