2014-07-29 19:30
浏览 18

如何在Drupal 7中进行%LIKE%搜索

I got Drupal 7 and ubercart installed. I'm using standart shaerch engine. How can i search in my store using queries like this:

SELECT * FROM table WHERE product_desc LIKE %search_word%

What files i need to change to search with part-words?

图片转代码服务由CSDN问答提供 功能建议

我安装了Drupal 7和ubercart。 我正在使用标准的shaerch引擎。 如何使用以下查询在我的商店中搜索:

SELECT * FROM table WHERE product_desc LIKE%search_word%


  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • dongyuchen9276 2014-07-30 15:00

    The core search module only does exact match search. You could try the Porter-Stemmer module to get the "LIKE" search if your site is English language only.

    A more flexible approach would be to use the Views module and create a search form that is for your products. Performance would be better and you could easily extend the functionality in the future.

    解决 无用
    打赏 举报

相关推荐 更多相似问题