[opencms-dev] Solr query specific index
Schliemann, Kai
K.Schliemann at comundus.com
Mon Sep 14 16:34:29 CEST 2015
Hi Paul,
I don't have an answer for your question, but maybe this hint helps you?
Did you check your solr cores with LUKE - https://code.google.com/p/luke/?
With Luke you can check if and what information are in your index.
HTH
Best regards
Kai
Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Paul-Inge Flakstad
Gesendet: Montag, 14. September 2015 15:51
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] Solr query specific index
OK, so after some more careful reading, I understand that need to define a class on the <index> node.
I tried using the class used by the default index:
<index class="org.opencms.search.solr.CmsSolrIndex">
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".)
I have no idea what I'm doing wrong here. :/ Do I have to write a custom class? Define the index/source differently?
My source consists of (mostly) xmlcontent. Here is what I tried so far (did not work):
<index class="org.opencms.search.solr.CmsSolrIndex">
<name>my_index</name>
<rebuild>auto</rebuild>
<project>Online</project>
<locale>en</locale>
<configuration>standard</configuration>
<sources>
<source>my_source </source>
</sources>
<param name="org.opencms.search.CmsSearchIndex.checkTimeRange">false</param>
<param name="search.solr.postProcessor">org.opencms.search.solr.CmsSolrLinkProcessor</param>
</index>
...
<indexsource>
<name>my_source</name>
<indexer class="org.opencms.search.CmsVfsIndexer"/>
<resources>
<resource>/sites/default/</resource>
</resources>
<documenttypes-indexed>
<name>html</name>
<name>text</name>
<name>xmlcontent</name>
<name>xmlcontent-solr</name>
<name>xmlpage</name>
</documenttypes-indexed>
</indexsource>
Cheers,
Paul
From: opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Paul-Inge Flakstad
Sent: 14. september 2015 13:22
To: The OpenCms mailing list
Subject: [opencms-dev] Solr query specific index
Hi,
I'd like to query a couple of OpenCms search indices (on an 8.5.2 instance) "directly" via the handleSolrSelect URI (or equivalent).
But: How do I "select" a specific index?
I have read the doc and tried the "core" parameter, like this:
http://myhost.com:8080/myopencms/opencms/handleSolrSelect?q=something&core=my_index
But that just results in a NPE: "No Solr index named: my_index configured."
PS: The handleSolrSelect URI works, but so far I can't use it to query anything but the default index.
Med vennlig hilsen,
Paul-Inge Flakstad
Webutvikler, Norsk Polarinstitutt
flakstad at npolar.no<mailto:flakstad at npolar.no> | 777 50 639
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150914/a9a5d44f/attachment.htm>
More information about the opencms-dev
mailing list