ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data Namespace / QueryFilter Class / FullTextExpression Property
Example

In This Topic
    FullTextExpression Property
    In This Topic
    Gets or sets the full text expression used for filtering data in the underlying data store.
    Syntax
    Public Property FullTextExpression As FullTextExpression
    public FullTextExpression FullTextExpression {get; set;}
    Example
    Fulltext search query
    {
      await QueuedTask.Run(() =>
      {
        using (Geodatabase geodatabase = new Geodatabase(new DatabaseConnectionFile(new Uri("path\\to\\sde\\file\\sdefile.sde"))))
        using (Table table = geodatabase.OpenDataset<Table>("WaterPipeInfo"))
        using (TableDefinition tableDefinition = table.GetDefinition())
        {
          bool supportsFullText = geodatabase.GetDatastoreProperties().SupportsFullTextIndex;
          if (!supportsFullText)
          {
            return;
          }
    
          IReadOnlyList<Index> indexes = tableDefinition.GetIndexes();
          IReadOnlyList<Field> fieldsToSearch = indexes.First().GetFields();
    
          FullTextSearchTermExpression searchRepairStatus = new FullTextSearchTermExpression()
          {
            SearchFields = fieldsToSearch[0].Name,
            SearchTerm = "Repaired",
            SearchType = FullTextSearchType.Simple
          };
    
          FullTextSearchTermExpression searchPipeMaterial = new FullTextSearchTermExpression()
          {
            SearchFields = fieldsToSearch[1].Name,
            SearchTerm = "Copper",
            SearchType = FullTextSearchType.Simple
          };
    
          FullTextOrExpression repairedOrCopperEx = new FullTextOrExpression(searchRepairStatus, searchPipeMaterial);
    
          QueryFilter queryfilter = new QueryFilter
          {
            FullTextExpression = repairedOrCopperEx,
            Offset = 1,
            RowCount = 20,
            PostfixClause = "Order By Size"
          };
    
          using (RowCursor rowCursor = table.Search(queryfilter, false))
          {
            // Use row cursor ...
          }
        }
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.6 or higher.
    See Also