Getting full text content from Sphinx search

Discussion in 'Databases' started by Triexa, Nov 30, 2010.

  1. #1
    So I am using the PHP api and have executed a successful Query(). I basically have an array of Ids. Do I just do:

    SELECT * FROM mytable WHERE primary_id IN (5, 29, 52, 23, 59, 22) ORDER BY FIELD(primary_id, 5, 29, 52, 23, 59, 22);

    Or is there a better way to get the resultset in the order Sphinx rated them?
     
    Triexa, Nov 30, 2010 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    This is the way I have been using.
     
    mwasif, Dec 2, 2010 IP
  3. jonasl

    jonasl Active Member

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #3
    Can you please paste some more code?
     
    jonasl, Dec 12, 2010 IP
  4. ACME Squares

    ACME Squares Peon

    Messages:
    98
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I much preferred SphinxQL to the API. Accessing Sphinx using just PDO/mysqli is absolutely brilliant, and made my application more portable.
     
    ACME Squares, Jan 11, 2011 IP