We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2954
    • 40 Posts
    I was working with the FlexSearchForm and needed to add a column to the FULLTEXT index. After several attempts I realized MODx uses content_ft_idx as its FULLTEXT index for pagetitle, description and content. I added longtitle, which I used for my product SKUs.

    Since this issue hasn’t been addressed in the forums from what I can tell, I wanted to give the MODx team a chance to weight in on the proper way to add to the FULLTEXT index.

    I simply used the following code:

    ALTER TABLE `modx_site_content` DROP INDEX `content_ft_idx` ,
    ADD FULLTEXT `content_ft_idx` (
    `pagetitle` ,
    `description` ,
    `content` ,
    `longtitle`
    )

    This worked fine for adding the field, but my Cardinality was still listed as "1" even after Analyzing the table. My understanding is that it should update to the approximate number of unique records, in my case about 1383.

    Obviously a FULLTEXT search won’t do much good with only one record in it. Any suggestions?