mirror of https://github.com/apache/lucene.git
SOLR-1323: Reset XPathEntityProcessor's / when fetching next URL
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@800273 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b0094a2ef8
commit
0d3d010633
|
@ -251,6 +251,8 @@ Bug Fixes
|
|||
|
||||
28.SOLR-1286: Fix the commit parameter always defaulting to "true" even if "false" is explicitly passed in.
|
||||
(Jay Hill, Noble Paul via ehatcher)
|
||||
|
||||
29.SOLR-1323: Reset XPathEntityProcessor's $hasMore/$nextUrl when fetching next URL (noble, ehatcher)
|
||||
|
||||
|
||||
Documentation
|
||||
|
|
|
@ -186,17 +186,22 @@ public class XPathEntityProcessor extends EntityProcessorBase {
|
|||
r = getNext();
|
||||
if (r == null) {
|
||||
Object hasMore = context.getSessionAttribute(HAS_MORE, Context.SCOPE_ENTITY);
|
||||
if ("true".equals(hasMore) || Boolean.TRUE.equals(hasMore)) {
|
||||
String url = (String) context.getSessionAttribute(NEXT_URL, Context.SCOPE_ENTITY);
|
||||
if (url == null)
|
||||
url = context.getEntityAttribute(URL);
|
||||
addNamespace();
|
||||
initQuery(resolver.replaceTokens(url));
|
||||
r = getNext();
|
||||
if (r == null)
|
||||
try {
|
||||
if ("true".equals(hasMore) || Boolean.TRUE.equals(hasMore)) {
|
||||
String url = (String) context.getSessionAttribute(NEXT_URL, Context.SCOPE_ENTITY);
|
||||
if (url == null)
|
||||
url = context.getEntityAttribute(URL);
|
||||
addNamespace();
|
||||
initQuery(resolver.replaceTokens(url));
|
||||
r = getNext();
|
||||
if (r == null)
|
||||
return null;
|
||||
} else {
|
||||
return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} finally {
|
||||
context.setSessionAttribute(HAS_MORE,null,Context.SCOPE_ENTITY);
|
||||
context.setSessionAttribute(NEXT_URL,null,Context.SCOPE_ENTITY);
|
||||
}
|
||||
}
|
||||
addCommonFields(r);
|
||||
|
|
Loading…
Reference in New Issue