%global _empty_manifest_terminate_build 0 Name: python-ckanext-search-tweaks Version: 0.4.12 Release: 1 Summary: please add a summary manually as the author left a blank one License: AGPL URL: https://github.com/DataShades/ckanext-search-tweaks Source0: https://mirrors.nju.edu.cn/pypi/web/packages/07/54/56298903676bddcc225126efcb6457c0b885a181a62f515d6a28fec5f769/ckanext-search-tweaks-0.4.12.tar.gz BuildArch: noarch Requires: python3-freezegun Requires: python3-typing-extensions %description ### search_tweaks_query_relevance Increase relevance of datasets for particular query depending on number of direct visits of the dataset after running this search. I.e, if user searches for `something` and then visits dataset **B** which is initially displayed in a third row of search results, eventually this dataset will be displayed on the second or even on the first row. This is implemented in three stages. On the first stage, statistics collected and stored inside storage(redis, by default) and then this statistics converted into numeric solr field via cronjob. Finally, Solr's boost function that scales number of visits and improves score for the given query is applied during search. Following steps are required in order to configure this plugin: - Add field that will store statistics to schema.xml(`query_relevance_` prefix can be changed via config option): - Configure a cronjob which will update search-index periodically: 0 0 * * * ckan search-index rebuild #### CLI relevance query align - remove old data from storage. Actual result of this command depends on storage backend, that is controlled by config. At the momment, only `redis-daily` backend is affected by this command - all records older than `query_relevance.daily.age` days are removed. relevance query export - export statistics as CSV. relevance query import - import statistics from CSV. Note, records that are already in storage but are not listed in CSV won't be removed. It must be done manually #### Config settings # Which backend to use in order to collect information about dataset # relevance for the particular search query. Possible values are: # "redis-permanent", "redis-daily" # (optional, default: redis-daily). ckanext.search_tweaks.query_relevance.backend = redis-permanent # How long(in days) information about dataset visits will be stored in order to # update relevance of dataset in search query. # (optional, default: 90). ckanext.search_tweaks.query_relevance.daily.age = 90 # Solr boost function with $field placeholder that will be replaced by # the correspoinding field name # (optional, default: "scale(def($field,0),1,1.2)"). ckanext.search_tweaks.query_relevance.boost_function = recip($field,1,1000,1000) # Prefix of the numeric field defined in Solr schema. This field will hold # dataset's relevance for the given query. # (optional, default: query_relevance_). %package -n python3-ckanext-search-tweaks Summary: please add a summary manually as the author left a blank one Provides: python-ckanext-search-tweaks BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-ckanext-search-tweaks ### search_tweaks_query_relevance Increase relevance of datasets for particular query depending on number of direct visits of the dataset after running this search. I.e, if user searches for `something` and then visits dataset **B** which is initially displayed in a third row of search results, eventually this dataset will be displayed on the second or even on the first row. This is implemented in three stages. On the first stage, statistics collected and stored inside storage(redis, by default) and then this statistics converted into numeric solr field via cronjob. Finally, Solr's boost function that scales number of visits and improves score for the given query is applied during search. Following steps are required in order to configure this plugin: - Add field that will store statistics to schema.xml(`query_relevance_` prefix can be changed via config option): - Configure a cronjob which will update search-index periodically: 0 0 * * * ckan search-index rebuild #### CLI relevance query align - remove old data from storage. Actual result of this command depends on storage backend, that is controlled by config. At the momment, only `redis-daily` backend is affected by this command - all records older than `query_relevance.daily.age` days are removed. relevance query export - export statistics as CSV. relevance query import - import statistics from CSV. Note, records that are already in storage but are not listed in CSV won't be removed. It must be done manually #### Config settings # Which backend to use in order to collect information about dataset # relevance for the particular search query. Possible values are: # "redis-permanent", "redis-daily" # (optional, default: redis-daily). ckanext.search_tweaks.query_relevance.backend = redis-permanent # How long(in days) information about dataset visits will be stored in order to # update relevance of dataset in search query. # (optional, default: 90). ckanext.search_tweaks.query_relevance.daily.age = 90 # Solr boost function with $field placeholder that will be replaced by # the correspoinding field name # (optional, default: "scale(def($field,0),1,1.2)"). ckanext.search_tweaks.query_relevance.boost_function = recip($field,1,1000,1000) # Prefix of the numeric field defined in Solr schema. This field will hold # dataset's relevance for the given query. # (optional, default: query_relevance_). %package help Summary: Development documents and examples for ckanext-search-tweaks Provides: python3-ckanext-search-tweaks-doc %description help ### search_tweaks_query_relevance Increase relevance of datasets for particular query depending on number of direct visits of the dataset after running this search. I.e, if user searches for `something` and then visits dataset **B** which is initially displayed in a third row of search results, eventually this dataset will be displayed on the second or even on the first row. This is implemented in three stages. On the first stage, statistics collected and stored inside storage(redis, by default) and then this statistics converted into numeric solr field via cronjob. Finally, Solr's boost function that scales number of visits and improves score for the given query is applied during search. Following steps are required in order to configure this plugin: - Add field that will store statistics to schema.xml(`query_relevance_` prefix can be changed via config option): - Configure a cronjob which will update search-index periodically: 0 0 * * * ckan search-index rebuild #### CLI relevance query align - remove old data from storage. Actual result of this command depends on storage backend, that is controlled by config. At the momment, only `redis-daily` backend is affected by this command - all records older than `query_relevance.daily.age` days are removed. relevance query export - export statistics as CSV. relevance query import - import statistics from CSV. Note, records that are already in storage but are not listed in CSV won't be removed. It must be done manually #### Config settings # Which backend to use in order to collect information about dataset # relevance for the particular search query. Possible values are: # "redis-permanent", "redis-daily" # (optional, default: redis-daily). ckanext.search_tweaks.query_relevance.backend = redis-permanent # How long(in days) information about dataset visits will be stored in order to # update relevance of dataset in search query. # (optional, default: 90). ckanext.search_tweaks.query_relevance.daily.age = 90 # Solr boost function with $field placeholder that will be replaced by # the correspoinding field name # (optional, default: "scale(def($field,0),1,1.2)"). ckanext.search_tweaks.query_relevance.boost_function = recip($field,1,1000,1000) # Prefix of the numeric field defined in Solr schema. This field will hold # dataset's relevance for the given query. # (optional, default: query_relevance_). %prep %autosetup -n ckanext-search-tweaks-0.4.12 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-ckanext-search-tweaks -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu May 18 2023 Python_Bot - 0.4.12-1 - Package Spec generated