For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > January 2005 > extend nestedsets with fulltext query









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author extend nestedsets with fulltext query
Roman Stachura

2005-01-30, 3:56 pm

Hi all

Is there a way to do a fulltext search with db nestedsets class?

Something like :

$addSQL = array(
'WHERE MATCH' => 'name, content',
'AGAINST' => 'willkommen'
);

$search = $NSsmarty->getAllNodes(true, true, $addSQL);


Without the nestedsets class its working:

$search_query = "SELECT name,
id,
content,
link
FROM nestedset
WHERE MATCH content,
name
AGAINST ('willkommen')
";

--> http://dev.mysql.com/doc/mysql/en/fulltext-search.html



Regards roman
Daniel Khan

2005-01-31, 8:57 pm

Gruezi Roman,

Roman Stachura wrote:

> Is there a way to do a fulltext search with db nestedsets class?


No - I think this isn't possible so far.
Maybe you could craft the params in a way that this could work but I
never tested this.

The applications I know do not store too much payload inside the
NestedSet. It's better to store a nodes data inside a separate table.

If you have to stick to your db schema I would recommend to simply run
the fulltext query on the nested set table (if possible).

greetings

--
Daniel Khan
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com