microsoft / microsoft/PowerBI-visuals-TextFilter
No support for SQL Full Text Index in Direct Query Mode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 29
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by tracing the direct-query behavior described in the issue and determine whether this visual controls the DAX-to-SQL translation from SEARCH to CHARINDEX; done means confirming whether FULL TEXT index support is possible here or documenting that it depends on an external translator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql, typescript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100