我在solr中使用特殊字符进行搜索时遇到问题.我的文档有一个字段"标题",有时它可能像"泰坦尼克号 - 1999"(它有字符" - ").当我尝试使用" - "搜索solr时,我收到400错误.我试图逃避角色,所以我尝试了类似" - "和"\ - "的东西.有了这个改变,solr没有响应我的错误,但它返回0结果.
如何在solr管理员中搜索该特殊字符(类似" - "或"'"???
问候
更新 在这里你可以看到我目前的solr方案https://gist.github.com/cpalomaresbazuca/6269375
我的搜索是"标题"字段.
摘自schema.xml:
...
<!-- A general text field that has reasonable, generic
cross-language defaults: it tokenizes with StandardTokenizer,
removes stop words from case-insensitive "stopwords.txt"
(empty by default), and down cases. At query time only, it
also applies synonyms. -->
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
<!-- in this example, we will only use synonyms …Run Code Online (Sandbox Code Playgroud) 我已经将项目插入到treeview带有标签选项的 Python 中。
tree.insert("", 'end', 'item1', text='item1', tags=('new',))
Run Code Online (Sandbox Code Playgroud)
以后是否可以将标签更改"new"为其他内容?