Cannot search in Meta Keyword

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hi Guys,

I have seen a previous post from Chris how to search in Meta Keyword as below.

I have followed all these steps but obviously it's not working.

Alternatively, by setting up in this way Instant Search Plugin then support Meta Keyword search.

Please help to figure it out. Many thanks,


May be too late but in case someone else sees this....

To get Meta keywords to return in your search (using Full text search) you have to add the field to the FullText_Enable stored procedure and add the query to the ProductLoadAllPaged stored procedure.  

For the other Meta fields, just add the fields to the FullTest_Enable SP and add two more queries to the  ProductLoadAllPaged using the Meta Keywords query as a stating point.

BTW, I'm forcing it to always search for SKU, so I removed the if statement...

FullText_Enable
  -- Change the line that creates the Full text index for the name, short description and full description as follows:

CREATE FULLTEXT INDEX ON [Product]([Name], [ShortDescription], [FullDescription], [Sku], [MetaKeywords])


ProductLoadAllPaged
  -- Insert the queries to the SP, I put them between the localized product full description query and the product tag query


    --SKU
    --IF @SearchSku = 1
    --BEGIN
      SET @sql = @sql + '
      UNION
      SELECT p.Id
      FROM Product p with (NOLOCK)
      WHERE '
      IF @UseFullTextSearch = 1
        SET @sql = @sql + 'CONTAINS(p.[Sku], @Keywords) '
      ELSE
        SET @sql = @sql + 'PATINDEX(@Keywords, p.[Sku]) > 0 '
    --END

    --[MetaKeywords]
    SET @sql = @sql + '
    UNION
    SELECT p.Id
    FROM Product p with (NOLOCK)
    WHERE '
    IF @UseFullTextSearch = 1
      SET @sql = @sql + 'CONTAINS(p.[MetaKeywords], @Keywords) '
    ELSE
      SET @sql = @sql + 'PATINDEX(@Keywords, p.[MetaKeywords]) > 0 '
7 years ago
By the way, because I'm using an existing database; I updated the full text index on table [product] instead of re-create.

CREATE FULLTEXT INDEX ON [Product]([Name], [ShortDescription], [FullDescription], [Sku], [MetaKeywords])
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.