[
https://issues.apache.org/jira/browse/SOLR-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14272335#comment-14272335
]
Erik Hatcher edited comment on SOLR-4512 at 1/10/15 4:33 AM:
-------------------------------------------------------------
I'm going to close with this technique as my recommendation for making
parameters "sticky" to any request handler.
Here's how the data driven config defines the /browse handler:
{code}
<requestHandler name="/browse" class="solr.SearchHandler"
useParams="query,facets,velocity,browse">
{code}
These param sets get defined in /conf/params.json, which can be done through
API calls like this:
{code}
curl http://localhost:8983/solr/films/config/params -H
'Content-type:application/json' -d '{
"update" : {
"facets": {
"facet.field":"genre"
}
}
}'
{code}
Using this technique allows not only params to be used across request handlers,
but makes this "sticky" desire in /browse straightforward to deal with. I left
an empty/undefined "browse" param set in there that can be used to attach UI
only types of parameters, such as this:
{code}
curl http://localhost:8983/solr/films/config/params -H
'Content-type:application/json' -d '{
"set" : {
"browse": {
"hl":"on",
"hl.fl":"name"
}
}
}'
{code}
was (Author: ehatcher):
I'm going to close this ticket as wont-fix with this technique as my
recommendation for making parameters "sticky" to any request handler.
Here's how the data driven config defines the /browse handler:
{code}
<requestHandler name="/browse" class="solr.SearchHandler"
useParams="query,facets,velocity,browse">
{code}
These param sets get defined in /conf/params.json, which can be done through
API calls like this:
{code}
curl http://localhost:8983/solr/films/config/params -H
'Content-type:application/json' -d '{
"update" : {
"facets": {
"facet.field":"genre"
}
}
}'
{code}
Using this technique allows not only params to be used across request handlers,
but makes this "sticky" desire in /browse straightforward to deal with. I left
an empty/undefined "browse" param set in there that can be used to attach UI
only types of parameters, such as this:
{code}
curl http://localhost:8983/solr/films/config/params -H
'Content-type:application/json' -d '{
"set" : {
"browse": {
"hl":"on",
"hl.fl":"name"
}
}
}'
{code}
> /browse GUI: Extra URL params should be sticky
> ----------------------------------------------
>
> Key: SOLR-4512
> URL: https://issues.apache.org/jira/browse/SOLR-4512
> Project: Solr
> Issue Type: Improvement
> Components: contrib - Velocity
> Reporter: Jan Høydahl
> Assignee: Erik Hatcher
> Fix For: 5.0, Trunk
>
>
> Sometimes you want to experiment with extra query parms in Velocity
> "/browse". But if you modify the URL it will be forgotten once you click
> anything in the GUI.
> We need a way to make them sticky, either generate all the links based on the
> current actual URL, or add a checkbox which reveals a new input field where
> you can write all the extra params you want appended
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]