Different results between search box and search page

Xwiki 14.10.18, I’ve noticed that searching for “/etc/apache” yields different results between the search box at the top of each page and the search page:

immagine

immagine

Actually, the Page results from the search box aren’t 100% relevant, it looks like “etc” and “apache” are treated as separate words, but that’s another matter.

Any hint? Thanks.

That’s expected, because the search box (search suggest) actually performs multiple specific searches (one for the page title, one for page content, etc.), each of them having a different configuration (e.g. different weight or boost on the matched fields). The search for page title obviously boosts the results that match the page title, while the search for page content boosts the page content, and so on. You can configure these search suggest sources from the wiki administration.

On the other hand, the search page performs a single generic search, that matches various document fields using some predefined weighs / boosts. This can be configured from Main.SolrSearchConfig.

That’s also expected because we’re using full text search (Solr) which analyzes both the search input (splitting it into tokens, filtering special symbols, etc.) and the indexed content (document title, content, etc.). It’s not a simple “string contains” or prefix match.

See https://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application .

Hope this helps,
Marius

Well, I always thought that the search box was like a “quick search” while the search page held more complete results, so knowing that they run different search logics sounds a bit strange to me.

But that’s how it works, so I guess that’s how it works :slight_smile:

Thanks.