LocalParams
is really just a Dictionary<string, string>
behind the scenes.
However, I want to pass multiple Boost Queries, which use the key "bq". Obviously, any attempt to add my second "bq" key will fail with An item with the same key has already been added.
var lp = new LocalParams();
lp.Add("bq", "ContentType:Update^3.0");
lp.Add("bq", "ContentType:Comment^0.5"); // Error occurs here...
What's the trick to passing multiple Boost Queries (or multiple anything, really)...
The comment above set me onto ExtraParams.
I thought it wouldn't work since that was a
Dictionary<string, string>
(thus leaving me in the same situation), but the actual property definition isIEnumerable<KeyValuePair<string, string>>
. It's just set to aDictionary<string,string>
in the constructor.So I did this:
My testing shows that it works as intended.