Home  >  Q&A  >  body text

mysql - 像很多网站(比如电商)里的筛选功能一般是如何实现的?

阿神阿神2742 days ago624

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 16:40:42

    Implemented by search engines, such as Lucene.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 16:40:42

    Data structure and data search are done separately
    1. Data structure:
    Basic product information (name, manufacturer, price and other information, product type)
    Product type table (mobile phones, tablets, home appliances, etc.)
    Product attribute table ( Screen size, processor, etc.)

    Process the correspondence between these information through association, which is more flexible, otherwise no matter how you design it, it will be either redundant or insufficient

    2. Data search:
    Use solr, sphinx and the like to create indexes (just build several indexes for several tables), and then read the manual to build your own query API

    reply
    1
  • Cancelreply