0

I'm using SolrNet and when I pass a query that has a colon in it, I receive this error:

Apache Tomcat/6.0.32 - Error report
The request sent by the client was syntactically incorrect (null).

The code sample looks like this:

var results = SolrOps.Query(request.Query, new QueryOptions
            {
                SpellCheck = new SolrNet.Commands.Parameters.SpellCheckingParameters
                {
                    Collate = true,
                    Build = true,
                    Query = "test:"

                }

            });

Am I required to strip the colon manually, or is there some option I can set (either in SOLR or SOLRNet) to fix this?

Doug
  • 14,387
  • 17
  • 74
  • 104
  • Why do you have a colon in your query? – Paige Cook Sep 19 '12 at 18:19
  • It's a user generated query. I'm spell checking their input to see if there's a good replacement. FYI, this only seems to happen on SpellChecking, not on regular queries. – Doug Sep 20 '12 at 14:42

1 Answers1

0

I am thinking that spellchecking does not support special characters and you will need to filter/strip those out of the query term(s) prior to submitting the request to Solr via SolrNet.

Paige Cook
  • 22,415
  • 3
  • 57
  • 68