discuss
September 5, 2018, 10:06am
1
(from github.com/kaleid-scope )
I am trying to overwrite “click_count” when crawling CMS (Joomla) data from mysql.
Specifically, when I output search results in API, I want the result to be output in descending order of “hits”.
(“hits” is the number of articles viewed in Joomla)
I set “click_count=hits” to “script” in the crawler setting but it was not overwritten.
I think that I should also invalidate counting the number of clicks of the search result of FESS.
Is it possible to realize this?
discuss
September 6, 2018, 2:46am
2
(from github.com/marevol )
Fess manages click_count
and favorite_count
.
So, it’s better to use other own field after adding it.
discuss
September 6, 2018, 3:57am
3
(from github.com/kaleid-scope )
Thank you for your reply.
Then, I investigated how to add fields from the past issues.
#1357
Is the procedure as follows? ( When adding a field named “hits” )
Edit doc.json (path:app/WEB-INF/classes/fess_indices/fess/doc.json)
"hits": {
"type": "keyword"
},
Edit fess_config.properties (path: /etc/fess/fess_config.properties )
index.field.hits=hits
query.additional.response.fields=hits
query.additional.search.fields=hits
query.additional.sort.fields=hits
(Is it also necessary to set up the following comments?https://github.com/codelibs/fess/issues/1357#issuecomment-347333794 )
Restart FESS
(The version of FESS is 12.1.)
discuss
September 6, 2018, 10:25am
4
(from github.com/kaleid-scope )
It seems like it was solved.
Finally,I changed as follows
1.Edit doc.json
+ "hits": {
+ "type": "long"
+ },
2.Edit fess_config.properties
+index.field.hits=hits
+index.admin.long.fields=content_length,favorite_count,click_count,hits
+query.additional.response.fields=hits
+query.additional.api.response.fields=hits
+query.additional.scroll.response.fields=hits
+query.additional.cache.response.fields=hits
+query.additional.search.fields=hits
+query.additional.sort.fields=hits
Restart FESS and ran reindex in upgrade page. ( /admin/upgrade/ )
Please teach if there are unnecessary settings.