<html v="urn:schemas-microsoft-com:vml" o="urn:schemas-microsoft-com:office:office" w="urn:schemas-microsoft-com:office:word" m="http://schemas.microsoft.com/office/2004/12/omml"><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /><meta name="Generator" content="Microsoft Word 12 (filtered medium)" /><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;}
/* 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;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{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></head><body lang="NO-BOK" link="blue" vlink="purple"><p dir="ltr">Hi,</p>
<p dir="ltr">try using the Solr field configuration<br>
<configuration>solr_fields</configuration></p>
<p dir="ltr">For Solr indexes this must reffer an implementation of CmsSolrFieldConfiguration.</p>
<p dir="ltr">Good luck<br>
-Ruediger</p>
<br><br><div class="gmail_quote">On 14. September 2015 15:51:17 MESZ, Paul-Inge Flakstad <flakstad@npolar.no> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<!--[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]--><div class="WordSection1"><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><span lang="EN-US" style="color:#1F497D">a class on the <index> node.<p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><p> </p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I tried using the class used by the default index:<p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <index class=”org.opencms.search.solr.CmsSolrIndex”> <p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><p> </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 matter what I do – even if I query for everything. It’s like nothing’s indexed.
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”.)<p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><p> </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?<p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><p> </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):<p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><p> </p></span></p><p class="MsoNormal"><span lang="EN-US"
style="color:#1F497D"><index class=”org.opencms.search.solr.CmsSolrIndex”><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <name>my_index</name><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <rebuild>auto</rebuild><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <project>Online</project><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <locale>en</locale><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <configuration>standard</configuration><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <sources><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <source>my_source </source><p></p></span></p><p
class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </sources><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <param name="org.opencms.search.CmsSearchIndex.checkTimeRange">false</param><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <param name="search.solr.postProcessor">org.opencms.search.solr.CmsSolrLinkProcessor</param><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"></index><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">...<p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><indexsource><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <name>my_source</name><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <indexer
class="org.opencms.search.CmsVfsIndexer"/><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <resources><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <resource>/sites/default/</resource><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </resources><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <documenttypes-indexed><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <name>html</name><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <name>text</name><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <name>xmlcontent</name><p></p></span></p><p class="MsoNormal"><span lang="EN-US"
style="color:#1F497D"> <name>xmlcontent-solr</name><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> <name>xmlpage</name><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </documenttypes-indexed><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </indexsource><p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><p> </p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Cheers,<p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Paul<p></p></span></p><p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><p> </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>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<p></p></span></p></div></div><p class="MsoNormal"></p><p> </p><p class="MsoNormal"><span lang="EN-US">Hi,<p></p></span></p><p class="MsoNormal"><span lang="EN-US"><p> </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).<p></p></span></p><p class="MsoNormal"><span lang="EN-US"><p> </p></span></p><p class="MsoNormal"><span lang="EN-US">But: How do I “select” a specific index?<p></p></span></p><p
class="MsoNormal"><span lang="EN-US"><p> </p></span></p><p class="MsoNormal"><span lang="EN-US">I have read the doc and tried the “core” parameter, like this:<p></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><p></p></span></p><p class="MsoNormal"><span lang="EN-US"><p> </p></span></p><p class="MsoNormal"><span lang="EN-US">But that just results in a NPE: “No Solr index named: my_index configured.” <p></p></span></p><p class="MsoNormal"><span lang="EN-US"><p> </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.<p></p></span></p><p class="MsoNormal"><span lang="EN-US"><p> </p></span></p><div><p class="MsoNormal"><span
style="font-size:10.0pt;color:#365F91">Med vennlig hilsen,<p></p></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;color:#365F91">Paul-Inge Flakstad<p></p></span></b></p><p class="MsoNormal"><i><span style="font-size:8.0pt;color:#365F91">Webutvikler, Norsk Polarinstitutt<p></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<p></p></span></p></div><p class="MsoNormal"></p><p> </p></div><p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre class="k9mail"><hr /><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 /><br /><br
/></pre></blockquote></div><br>
-- <br>
Diese Nachricht wurde von meinem Mobiltelefon gesendet, bitte entschuldigen Sie etwaige Tippfehler.</body></html>