Question

Is it possible to force somehow the indexing service of MS SQL Server 2012 to index a particular filestream/record of a filetable?

If not, is there any way to know if a filestream/record has been indexed?

Thank you very much!

Edit: I found something. I'm not able to index a single file, but I may be able to understand what files have been indexed.

using this query: EXEC sp_fulltext_keymappings @table_id; you'll know every record that has been indexed, is better than nothing...

Was it helpful?

Solution

It sounds like you want to full text index a subset of the files within a single file table. (If it's otherwise, clarify your question and I'll edit the answer). There are two ways you could approach this.

One approach, is to use two distinct FileTables (MyTable_A and MyTable_B), place the files you want indexed in MyTable_A, and the non-indexed ones in MyTable_B. Then apply a full text index to A, but not B. If you need the files to appear in a unified fashion within SQL, just gate access through a view that UNIONs the two filetables. A potential pitfall is that it requires two distinct directory structures. If you need a unified file system structure this approach won't work.

Another approach, is to create an INDEXED VIEW of the files you want to full text indexed. Then apply a full text index to the view. Disclaimer: I have not tried this approach, but apparently it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top