<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 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@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:11.0pt;
font-family:"Calibri","sans-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;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle24
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle25
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 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=NO-BOK link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hi Rüdiger,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks for this info, I think we’re getting down to the core issue now.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I don’t have a configured detail page. (I’m using the pre-containerpage approach => No formatters / container pages / detail pages.) All my xmlcontent resources have the “template-elements” property set, where the rendering template is defined. Just like the good old days :)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Any further clues?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Paul<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org] <b>On Behalf Of </b>Rüdiger Kurz<br><b>Sent:</b> 15. september 2015 18:41<br><b>To:</b> The OpenCms mailing list<br><b>Subject:</b> Re: [opencms-dev] Solr query specific index<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Hi Paul,<o:p></o:p></p><p>do you have configured a detail page for the xml content type you want to index? As far as I know xmlcontents that are not associated with a detail container, are not indexed.<o:p></o:p></p><p>If you want to index images, put them to the <indexsourece>:<br><name>image</name><o:p></o:p></p><p>regards<br>-Ruediger<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>On 15. September 2015 11:51:34 MESZ, Paul-Inge Flakstad <<a href="mailto:flakstad@npolar.no">flakstad@npolar.no</a>> wrote:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hi Rüdiger,<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks for your suggestion, but this doesn’t seem to work for me.<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>When using <configuration>solr_fields</configuration> (the existing field configuration that references CmsSolrFieldConfiguration), things sort of “work”, but not for xmlcontent.<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>In my test folder, which contains various resource types, only PDFs and zip files were indexed. I mages and xmlcontent were skipped. I have no idea why.<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Tried adding the “xmlcontent” document type (in addition to the already existing xmlcontent-solr) in the source configuration, but it made no difference.<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Anyway, thanks for your help :)<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Paul<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> <a href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a> [<a href="mailto:opencms-dev-bounces@opencms.org">mailto:opencms-dev-bounces@opencms.org</a>] <b>On Behalf Of </b>Rüdiger Kurz<br><b>Sent:</b> 14. september 2015 22:56<br><b>To:</b> The OpenCms mailing list<br><b>Subject:</b> Re: [opencms-dev] Solr query specific index<o:p></o:p></span></p></div></div><p> <o:p></o:p></p><p>Hi,<o:p></o:p></p><p>try using the Solr field configuration<br><configuration>solr_fields</configuration><o:p></o:p></p><p>For Solr indexes this must reffer an implementation of CmsSolrFieldConfiguration.<o:p></o:p></p><p>Good luck<br>-Ruediger<o:p></o:p></p><p> <o:p></o:p></p><div><p class=MsoNormal>On 14. September 2015 15:51:17 MESZ, Paul-Inge Flakstad <<a href="mailto:flakstad@npolar.no">flakstad@npolar.no</a>> wrote:<o:p></o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>OK, so after some more careful reading, I understand that need to define</span><span lang=EN-US> <span style='color:#1F497D'>a class on the <index> node.<o:p></o:p></span></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I tried using the class used by the default index:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <index class=”org.opencms.search.solr.CmsSolrIndex”> <o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>This made the NPE go away, but I got zero results no m atter what I do – even if I query for everything. It’s like nothing’s index ed. Re-building made no difference. On a side note: When I tested applying this class on the index that’s used in the “regular” site search – the index I’m actually trying to work with here – it broke. (Front-end searching just resulted in “Server error unknown”.)<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I have no idea what I’m doing wrong here. :/ Do I have to write a custom class? Define the index/source differently?<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>My source consists of (mostly) xmlcontent. Here is what I tried so far (did not work):<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><index class=”org.opencms.search.solr.CmsSolrIndex”><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <name>my_index</name><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <rebuild>auto</rebuild><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <project>Online</project><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <locale>en</locale><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <configuration>standard</configuration><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <sources><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <source>my_source </source><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </sources><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <param name="org.opencms.search.CmsSearchIndex.checkTimeRange">false</param><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <param name="search.solr.postProcessor">org.opencms.search.solr.CmsSolrLinkProcessor</param><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'></index><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><indexsource><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <name>my_source</name><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <indexer class="org.opencms.search.CmsVfsIndexer"/><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <resources><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <resource>/sites/default/</resource><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </resources><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <documenttypes-indexed><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <name>html</name><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <name>text</name><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <name>xmlcontent</name><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <name>xmlcontent-solr</name><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> <name>xmlpage</name><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> </documenttypes-indexed><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'></indexsource><o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Paul<o:p></o:p></span></p><p><span lang=EN-US style='color:#1F497D'> <o:p></o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> <a href="mailto:opencms-dev-bounces@opencms.org">opencms-dev-bounces@opencms.org</a> [<a href="mailto:opencms-dev-bounces@opencms.org">mailto:opencms-dev-bounces@opencms.org</a>] <b>On Behalf Of </b>Paul-Inge Flakstad<br><b>Sent:</b> 14. september 2015 13:22<br><b>To:</b> The OpenCms mailing list<br><b>Subject:</b> [opencms-dev] Solr query specific index<o:p></o:p></span></p></div></div><p> <o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p><p><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I’d like to query a couple of OpenCms search indices (on an 8.5.2 instance) “directly” via the handleSolrSelect URI (or equivalent).<o:p></o:p></span></p><p><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>But: How do I “select” a specific index?<o:p></o:p></span></p><p><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I have read the doc and tried the “core” parameter, like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><a href="http://myhost.com:8080/myopencms/opencms/handleSolrSelect?q=something&core=my_index">http://myhost.com:8080/myopencms/opencms/handleSolrSelect?q=something&core=my_index</a><o:p></o:p></span></p><p><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>But that just results in a NPE: “No Solr index named: my_index configured.” <o:p></o:p></span></p><p><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>PS: The handleSolrSelect URI works, but so far I can’t use it to query anything but the default index.<o:p></o:p></span></p><p><span lang=EN-US> <o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;color:#365F91'>Med vennlig hilsen,<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;color:#365F91'>Paul-Inge Flakstad<o:p></o:p></span></b></p><p class=MsoNormal><i><span style='font-size:8.0pt;color:#365F91'>Webutvikler, Norsk Polarinstitutt<o:p></o:p></span></i></p><p class=MsoNormal><span style='font-size:8.0pt;color:#365F91'><a href="mailto:flakstad@npolar.no"><span style='color:#365F91'>flakstad@npolar.no</span></a> | 777 50 639<o:p></o:p></span></p></div><p> <o:p></o:p></p><pre style='text-align:center'><hr size=2 width="100%" align=center></pre><pre style='margin-bottom:12.0pt'><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">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><br><br><o:p></o:p></pre></div></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br>-- <br>Diese Nachricht wurde von meinem Mobiltelefon gesendet, bitte entschuldigen Sie etwaige Tippfehler.<o:p></o:p></span></p></div></body></html>