z_pivot_rsc_job (zotonic_core v1.0.0-rc.17)

Run a resource pivot job.

Summary

Functions

Fetch the first title from the record for sorting.

Fetch the title in the default language for sorting.

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.

Run the sidejob task queue task.

Return a modified property map with fields that need immediate pivoting on an update.

Start a task queue sidejob.

Return the language used for stemming the full text index. We use a single stemming to prevent having seperate indexes per language.

Functions

cleanup_tsv_text(Text)

-spec cleanup_tsv_text(binary()) -> binary().

get_pivot_title(Props)

-spec get_pivot_title(map()) -> binary().

Fetch the first title from the record for sorting.

get_pivot_title(Id, Context)

-spec get_pivot_title(m_rsc:resource_id(), z:context()) -> binary().

Fetch the title in the default language for sorting.

pg_lang(_)

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(LangCode)

pivot_job(RscIds, Context)

-spec pivot_job(RscIds, Context) -> ok when RscIds :: [m_rsc:resource_id()], Context :: z:context().

Run the sidejob task queue task.

pivot_resource_update(Id, UpdateProps, RawProps, Context)

Return a modified property map with fields that need immediate pivoting on an update.

start_pivot(RscIds, Context)

-spec start_pivot(RscIds, Context) -> {ok, pid()} | {error, overload}
                     when RscIds :: [m_rsc:resource_id()], Context :: z:context().

Start a task queue sidejob.

stemmer_language(Context)

-spec stemmer_language(z:context()) -> string().

Return the language used for stemming the full text index. We use a single stemming to prevent having seperate indexes per language.

stemmer_language_config(Context)

-spec stemmer_language_config(z:context()) -> atom().