Application search

From DBSight Full-Text Search Engine/Platform Wiki

Table of contents

Drupal

Drupal Diagram

A copy of Drupal diagram is from here

Image:Drupal_diagram.png

Drupal Crawling SQLs

Main Query

select nid, type, uid, title, created, FROM_UNIXTIME(changed) changed, body from node
order by changed desc

Subsequent Query 1, get the comment, comment title, and comment user name

select nid, subject, name as user_name, comment
from comments
where nid in (?)    -- this uses DBSight's batch select for better performance

Subsequent Query 2, to get the page's user name

select uid, name as user_name
from users
where uid = ?

Drupal Templates

Just scaffold it. Very easy to do. The prefix of the link back to the drupal forum looks like this:

http://www.yoursite.com/index.php?q=node/

You should concatenate it with node id, nid

Optionally

Optionally you can choose which field to do facet search. Like by user name, changed time, etc.

That's it.