<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR><o:SmartTagType
name="PersonName"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>st1\:* {
BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>
<!--
/* Font Definitions */
@font-face
{font-family:"News Gothic MT";
panose-1:2 11 5 4 2 2 3 2 2 4;}
/* 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.EstiloCorreo17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
{page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=ES vLink=purple link=blue bgColor=#ffffff>
<DIV><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=Section1><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=juanffernandez@faffe.es href="mailto:juanffernandez@faffe.es">Juan
Francisco Fernández Rodríguez</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=opencms-dev@opencms.org
href="mailto:opencms-dev@opencms.org">'The OpenCms mailing list'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, March 13, 2008 10:08
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [opencms-dev] Custom collector
with parametrized search</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi
list,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>In
my OpenCms system, I have a custom xmlcontent for news that is displayed as a
list, and now I have to allow the user to filter that list by some fields of
the content (title, country, dates, category, some Boolean fields, etc.). I’m
thinking to extend CmsSearchIndex to rebuild the Lucene’s search query to
perform a search in the fields specified by the user. Is this the best
solution? <o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE>
<DIV class=MsoNormal><FONT face=Arial><FONT size=2><FONT face=Arial size=2><SPAN
lang=EN-GB style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>If the number of
documents is relatively small, as was our case, you can do it just by
defining a standard index on the relevant folder(s), perform the
standard search on the system attributes (i.e. title, keywords, content,
etc) and then filtering the result looking into each document for the other
filter attributes. Not very performant, but simple and not that bad for small
sets.</o:p></SPAN></FONT></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial><FONT size=2><FONT face=Arial size=2><SPAN
lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT> </DIV>
<DIV class=MsoNormal><FONT face=Arial><FONT size=2><FONT face=Arial size=2><SPAN
lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>Pere</o:p></SPAN></FONT></FONT></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial><FONT size=2><FONT face=Arial size=2><SPAN
lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></FONT></FONT> </DIV></BODY></HTML>