You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To seach over pages of a seperate database, I implemented a special indexer which adds them to the index of vfs resources.
The problem is, that the paging isn't working correctly.
Seems to be a bug in CmSolrIndex (line 840ff):
for (inti = 0; (i < queryResponse.getResults().size()) && (cnt < end); i++) {
try {
SolrDocumentdoc = queryResponse.getResults().get(i);
CmsSolrDocumentsearchDoc = newCmsSolrDocument(doc);
if (needsPermissionCheck(searchDoc)) {
// only if the document is an OpenCms internal resource perform the permission checkCmsResourceresource = getResource(searchCms, searchDoc);
if (resource != null) {
// permission check performed successfully: the user has read permissions!if (cnt >= start) {
if (m_postProcessor != null) {
doc = m_postProcessor.process(
searchCms,
resource,
(SolrInputDocument)searchDoc.getDocument());
}
resourceDocumentList.add(newCmsSearchResource(resource, searchDoc));
if (null != doc) {
solrDocumentList.add(doc);
}
maxScore = maxScore < searchDoc.getScore() ? searchDoc.getScore() : maxScore;
}
allDocs.add(newCmsSearchResource(resource, searchDoc));
cnt++;
} else {
visibleHitCount--;
}
} else {
// if permission check is not required for this index,// add a pseudo resource together with document to the resultsresourceDocumentList.add(newCmsSearchResource(PSEUDO_RES, searchDoc));
solrDocumentList.add(doc);
maxScore = maxScore < searchDoc.getScore() ? searchDoc.getScore() : maxScore;
}
} catch (Exceptione) {
// should not happen, but if it does we want to go on with the next result neverthelessLOG.warn(Messages.get().getBundle().key(Messages.LOG_SOLR_ERR_RESULT_ITERATION_FAILED_0), e);
}
}
When needsPermissionCheck(searchDocs) returns false, variable cnt isn't incremented, so finally the size of resourceDocumentList is wrong.
The text was updated successfully, but these errors were encountered:
To seach over pages of a seperate database, I implemented a special indexer which adds them to the index of vfs resources.
The problem is, that the paging isn't working correctly.
Seems to be a bug in CmSolrIndex (line 840ff):
When
needsPermissionCheck(searchDocs)
returns false, variablecnt
isn't incremented, so finally the size ofresourceDocumentList
is wrong.The text was updated successfully, but these errors were encountered: