[opencms-dev] Bug in CmsSearchIndex
Rainer Vehns
vehns at codecentric.de
Tue Aug 9 23:50:28 CEST 2005
Hello all,
I think there is a bug in the CmsSearchIndex-class, but perhaps the
behaviour is desired (due to efficiency):
We have implemented a site with public and non-public areas using the
OpenCms access control mechanisms. We have indexed the whole site (including
public and non-public areas) for searching and everything works well, except
the search result count.
If the search term produces search results from the public and the
non-public areas, the number of results
(org.opencms.search.CmsSearch.getSearchResultCount()) corresponds to the
total number of hits, not only the number of hits the user has really
read-access to. For example that means, a normal (not authenticated) user
sees a total count of 20 hits for the search term, but he only sees 5
documents in the list (which are the only documents he has access to).
With a patch to the class CmsSearchIndex, this could be fixed, but you have
to iterate over all search results each time (efficient?).
What do you mean?
I have attached a patch (based on build_6_0_0) and the modified source of
CmsSearchIndex.
Kind regards,
Rainer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050809/5ae2c43a/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: searchPatch.txt
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050809/5ae2c43a/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CmsSearchIndex.java
Type: application/octet-stream
Size: 29395 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050809/5ae2c43a/attachment.obj>
More information about the opencms-dev
mailing list