Reputation: 67
I'm using Solr 6.1.0 and not use cloud mode,
I has add searchhandler in solrconfig.xml and it's work, can see the search results
But when I use this searchhandler and add query in URL it'll error
Like this :
This is my searchhandler:
<requestHandler name="/contentsearch" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="wt">json</str>
<str name="indent">true</str>
<str name="defType">edismax</str>
<str name="qf">
title^100.0 content^80.0 text^5.0
</str>
<str name="q">*:*</str>
<str name="indent">true</str>
<str name="rows">10</str>
<!-- Facet settings -->
<str name="facet">on</str>
<str name="facet.field">content_type</str>
<str name="facet.field">category</str>
<str name="facet.field">author</str>
<str name="facet.field">editor</str>
<str name="facet.field">source_type</str>
<str name="hl">on</str>
<str name="hl.fl">title content</str>
<str name="hl.preserveMulti">true</str>
</lst>
<arr name="last-components">
<str>elevator</str>
</arr>
</requestHandler>
Error message :
=========================================================================
Problem accessing /solr/testcorec/contentsearch. Reason:\n
Not Found\n\n\n","code":404}}
When I use solr default searchhandlr and query url it'll work Like this :
does anyone know what's different?
and why it does not work?
Thanks
Upvotes: 0
Views: 458
Reputation: 1953
Add highlighting parameters to URL.
Add hl=on and hl.fl=field_name to your url
ex:
hl.fl=title&hl=on&indent=on&q=test
Upvotes: 1