开发者

Searching for Quotes, Brackets, and Newlines in Solr

开发者 https://www.devze.com 2023-03-22 06:59 出处:网络
I\'ve got a problem. I accidentally put some garbage in my index that looks like this: [ \"\" ] That\'s space, newline, left bracket, newline, space, space, quote, quote, newline, right bracket.开发

I've got a problem. I accidentally put some garbage in my index that looks like this:

[
  ""
]

That's space, newline, left bracket, newline, space, space, quote, quote, newline, right bracket.开发者_如何学Go

I'm using Solr.StrField for this field. I have tried every possible combination of escape characters, url encodings, etc to try to query for documents that have this field, but nothing seems to work.

Does anybody know how I could query for a string like this?


First escape the characters followed by encoding the query string. "\ \n[\n\ \ \"\"\n]" should be encoded. First try from the browser without encoding.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号