Replace doc.content_title with doc.filename

(from github.com/freestyle68)
On searchResults.jsp the title of the results is defined as

<h3 class="title ellipsis media-heading">
<a class="link" href="${doc.url_link}" data-uri="${doc.url_link}"
data-id="${doc.doc_id}" data-order="${s.index}">${f:h(doc.content_title)}</a>

With file crawler usually is better to replace doc.content_title with doc.filename because this is defined by user and so is best explanatory of the document.

Replacing the field directly on jsp is not feasible because this also impact on the titles of the web crawling results.

I have read the post https://github.com/codelibs/fess/issues/1096
and also http://fess.codelibs.org/11.3/admin/dataconfig-guide.html, so I tried to insert on web crawler config parameters the following:

doc.content.title=doc.filename

and also tried with content_title=filename

but nothing change.

There is a way to make this field content change?

Thank you

(from github.com/marevol)
Try the following setting in fess_config.properties:

crawler.metadata.name.mapping=

and then use doc.content_title.

(from github.com/freestyle68)
Perfect, it works!

So, why cutting \ from

crawler.metadata.name.mapping=

has solved the problem?

(from github.com/marevol)
First of all, the title is a title of the document/file.
It’s a title element if html file, a meta Title info if PDF/MS Office…
So, the current displayed title is expected.

With file crawler usually is better to replace doc.content_title with doc.filename because this is defined by user and so is best explanatory of the document.

It depends on user’s environment.
If PDF/MS Office files contain a proper meta title, it works.

crawler.metadata.name.mapping is a meta data mapping.
If replacing

crawler.metadata.name.mapping=\
title=title:string\n\
Title=title:string\n\

with

crawler.metadata.name.mapping=

(\n is a separator), it’s no metadata mapping. Therefore, this setting ignores metadata for PDF/MS Office.

(from github.com/freestyle68)
Thanks for your detailed description, I will close the issue.