1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Price comparison search engine with mysql fulltext

Discussion in 'PHP' started by peenut, Apr 17, 2007.

  1. #1
    Hello everbody,

    I'm coding something like a price comparison search engine, where customers/shops provide their product data by csv files.
    The following problems do appear:

    1. Assume, somebody is searching for "Blue Widget PowerEdition by ABC" and, let's say, 8 shops do have this product in their listings BUT the title of the product might look totally different in each shop, e.g. "widget PowerEdition" vs. "ABC widget in blue".
    As a result, I just want to display one single product and add a note, that up to 8 shops provide this product in their listings.
    How to implement this?
    What I was trying so far, is to identify products by their International Article Number (EAN, "barcode number"), ie. my query looks like "get all results ordered by search term relevance and distinct by EAN".
    But I was not sure, if all shops will use the EAN-System in their databases.
    Any ideas?

    2. What kind of MySQL-Fulltextsearch should be used for such a search engine (IN BOOLEAN MODE or not?!)
    The following problem appears:
    Assume, there is a main category for the search engine site called "widgets".
    Now, lots of products (say 10% of total data) contains the term "widgets" in its title or description.
    If someone searches for "ABC widgets", results including widgets produced by the company (or of the type) 'ABC' should be listed first.
    Don't know why, but I get a lots of other results first, bevor the "right" result for "ABC widgets" appears (ordered by fulltext relevance, ie. NOT in BOOLEAN MODE)
    If I'm switching to BOOLEAN MODE, there is no relevance order, which means it is only decided if a product matches the query or not.
    I'm aware of the fact, that mysql fulltext relevance is for example depending on the times a phrase appears in the whole database, but how can I improve my coding then ;) ?

    Any ideas of how to code such a comparison engine?
     
    peenut, Apr 17, 2007 IP