gpt4 book ai didi

linux - 短语中的特殊字符即使被 "quotation marks"包围也会产生错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:19:28 25 4
gpt4 key购买 nike

我有以下代码:

curl -X GET http://localhost:9200/INDEXED REPOSITORY/_search -d '{"query": {"constant_score": {"filter" : {"terms" : {"description" : ["adam attack stokes","adam stokes attacks","adam-stokes attacks","adam-stokes syndrome","adams attack stoke","adams stoke syndrome","adams stokes attack","adams stokes syndrome","adams-stokes","adams-stokes syndrome","adams-stokes; attack","attack; adams-stokes","attack; stokes-adams","attacks adam-stokes","attacks stokes-adams","morgagni\s disease","morgagni-adam\s stokes syndrome","morgagni-stokes-adams","spens\ syndrome","stoke adams syndrome","stokes adams attack","stokes adams attacks","stokes adams syndrome","stokes-adams","stokes-adams attack","stokes-adams attacks","stokes-adams syndrome","stokes-adams-morgagni syndrome","stokes-adams; attack","syndrome adams-stokes","syndrome stokes-adams","syndrome adams-stokes","syndrome stokes-adams","3-12 anginal syndromes","angina","angina of effort","angina pain","angina pectoris","angina syndrome","angina cardiac","anginal discomfort","anginal pain","anginal syndrome","anginal syndromes","anginal; syndrome","anginas","angor pectoris","ap - angina pectoris","cardiac angina","cardio/pulm: angina","chest pain - cardiac","chest pain ischemic","chest; pain ischemic","ischaemic chest pain","ischaemic heart disease - angina","ischaemic ht dis - angina","ischemic chest pain","ischemic heart disease - angina","ischemic ht dis - angina","pain angina","pain; chest ischemic","pectoris angina","stenocardia","stenocardias","syndrome; anginal","angina pectoris variant","angina pectoris; variant","angina prinzmetal","angina variant","angina variant <prinzmetal>","angina variant prinzmetal","angina prinzmetal","angina prinzmetal\s","coronary artery spasm angina","prinzmetal angina","prinzmetal variant angina","prinzmetal\s angina","prinzmetal; angina","prinzmetals angina","variant angina","variant angina pectoris","variant; angina","vasospastic angina","angina at rest","angina pectori unstable","angina pectoris unstable","angina pectoris unstable","angina pectoris; at rest","angina pectoris; crescendo","angina pectoris; unstable","angina unstable","angina preinfarction","angina unstable","anginal chest pain at rest","anginas preinfarction","anginas unstable","coronary; syndrome","crescendo angina","crescendo angina pectoris","crescendo; angina","impending infarction","intermed coronary synd","intermediate coronary syndrome","intermediate coronary; syndrome","myocardial ischemia impending infarction","pre-infarction syndrome","preinfarction angina","preinfarction anginas","preinfarctional; angina","rest angina","rest; angina","syndrome; coronary","syndrome; intermediate coronary","unstable angina","unstable angina pectori","unstable angina pectoris","unstable anginas","unstable; angina","worsening angina","aortic stenosis supra valvular","aortic stenosis supravalv","aortic stenosis supravalvar","aortic stenosis supravalvular","aortic supravalv stenosis","aortic supravalvular stenoses","aortic supravalvular stenosis","stenoses aortic supravalvular","stenosis aortic supravalvular","stenosis supravalvular aortic","supra-aortic stenosis","supra-valvular aortic stenosis","supravalv aortic stenosis","supravalvar aortic stenosis","supravalvular aorta constricted","supravalvular aortic stenosis","supravalvular stenoses aortic","supravalvular stenosis aortic","svas","svas - supravalvar aortic stenosis","ai - aortic incompetence","aorta; incompetency","aorta; insufficiency","aortic (valve) insufficiency","aortic incompetence","aortic insufficiency","aortic regurgitation","aortic valve incompetence","aortic valve insufficiency","aortic valve regurgitation","aortic valve incompetence","aortic valve insufficiency","aortic valve regurgitation","aortic valve; incompetency","aortic valve; insufficiency","aortic valve; regurgitation","ar - aortic regurgitation","incompetence aortic","incompetence aortic valve","incompetency; aortic valve","insufficiency aortic valve","insufficiency; aortic","regurgitation aortic","r"]}}}}}'

我的目标是获取包含任何这些关键字的唯一记录的数量。使用 2、3 个关键字,它运行良好。但是有了这个关键字列表,首先我看到了这个错误:

-bash: syntax error near unexpected token `valve'

然后,我看到了这个错误:

{"error":"SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[6hWIW7xlSbSqKi4dNg_1bg][INDEXED REPOSITORY][0]: SearchParseException[[INDEXED REPOSITORY][0]: from[-1],size[-1]: Parse Failure [Failed to parse source ......

此外,我不得不提一下,关键字的格式已更改为:

 .....\"angina pectoris; crescendo\",\"angina pectoris; unstable\",\"angina unstable\",\"angina preinfarction\",\"angina unstable\",\"anginal chest pain at rest\",\"anginas preinfarction\",\"anginas unstable\",\"coronary; syndrome\",\"crescendo angina\",\"crescendo angina pectoris\",\"crescendo; angina\"

是不是因为“aortic valve; incompetency”中的分号等特殊字符?但我希望能够进行不敏感的精确匹配搜索。知道为什么会这样吗?非常感谢您的帮助。

最佳答案

归功于@Val。他说:问题来自 morgagni 病你需要用你的术语正确地转义反斜杠。

关于linux - 短语中的特殊字符即使被 "quotation marks"包围也会产生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46439961/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com