Copyright © 2009-2015 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
cleanup_tsv_text/1 | |
code_change/3 | Convert process state when code is changed. |
define_custom_pivot/3 | Let a module define a custom pivot columns() -> [column()] column() -> {ColumName::atom(), ColSpec::string()} | {atom(), string(), options::list()}. |
delete_task/3 | |
delete_task/4 | |
get_pivot_data/2 | |
get_pivot_title/1 | |
get_pivot_title/2 | Fetch the first title from the record for sorting. |
get_task/1 | |
get_task/2 | |
get_task/3 | |
get_task/4 | |
handle_call/3 | Trap unknown calls. |
handle_cast/2 | Poll the queue for the default host. |
handle_info/2 | Handling all non call/cast messages. |
init/1 | Initiates the server. |
insert_queue/2 | Insert a rsc_id in the pivot queue. |
insert_task/3 | Insert a slow running pivot task. |
insert_task/4 | Insert a slow running pivot task. |
insert_task/5 | Insert a slow running pivot task with unique key and arguments. |
insert_task_after/6 | Insert a slow running pivot task with unique key and arguments that should start after Seconds seconds. |
lookup_custom_pivot/4 | Lookup a custom pivot; give back the Id based on a column. |
pg_lang/1 | Translate a language to a language string as used by postgresql. |
pg_lang_extra/1 | |
pivot/2 | An immediate pivot request for a resource. |
pivot_delay/1 | Delay the next pivot, useful when performing big updates. |
pivot_resource/2 | Pivot a resource, collect all texts for indexing and some extra to be indexed fields. |
pivot_resource_update/4 | Return a modified property list with fields that need immediate pivoting on an update. |
poll/1 | Poll the pivot queue for the database in the context. |
queue_all/1 | Rebuild the search index by queueing all resources for pivot. |
start_link/1 | Starts the server. |
stemmer_language/1 | Return the language used for stemming the full text index. |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
cleanup_tsv_text(Text) -> any()
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
define_custom_pivot(Module, Columns::columns(), Context) -> ok
Let a module define a custom pivot columns() -> [column()] column() -> {ColumName::atom(), ColSpec::string()} | {atom(), string(), options::list()}
delete_task(Module, Function, Context) -> any()
delete_task(Module, Function, UniqueKey, Context) -> any()
get_pivot_data(Id, Context) -> any()
get_pivot_title(Props) -> any()
get_pivot_title(Id, Context) -> any()
Fetch the first title from the record for sorting.
get_task(Context) -> any()
get_task(Module, Context) -> any()
get_task(Module, Function, Context) -> any()
get_task(Module, Function, UniqueKey, Context) -> any()
handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
Trap unknown calls
handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Poll the queue for the default host
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Handling all non call/cast messages
init(Host::Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
insert_queue(Id, Context) -> any()
Insert a rsc_id in the pivot queue
insert_task(Module, Function, Context) -> any()
Insert a slow running pivot task. For example syncing category numbers after an category update.
insert_task(Module, Function, UniqueKey, Context) -> any()
Insert a slow running pivot task. Use the UniqueKey to prevent double queued tasks.
insert_task(Module, Function, UniqueKey, Args, Context) -> any()
Insert a slow running pivot task with unique key and arguments.
insert_task_after(SecondsOrDate, Module, Function, UniqueKey, Args, Context) -> any()
Insert a slow running pivot task with unique key and arguments that should start after Seconds seconds.
lookup_custom_pivot(Module, Column, Value, Context) -> Id | undefined
Lookup a custom pivot; give back the Id based on a column. Will always return the first Id found.
pg_lang(X1) -> any()
Translate a language to a language string as used by postgresql. This language list is the intersection of the default catalogs of postgres with the languages supported by mod_translation.
pg_lang_extra(Iso) -> any()
pivot(Id::integer(), Context::#context{}) -> ok
An immediate pivot request for a resource
pivot_delay(Context::#context{}) -> ok
Delay the next pivot, useful when performing big updates
pivot_resource(Id, Context) -> void()
Pivot a resource, collect all texts for indexing and some extra to be indexed fields.
pivot_resource_update(Id, UpdateProps, RawProps, Context) -> any()
Return a modified property list with fields that need immediate pivoting on an update.
poll(Context) -> void()
Poll the pivot queue for the database in the context
queue_all(Context) -> any()
Rebuild the search index by queueing all resources for pivot.
start_link(SiteProps) -> {ok, Pid} | ignore | {error, Error}
Starts the server
stemmer_language(Context::#context{}) -> string()
Return the language used for stemming the full text index. We use a single stemming to prevent having seperate indexes per language.
terminate(Reason, State) -> void()
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
Generated by EDoc, Apr 20 2018, 18:07:54.