<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:"Consolas","serif";
mso-fareast-language:DE;}
span.E-MailFormatvorlage19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Deiverson,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">if you are using Lucene, you can create an index for each site.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">And then set the index in your search JSP.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">e.g. like
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">org.opencms.search.CmsSearch.setIndex(indexName);
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">AFAIK OpenCms provides a property “search.index”. You could use that to read the index you need. Or set it hard coded in your template, depending
on the site you are in (not recommended).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">HTH<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Kai<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<b>Im Auftrag von </b>Deiverson Silveira<br>
<b>Gesendet:</b> Freitag, 3. Oktober 2014 20:54<br>
<b>An:</b> The OpenCms mailing list<br>
<b>Betreff:</b> Re: [opencms-dev] How can search general in more perspective/multisite?<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Fabian,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you for attention.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I don't use Solr, you know how can make this using Lucene? I use traditional Lucene, I think this case is already a good opportunity to use Solr and leave the Lucene.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I try set my object with project "/" but entry conflit in mysite because perspective:<br>
<br>
CmsObject cmsObject = cms.getCmsObject();<br>
CmsProject cmsproject = cmsObject.readProject("Offline");<br>
cmsObject.getRequestContext().setCurrentProject(cmsproject);<br>
cmsObject.getRequestContext().setSiteRoot("/");<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">and:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">search.init(cmsproject);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Regards,<br>
<br>
Deiverson<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2014-10-01 8:57 GMT-03:00 <a href="mailto:fhsubscriptions@componio.net">
fhsubscriptions@componio.net</a> <<a href="mailto:fhsubscriptions@componio.net" target="_blank">fhsubscriptions@componio.net</a>>:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Deiverson,<br>
<br>
you can set the "parent sites" in the Solr query to enable search across different sites.
<br>
<br>
Regards,<br>
<br>
\Fabian<br>
<br>
Am 01.10.2014 13:24, schrieb Deiverson Silveira:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi List,<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I have problem.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I have multisites, and I have search general, I need search /sites/siteA/news/ and /sites/siteB/news/.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I stay perspective /sites/siteA/, dont see /sites/siteB/<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">My search don´t work because perspective, how can solved this problem?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I need help,<o:p></o:p></p>
</div>
<p class="MsoNormal">Regards,<br>
<br>
Deiverson<br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><br>
-- <i><o:p></o:p></i></p>
<div>
<div>
<div>
<p class="MsoNormal"><i><a href="http://www.solutioncms.com" target="_blank">www.solutioncms.com</a><o:p></o:p></i></p>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><i>The Brazilian <o:p></o:p></i></p>
<div>
<div>
<p class="MsoNormal"><i>Official Provider OpenCms<o:p></o:p></i></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
</div>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>This mail is sent to you from the opencms-dev mailing list<o:p></o:p></pre>
<pre>To change your list options, or to unsubscribe from the list, please visit<o:p></o:p></pre>
<pre><a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <i><o:p></o:p></i></p>
<div>
<div>
<div>
<p class="MsoNormal"><i><a href="http://www.solutioncms.com" target="_blank">www.solutioncms.com</a><o:p></o:p></i></p>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><i>The Brazilian <o:p></o:p></i></p>
<div>
<div>
<p class="MsoNormal"><i>Official Provider OpenCms<o:p></o:p></i></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>