<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=DE link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'>Hello all,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'>I think there is a bug in the CmsSearchIndex-class,
but perhaps the behaviour is desired (due to efficiency):<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'>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.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'>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).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'>With a patch to the class CmsSearchIndex, this could
be fixed, but you have to iterate over all search results each time (efficient?).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'>What do you mean?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'>I have attached a patch (based on build_6_0_0) and the
modified source of CmsSearchIndex.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'>Kind regards,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
11.0pt;font-family:Arial'>Rainer<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

</div>

</body>

</html>