Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace doc.content_title with doc.filename #1235

Closed
freestyle68 opened this issue Aug 19, 2017 · 4 comments
Closed

Replace doc.content_title with doc.filename #1235

freestyle68 opened this issue Aug 19, 2017 · 4 comments
Labels

Comments

@freestyle68
Copy link

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 #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

@marevol
Copy link
Contributor

marevol commented Aug 19, 2017

Try the following setting in fess_config.properties:

crawler.metadata.name.mapping=

and then use doc.content_title.

@freestyle68
Copy link
Author

Perfect, it works!

So, why cutting \ from

crawler.metadata.name.mapping=

has solved the problem?

@marevol
Copy link
Contributor

marevol commented Aug 19, 2017

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.

@freestyle68
Copy link
Author

Thanks for your detailed description, I will close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants