Re: [xwiki-users] Exclude "raw content" from solr search

2017-01-23 Thread Enste, Patrick
Ahhh, ok. Maybe I will have a look on that.

Thank you very much for the help! :)

Best regards,
Patrick



Re: [xwiki-users] Exclude "raw content" from solr search

2017-01-19 Thread Marius Dumitru Florea
On Wed, Jan 18, 2017 at 12:37 PM, Enste, Patrick 
wrote:

> Hey,
>
> thank you very much :) This helped a lot! Now the raw content is not shown.
>
>

> Unfortunately I have another problem now: The text inside {{html}} tags
> (and so on) seems not to be indexed.
>

It is indexed, but as part of the raw content.. See
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/DocumentSolrMetadataExtractor.java#L106
. So if you have:

one {{html}}two{{/html}} three

doccontent: one three
doccontentraw: one {{html}}two{{/html}} three

So you can't have "two" without "{{html}}" ATM. Of course, you can try to
overwrite the DocumentSolrMetadataExtractor component, but I don't know if
there is a renderer that does what you wish.

Hope this helps,
Marius


>
> Best regards,
> Patrick
>
>


Re: [xwiki-users] Exclude "raw content" from solr search

2017-01-18 Thread Enste, Patrick
Hey,

thank you very much :) This helped a lot! Now the raw content is not shown.

Unfortunately I have another problem now: The text inside {{html}} tags (and so 
on) seems not to be indexed.

Best regards,
Patrick



Re: [xwiki-users] Exclude "raw content" from solr search

2017-01-17 Thread Marius Dumitru Florea
On Mon, Jan 16, 2017 at 5:12 PM, Enste, Patrick 
wrote:

> 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.
http://extensions.xwiki.org/xwiki/bin/view/Extension/Search+Application#HSearchSuggest
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.
http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HSearchUIConfiguration
. The configuration is taken from a separate page. Check the "queryFields"
configuration option. Remove "doccontentraw^0.4".

Hope this helps,
Marius


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


[xwiki-users] Exclude "raw content" from solr search

2017-01-16 Thread Enste, Patrick
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.

I am using XWiki 7.1.1.

Best regards,
Patrick Enste