Udostępnij za pośrednictwem


Właściwość Server.FullTextService

Pobiera Microsoft wyszukiwania usługa pełnotekstowa implementacji dla wystąpienie SQL Server.

Przestrzeń nazw:  Microsoft.SqlServer.Management.Smo
Zestaw:  Microsoft.SqlServer.Smo (w Microsoft.SqlServer.Smo.dll)

Składnia

'Deklaracja
<SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.One)> _
Public ReadOnly Property FullTextService As FullTextService
    Get
'Użycie
Dim instance As Server
Dim value As FullTextService

value = instance.FullTextService
[SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.One)]
public FullTextService FullTextService { get; }
[SfcObjectAttribute(SfcObjectRelationship::Object, SfcObjectCardinality::One)]
public:
property FullTextService^ FullTextService {
    FullTextService^ get ();
}
[<SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.One)>]
member FullTextService : FullTextService
function get FullTextService () : FullTextService

Wartość właściwości

Typ: Microsoft.SqlServer.Management.Smo.FullTextService
A FullTextService , który określa implementacji usługa pełnego tekstu na wystąpienie obiektu SQL Server.

Uwagi

FullTextService Obiektu można zmienić ustawienia dla Microsoft wyszukiwania.Zawiera ustawienia, takie jak domyślna lokalizacja przechowywania katalogów przeszukiwanie pełnego tekstu.

Przykłady

Visual Basic

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Reference the AdventureWorks2008R2 database.
Dim db As Database
db = srv.Databases("AdventureWorks2008R2")
'Reference the ProductCategory table.
Dim tb As Table
tb = db.Tables("ProductCategory", "Production")
'Define a FullTextCatalog object variable by specifying the parent database and name arguments in the constructor.
Dim ftc As FullTextCatalog
ftc = New FullTextCatalog(db, "Test_Catalog")
ftc.IsDefault = True
'Create the Full Text Search catalog on the instance of SQL Server.
ftc.Create()
'Define a FullTextIndex object varaible by supplying the parent table argument in the constructor.
Dim fti As FullTextIndex
fti = New FullTextIndex(tb)
'Define a FullTextIndexColumn object variable by supplying the parent index and column name arguements in the constructor.
Dim ftic As FullTextIndexColumn
ftic = New FullTextIndexColumn(fti, "Name")
'Add the indexed column to the index.
fti.IndexedColumns.Add(ftic)
fti.ChangeTracking = ChangeTracking.Automatic
'Specify the unique index on the table that is required by the Full Text Search index.
fti.UniqueIndexName = "AK_ProductCategory_Name"
'Specify the catalog associated with the index.
fti.CatalogName = "Test_Catalog"
'Create the Full Text Search index on the instance of SQL Server.
fti.Create()

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = $srv.Databases.Item("AdventureWorks2008R2")
$tb = $db.Tables.Item("ProductCategory", "Production")
$ftc = new-object Microsoft.SqlServer.Management.Smo.FullTextCatalog($db, "Test Catalog")
$ftc.IsDefault = $TRUE
$ftc.Create()
$fti = new-object Microsoft.SqlServer.Management.Smo.FullTextIndex($tb)
$ftic = new-object Microsoft.SqlServer.Management.Smo.FullTextIndexColumn($fti, "Name")
$fti.IndexedColumns.Add($ftic)
$fti.ChangeTracking = [Microsoft.SqlServer.Management.Smo.ChangeTracking]::Automatic
$fti.UniqueIndexName = "AK_ProductCategory_Name"
$fti.CatalogName = "Test Catalog"
$fti.Create()