Search Result issue

Dear All,

I’ve got an issue with search result since it shows the Objects, content and exact. Actually the user don’t to see that keywork in the result of search content.
Could any one help me to solve this issue?
Search Result

I am highly appreciate with any help
Thanks
John

Hi,

So your users don’t want to know what field was matched? I’m surprised, but if that’s the case then you can only hide “Objects” with CSS (.search-result-highlights > dt). “content” and “extract” are actually part of the indexed text, so you can’t do much about it, other than telling the search to not match objects at all.

Hope this helps,
Marius

Dear Mflorea,

Thank you very mụch for your support.

Actually, the my user just want to see the result of search like this

There are not “content:=” and “extract:” word in the result of search when using search from forum.xwiki.org

But in my search result, it always show “content:=” and “extract:” ;(

I am so appreciated with your helps
Thanks
John

Unlike a forum post, an XWiki page can have metadata that is also matched when you perform a search. The search results page shows you which page fields were matched. We cannot show only the page title and content, because the match could be in the metadata (your users will ask “why is this page in the results?”). And we cannot simply show the metadata as if it were the page content because it misleads the users (they will say “I can’t find this in the page content, where is this taken from?”).

I’m pretty sure it’s not always but rather only for XWiki pages that have an object (metadata) with these properties (content and extract) whose values are matching the search query. Maybe you don’t want the search to match the page metadata.

1 Like

@Johndoan, note that forum.xwiki.org doesn’t run on a XWiki. It is running on a Discourse instance.

@mflorea, is it not possible to get indexed the rendered content of XWiki pages? Or to search only in rendered content of XWiki pages?

Thanks!

1 Like

It’s already the case, but it’s not full rendering because rendering transformations (e.g. macros) are not executed (it would be dangerous, and in any case the output of a rendering macro can depend on the current user, while the search index is shared by all users).

That’s what the “Page Content” search suggest source does. You can achieve the same with the main search page by fiddling with Main.SolrSearchConfig (e.g. modify the queryFields parameter).

2 Likes