On Mon, Jan 16, 2017 at 5:12 PM, Enste, Patrick <patrick.en...@atos.net>

> Hey,
> I have googled for quite some time but wasn't able to find an answer to my
> question.
> Is it possible to exclude the "raw content" from the solr search? I don't
> want it to be indexed and I don't want it to be shown as result. At the
> moment every "{{html}}" (and so on) can be found via search.

Preventing XWiki from indexing the raw page content is possible but it's
not easy. You would have to overwrite some of the Java components that are
used to index the XWiki pages.

Preventing XWiki from matching the raw page content when performing a
search is easier, but it depends on where you do the search from. Each
place may have its own search configuration. By default there are two
standard places you can search from:

* Search suggest from the top right corner.
In this case each search result is provided by a search suggest source that
you can configure in the wiki administration. Check the "Page content"
source for instance. Remove "doccontentraw" from "qf" (query fields).

* Main search page.
. The configuration is taken from a separate page. Check the "queryFields"
configuration option. Remove "doccontentraw^0.4".

Hope this helps,

> I am using XWiki 7.1.1.
> Best regards,
> Patrick Enste

Reply via email to