Re: Using parameter values in a sort

2017-03-01 Thread Erik Hatcher
FYI - I recalled, and located, a solr-user thread from 2015 with subject “Parameter Substitution” with this same issue. Tricky issue - overloaded `${` usage and interpretation time. Erik > On Mar 1, 2017, at 1:41 PM, Erik Hatcher wrote: > > I just found a

Re: Using parameter values in a sort

2017-03-01 Thread Erik Hatcher
I just found a workaround, check out this trick: ${sort_field:${sort_field}} desc when the core is loaded, it looks for a system property “sort_field”, doesn’t find it, and defaults the value to ${sort_field} and voila: /browse?q=*:*=xml_field=id Erik > On Mar 1, 2017,

Re: Using parameter values in a sort

2017-03-01 Thread Erik Hatcher
Walter - Apologies for not trying this sooner first-hand. I’m used to passing in all the params (even the dynamic ${…} ones) in the request these days, not so much putting them into request handler definitions. I finally tried it with a default (master/trunk) with modifying the /browse

Re: Using parameter values in a sort

2017-02-27 Thread Walter Underwood
No, I tried that before adding the default. But the solrconfig.xml is rejected before there is a request, so this is not about requests. I did try “scores” in the requests, but of course it didn’t work because the solrconfig.xml was not loaded. I did not turn off parameter substitutions. This

Re: Using parameter values in a sort

2017-02-27 Thread Erik Hatcher
It looks like you’ve got score/scores mismatching going on. I feel your frustration through e-mail. It’s voodoo for sure, but hopefully it’s just typos that are getting you now. I’d simplify it down to an example like I provided without mixing in any other variables or params (even for

Re: Using parameter values in a sort

2017-02-27 Thread Erik Hatcher
> On Feb 27, 2017, at 9:42 PM, Walter Underwood wrote: > Pretty ready to give up. The documentation around function queries and params > is not working for me, though I’ve been using Solr for ten years. I have > figured out a lot of systems. This is impenetrable. Here’s

Re: Using parameter values in a sort

2017-02-27 Thread Walter Underwood
I added that line because I was getting an error about it being undefined. At this point, I’m just doing random shit hoping it will work. There is not enough documentation to use this. wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) > On Feb

Re: Using parameter values in a sort

2017-02-27 Thread Erik Hatcher
`scores` (plural), you’ve got this below: Remove that, and like my previous e-mail, and use `scores` (plural) from the request and _should_ work? Erik > On Feb 27, 2017, at 9:42 PM, Walter Underwood wrote: > > I’ve passed in a score parameter, but the

Re: Using parameter values in a sort

2017-02-27 Thread Erik Hatcher
And by turning off parameter substitutions I meant disable `expandMacros` - https://cwiki.apache.org/confluence/display/solr/Parameter+Substitution Likely you haven’t and this feature should work. I’d remove `scores`

Re: Using parameter values in a sort

2017-02-27 Thread Walter Underwood
I’ve passed in a score parameter, but the solrconfig.xml is rejected before any requests. Pretty ready to give up. The documentation around function queries and params is not working for me, though I’ve been using Solr for ten years. I have figured out a lot of systems. This is impenetrable.

Re: Using parameter values in a sort

2017-02-27 Thread Erik Hatcher
You have an empty “scores” parameter in there. You’re not showing your full search request, but did you provide that in the request? Have you perhaps turned off parameter substitutions? Erik > On Feb 27, 2017, at 9:26 PM, Walter Underwood wrote: > > With

Re: Using parameter values in a sort

2017-02-27 Thread Walter Underwood
With this in the config… edismax 0 false id, image_thumb_large, image_thumb_medium, image_thumb_small, image_thumb_xlarge, uri, user_id, last_name, first_name, name, school, major, graduation_year, tutor_profile_id,

Re: Using parameter values in a sort

2017-02-27 Thread Erik Hatcher
Walter - How about this, for the latter part of your request: /handler?features=a,b,c with =sum(${features}) desc That ought to do the trick. At first I thought the #foreach nature of the list of features was prohibitive, but since you’re literally plugging in the exact string

Re: Using parameter values in a sort

2017-02-27 Thread Erick Erickson
Hmm, the syntax can be tricky. I'd start with a vanilla solrconfig.xml and get the syntax right just with curl or the browser, _then_ go to trying to embed it in solrconfig.xml. What error are you getting anyway? Erick On Mon, Feb 27, 2017 at 4:17 PM, Walter Underwood

Using parameter values in a sort

2017-02-27 Thread Walter Underwood
We have documents with parameterized features. For a school subject (calculus, accounting), we have three sets of features. So for subject=4 and subject=186, we have: feature_a_4: 0.9 feature_b_4: 1.6 feature_c_4: 8.2 feature_a_186: 3.0 feature_b_186: 2.1 feature_c_186: 99.2 I’d like to pass