3

I am trying to implement Full Text Search in a SQL View which is supporting Multi Tenancy Implementation using TenantID Filter to retrieve data from the underlying table.

Eg: Table Name - BOOKS which is having a TENANT_ID Column View Name - VUE_BOOKS which makes use of SUSERSID() function to filter the TENANT_ID column from table.

In order to set up Full Text Search that view must have Full Text Index. To set up Full Text Index that view must be an Indexed view.

But unfortunately I am not able to create Index for the view because of non deterministic value from the inbuilt function SUSERSID().

How will I implement Multitenancy and Full Text Search in this scenario without exposing Table Name ?

Any Suggestions ?

Arun662469
  • 97
  • 7
  • How about you adding an index to the tenant id column. Be it a varchar or a uniqueidentifier, this would suffice I guess – Saravanan Nov 27 '14 at 06:32
  • Saravanan thanks for your inputs. But adding an index to the tenant id column does not solve the purpose I will not add this tenant ID column in the view and is used only for filtering the data from table. I need to know how I can implement multi tenancy using the same tenant ID filter. – Arun662469 Dec 02 '14 at 07:52

0 Answers0