Search suggestion only showing attachments, search only documents

Recently we have migrated from Confluence to XWiki. I’ve imported all the pages and everything is working as it should be…except for searching.

I’ve edited some search settings but reverted all changes (except some default pages are now in nl_NL (because I’ve changed all pages to Dutch after migrating from Confluence). I can’t find the source of the issue.

The issue being: When we are using search suggestion, we are only being shown attachments and attachment content, instead of documents (and document content). See here:

https://i.imgur.com/Gs5GIvU.png

Furthermore, when we hit the return button to go to the main search page, we are only getting documents (https://i.imgur.com/DcH1K4R.png) because only “Document” is the only option enabled by default in the “Refine your search”-column.

I’m hoping to fix the following issues:

  1. Show documents as well in the search suggestion bar
  2. Show all search types in the main search by default

Basically my goal is to get the search suggestion and the normal search to shown similar results, without users having to finetune their search settings each time they search.

Can someone point me in the right direction for this? Any help is greatly appreciated!

Hello @Milenco,

Regarding the quick search results. Are you sure your search term matches both some pages and some attachments (e.g., your search term does not match any documents)?
Also, did you check if the solr indexation was completed before doing the search? You can check by going to the Search section of the admin and look at the “Queue size”.

For the search page. Currently it’s possible to either filter on a single result type (e.g., “document” is checked in the “Result type” section of the right hand side pane), or to not have a filter are all. But it is not possible to filter on several Result types from the UI.

If you want to look at the code, the xwiki-platform-search-ui module is a good starting point.

Hope that helps.

Hello @mleduc,

Thanks for taking the time to reply. Well spotted that there aren’t any documents in my results, which is true. However, using a different phrase I get the same result:

https://i.imgur.com/CxCvcx3.png
https://i.imgur.com/LJFsYPL.png

Queue size is also zero, even tried rebuilding the index a few time without the desired result.

Browsed through the code, but can’t find any leads. There are a lot of xml configuration files. Which one should I define to not filter on the main search, so all content is searched by default?

Something else I just noticed: Something I do get documents in my results in the search suggestion. However, not the document I’m looking for.

In this example, the document can be found as the second result in the main search, but it doesn’t show up in the search suggestions:
https://i.imgur.com/jjCuZM2.png

Edit: Might be useful to tell I’m running XWiki Debian 14.7.

Hm, I’m not sure but sounds a bit like the problem with solr search we had.

We migrated about 7.000 articles via api with no language set. But then we set our default language to de_DE. All new created articles then had the language de_DE. We never found any strings from the content of one of those de_DE articles. (Titles we found.) For testing we switched our default language to de. Now articles newly created with language de would be found immediately.

As a workaround we for a short time switched to multilanguage and changed all de_DE articles to de manually and switched multilanguage off.

Maybe you can test it with nl vs. nl_NL?

(We run 13.10.6 Debian.)

Thanks a lot @Simpel for pointing me in the right direction. I believe it have solved the issue.

In our case, we also imported our documents (with the Confluence importer) so all our documents didn’t have the right language. I’ve used the extension " Default Language Updater" to change the language to nl_NL and also disabled multi-language in the Wiki. This was probably the cause of the issue. Furthermore, I’ve noticed the accepted language was setup as nl while the default language was nl_NL (configuration error on my side).

So, what did I do:

  1. Changed both the accepted languages as the default language to “nl” instead of “nl_NL”. Also disabled multi-language wiki.
  2. In the XWiki database, I’ve updated the table xwikidoc, updated all XWD_DEFAULT_LANGUAGE columns from nl_NL to nl.
  3. Re-indexed the Wiki

Now, both the search suggestion as well as the normal search seem to find all documents as intented! :slight_smile:. Thanks again for your suggestions @Simpel.

Only (small) issue I have now is that I would like to search for all documents by default, so have “Document” unchecked by default in the Result type panel in the “Refine your search” sidepanel. We’ll research some more on this and post an update if I find a solution.

You’re welcome.

We did a longer research about this, some days ago. We were not sure, whether it was a misconfiguration by us or more of a bug.

@vmassol Would you consider this a bug? Shall we write a jira ticket? Do you have a suggestion for the summury/ title of the ticket.

Sorry I’m not well versed with the search/solr feature and translations. Maybe @mflorea has some idea?

Edit the Main.SolrSearchConfig page using the wiki editor, look for facetQuery and remove this line:

'type': 'DOCUMENT',

Save and then perform another search from the top bar. This affects only the main search page.

Hope this helps,
Marius

1 Like

See Loading... . I guess you wan to report something similar for nl_NL and de_DE. Check also the related issues, some of which are about similar locales.

1 Like