server:/solr/select?q=field:"''anything can go here;" --> Lexical error, encountered <EOF> after : "\"\'\'anything can go here" server:/solr/select?q=field:"'anything' anything can go here;" --> Same problem
server:/solr/select?q=field:"'anything' anything can go here\;" --> No problem (but ClientUtils's escape does not escape semicolons.) server:/solr/select?q=field:"anything can go here;" --> no problem server:/solr/select?q=field:"''anything can go here" --> no problem As far as I can tell, two apostrophes, then a semicolon causes the lexical error. There can be text within the apostrophes. If you leave out the semicolon it's ok. But you can keep the semicolon if you remove the two apostrophes. This is on trunk solr.