Hello,

I tried the sample show in [1], changing it to the following:

#set ($queryStatement = 'property.XWiki.TagClass.tags:<my tag>')
#set ($query = $services.query.createQuery($queryStatement, 'solr'))
#set ($discard = $query.setLimit(10).setOffset(0))
#set ($discard = $query.bindValue('sort', "score desc"))
#set ($discard = $query.bindValue('fq', '{!q.op=AND} type:DOCUMENT
locales:(en OR fr) hidden:false'))
#set ($searchResponses = $query.execute()[0])
$searchResponses

I replaced "<my tag>" by the name of a tag existing on some pages, but I
could never obtain search results with this sample ... And I don't know
what should be put in search field in UI to obtain something equivalent.

There's also XWIKI-9413 [2] that seems to relate, but to be honest, I'm a
bit lost with how to use solr search and how it integrates with xwiki, so I
won't be of much help I'm afraid ... :/ But I'm interested in the answer :)

[1] -
http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Query+API
[2] - http://jira.xwiki.org/browse/XWIKI-9413



2014-07-18 14:20 GMT+02:00 Fabien Munoz <munozfab...@gmail.com>:

> Hello,
>
> I would like to be able to refine searches in xwiki enterprise by tags as I
> already can by Spaces or wikis. How can I do that?
>
> Is there any way to do the same directly into the search input? Something
> like 'install  tag:linux' would search for the word 'install', on into
> pages tagged 'linux'.
>
> Thanks in advance,
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to