Skip to content

No support for SQL Full Text Index in Direct Query Mode #20

@erapade

Description

@erapade

The visual does not support FULL TEXT index type. My guess is that this is depending on the DAX-SQL translation and nothing that you can do anything about. I Create this issue anyway just to inform that the feature is missing
Using CONTAINS() instead of CHARINDEX() would have made the visual supporting FULL TEXT index types

In short, the DAX code below:
FILTER(
KEEPFILTERS(VALUES('Table'[Column])),
SEARCH("/Text to be searched for/", 'Table'[Column], 1, 0) >= 1
)

Is translated into the SQL code below:
WHERE
(
CHARINDEX(N'/Text to be search for/',
COALESCE([t10].[Column], '')
)

And CHARINDEX does not take advantage of indexes of type "FULL TEXT"

/* DAX and SQL (short versions) code below */

The DAX Code generate looks something like below:
// DAX Query
DEFINE
VAR __DS0FilterTable =
FILTER(
KEEPFILTERS(VALUES('Table'[Column])),
SEARCH("/Text to be searched for/", 'Table'[Column], 1, 0) >= 1
)

VAR __DS0Core =
CALCULATETABLE(
SUMMARIZE(
'Table',
'Table'[Column],
'Table'[Column2],
'Table'[Column3]
),
KEEPFILTERS(__DS0FilterTable)
)

VAR __DS0PrimaryWindowed =
TOPN(
501,
__DS0Core
)

EVALUATE
__DS0PrimaryWindowed

The SQL looks something like below:
// SQL
SELECT
TOP (501) [t10].[Column], [t10].[Column2], [t10].[Column3]
FROM
(
(select [$Table].[Column] as [Column],
[$Table].[Column2] as [Column2],
[$Table].[Column3] as [Column3]
from [schema].[Table] as [$Table])
)
AS [t10]
WHERE (CHARINDEX(N'/Text to be search for/', COALESCE([t10].[Column], '')) >= 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions