Solr 使用空白字符和通配符进行精确搜索 [英] Solr exact search with blank character AND a wildcard

查看:60
本文介绍了Solr 使用空白字符和通配符进行精确搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 solr 搜索时遇到问题.我想搜索一个字符串,里面有一个空白字符,最后是一个通配符.我发现的唯一方法是将字符串放在引号中.但是如果我喜欢这个并且我不能在最后放一个通配符.

I got a problem with solr search. I want to search a string with a blank character within and a wildcard in the end. the only way that i found was to put the string in quotes. but if I do like this and i can´t put a wildcard in the end.

那么有什么办法可以搜索foo bar"* 吗?

so is there any way i can search for "foo bar"* ?

感谢您的提示!

推荐答案

你可以尝试转义空格 field:foo\ bar*

通配符查询 :-
请注意,引号内不支持通配符.它们将被视为空白.

Wildcard Queries :-
Note that wildcards are not supported within quoted phrases. They will be treated as if they were white space.

这篇关于Solr 使用空白字符和通配符进行精确搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆