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

[DB] search indexing

parent c4b6e85b
...@@ -51,7 +51,7 @@ triggerSearchUpdate = execPGSQuery query ( nodeTypeId NodeDocument ...@@ -51,7 +51,7 @@ triggerSearchUpdate = execPGSQuery query ( nodeTypeId NodeDocument
|| ' ' || (new.hyperdata ->> 'fonction') || ' ' || (new.hyperdata ->> 'fonction')
); );
ELSE ELSE
new.search := to_tsvector( 'english' , new.name); new.search := to_tsvector( 'english' , (new.hyperdata ->> 'title') || ' ' || (new.hyperdata ->> 'abstract'));
END IF; END IF;
return new; return new;
end end
...@@ -63,7 +63,7 @@ triggerSearchUpdate = execPGSQuery query ( nodeTypeId NodeDocument ...@@ -63,7 +63,7 @@ triggerSearchUpdate = execPGSQuery query ( nodeTypeId NodeDocument
BEFORE INSERT OR UPDATE BEFORE INSERT OR UPDATE
ON nodes FOR EACH ROW ON nodes FOR EACH ROW
EXECUTE PROCEDURE search_update(); EXECUTE PROCEDURE search_update();
-- Initialize index with already existing data -- Initialize index with already existing data
UPDATE nodes SET hyperdata = hyperdata; 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