Reputation: 18541
Currently my query defines the returned fields names .
http://127.0.0.1:8983/solr/.../select?q=wor&start=0&rows=100&fl=..%2C+...%2C+...%2...&qf=fieldA^1.1+fieldB&wt=json&indent=false&defType=edismax&stopwords=true&lowercaseOperators=true&hl=true&hl.simple.pre=<em>&hl.simple.post=</em>&omitHeader=true
Is it possible to omit the fl parameter ?
(add it to the config file, instead of request)
can I replace my qf parameter if it contains a ratio ("1.1" in the example)? how?
I have seen in the documentation that the requestHandler has an append element that you can append anything to the queries.
<lst name="appends">
Is it a better practice to use it ?
Upvotes: 1
Views: 741
Reputation: 4284
<lst name="defaults"> <str name="fl">field1,field2</str> </lst>
if you move your filter query into the normal q query then you don't need the filter anymore. It may change performances though.
you can use appends and is not unusual and is done pretty much in the same way as the default I showed at point 1. but that will apply to every single query that you make on that field and you will have no control over that from a query
Upvotes: 1
Reputation: 52799
Solr requesthanlder definition allows you to define
defaults :- Add the params which defaults to the values and would need not be provided with the request URL. These params can however be overridden if the params are passed with the request. So add the fl parameter here if it is fixed so that it need not be specified with the Request URL everytime
invariants :- Params cannot be overridden. This params are locked by Solr and cannot be changed.
appends :- Params will be appended additionally to the ones passed by the User.
Upvotes: 1