How does SQL Server full-text Index actually index the words in a catalog?

蹲街弑〆低调 提交于 2019-12-24 14:34:59

问题


I have been searching long and hard for an answer regarding the processes full-text index uses to index the full text catalogs assigned to a document, where the document primary key is included in the indexing. I have not been able to find the MSDN article that describes this in depth.

Why can't I use it for searching int-only strings in the full text search columns?

SEE HERE: (WELL, I'm a new user so I remade the columns myself since I can't post an image)

 ID       FIRSTNAME   LASTNAME    ADDRESS            FULLTEXTCOLUMN
 1         JOHN        DOE        123 Main St.       1  JOHN DOE 123 Main St. 
 2         JANE        DOE        124 Summer St.     2  JANE DOE 124 Summer St.
                                                     ^ ----------^ --can't search 

For example, in this link, the author of the post shows that he has included the primary key int-only indexes in his full text-indexed column --- but why? After trying a CONTAINS() search on the int values for myself, the search can't find anything without text attached.

So why do so many people show integer-only strings in their catalog if they aren't searchable? I have a huge need for integer-search options in my catalog, and hope I'm just missing something.

Does this mean that the indexes are only assigned to strings that contain at least one letter?

This question here describes a catalog format very close to what I'm trying to cheat the system to do in SQL Server (because this is my only database option).

Thanks for your help!

And yes, this is my closed question here but I don't care because it is a "real" question and important one. I have a team of people behind me wondering this.


回答1:


After a lot of testing, (and turning off the StopList, which prevented indexing the integer-only strings --which the author of the article linked DID do) it looks like it indexes every string delimited by a space, including the integers. I believe the words that are actually indexed go in the catalog using information about the row, column, and sort of cell within that column, or position, rather.

Everything in that entire table gets a relational index, as long as it is space-delimited.



来源:https://stackoverflow.com/questions/12979996/how-does-sql-server-full-text-index-actually-index-the-words-in-a-catalog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!