How does SQL Server full-text Index actually index

2019-07-31 18:34发布

问题:

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.