使用带有西班牙语单词的索引服务器时出现问题 [英] Problem using index server with Spanish words

查看:81
本文介绍了使用带有西班牙语单词的索引服务器时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用c#编写的页面,该页面使用索引服务器搜索文档(以html保存).我在使用该语言的西班牙语单词时遇到问题,出现了波浪号(áéíóú),但并非所有人都记得单词是否带有重音.这就是为什么例如文档中有单词árbol"(带有重音符号),但用户键入"arbol"(即不带有重音符号或波浪号)...搜索结果不会返回我的结果,它只搜索不带有重音符号的单词.如何不带或不带有重音符导入该类型?

这是我的代码:

选择
文件名,
路径,等级
来自
SCOPE(''DEEP TRAVERSAL OF("C:\ docs \ D \ 1")'')
在哪里
CONTAINS(CONTENTS,''"arbol")
订购
BY WRITE DESC

Hi, I have a page done in c #, that page uses index server to search for documents (saved in html). I have a problem with the use of Spanish words in that language there is a tilde (á é í ó ú), but not all people remember that words have accents or not ... That is why for example if a document is the word "árbol" (with accents) but the user types "arbol" (ie without an accent or tilde) ... The result of the search does not return me the results, it searches for exactly the word without accents. How I can do not to import that type with or without accent?

This is my code:

SELECT
FileName,
Path, Rank
FROM
SCOPE(''DEEP TRAVERSAL OF("C:\docs\D\1")'')
WHERE
CONTAINS(CONTENTS,''"arbol"'')
ORDER
BY WRITE DESC

推荐答案

您在数据库中使用什么排序规则?如果我没弄错排序规则使它对重音符号Latin1_General_CI_AI_KS不敏感,则此排序规则为CI =不区分大小写,AI =不区分重音,而KS =假名敏感.
如果您的数据库不敏感,则需要更改排序规则
what collation are you using in your database? if I''m not mistaken the collation to make it insensitive to accents Latin1_General_CI_AI_KS, this collation is CI = Casi Insensitive, AI = Accent Insensitive and KS = Kana Sensitive.
If your DB is not insensitive you will need to change the collation


这篇关于使用带有西班牙语单词的索引服务器时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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