drwg89980 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?

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?