Commit cdf27b6b authored by Alexandre Delanoë's avatar Alexandre Delanoë

[DB] search indexing

parent c4b6e85b
......@@ -51,7 +51,7 @@ triggerSearchUpdate = execPGSQuery query ( nodeTypeId NodeDocument
|| ' ' || (new.hyperdata ->> 'fonction')
);
ELSE
new.search := to_tsvector( 'english' , new.name);
new.search := to_tsvector( 'english' , (new.hyperdata ->> 'title') || ' ' || (new.hyperdata ->> 'abstract'));
END IF;
return new;
end
......@@ -63,7 +63,7 @@ triggerSearchUpdate = execPGSQuery query ( nodeTypeId NodeDocument
BEFORE INSERT OR UPDATE
ON nodes FOR EACH ROW
EXECUTE PROCEDURE search_update();
-- Initialize index with already existing data
UPDATE nodes SET hyperdata = hyperdata;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment