Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@tobias-graf-p
Copy link

I use the SolrConnection.cs class directly for some features currently not supported by SolrNet (e.g. Suggester). While doing so, I run into the situation, that SolrNet sent requests like the following to Solr server:

http://...:8983/suggest?...&wt=json&wt=xml&version=2.2

I set the wt param to "json", but both xml and json were included in the request url. In addition the xml version was included.

I found out, that issue #508 and pr #509 already addressed the first issue but fixed it only in SolrConnection class (but not in SolrAutoConnection class).

This pr is about the following:

  • only fallback to wt=xml if wt was not set by the caller also in AutoSolrConnection
  • only set version if wt is set to xml since version specifies the xml protocol version (see Solr docs)

What I am not sure about:

  • Is is correct, that the fix from pr remove the hardcoding of wt=xml by allowing the wt query param to be … #509 also should be applied in AutoSolrConnection class?
  • Should the same logic also be applied in SolrPostConnection class (see line 65)? This is not included in this pull request.
  • Should tests be modified or completed? (WithWtJson_Get() expects wt=json and version=2.2 and run through in my branch using my modifications but I didn't understand why.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.