从全文索引中排除文件类型
我在 varbinary(max) 文件流列上创建了全文索引。我将 PDF 和 XML 都存储在该文件流中,因此两者都被索引。但是,我真的不想对 XML 文件建立索引,因为我担心随着时间的推移它们会使我的索引膨胀并减慢速度。所以我真正想做的就是只在 PDF 文件上建立全文索引。有办法做到这一点吗?我可以以某种方式禁用 XML 过滤器吗?
I have a fulltext index created on a varbinary(max) filestream column. I have both PDF's and XML's being stored in this filestream, and consequently both are being indexed. However, I really don't want to index the XML files, because I'm afraid that over time they'll bloat my index and slow it down. So what I would really like to do is only have my fulltext index on the PDF files instead. Is there a way to do this? Can I somehow disable the XML filter, perhaps?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您能够通过常规 WHERE 谓词(例如 WHERE type = 'pdf')区分两种类型的行,那么您可以创建一个索引视图,将行过滤为仅包含您想要索引的行,然后是全文索引索引视图而不是表。但是,您需要查询视图而不是表才能利用 FTI。
Assuming you're able to distinguish between the two types of rows by a regular WHERE predicate (e.g. WHERE type = 'pdf') then you could create an indexed view that filters the rows to only those you want indexed and then full-text index the indexed view instead of the table. However, you'll need to query the view instead of the table to utilise the FTI.