Highlight() function in SphinxSE

Hello,
How to use Highlight() function in SphinxSE. I tried SphinxQL and Highlight function working.

In theory you can use arbitrary SQL expressions in the ‘select’ part (just like you do in SphinxQL)

SELECT * FROM myindex WHERE query='test;select=HIGHLIGHT() as highlight';

Beleive would need to create that as an attribute on the table.

CREATE TABLE myindex 
(
    id          INTEGER UNSIGNED NOT NULL,
    weight      INTEGER NOT NULL,
    query       VARCHAR(3072) NOT NULL,
    highlight   VARCHAR(4096)
    INDEX(query)
) ENGINE=SPHINX CONNECTION="sphinx://localhost:9312/test";

Remeber your fields need to be ‘stored’ on your underlying manticore index for HIGHLIGHT to work.

Thanks for the reply. It works