On Fri, Jul 18, 2014 at 10:30 PM, vinc...@massol.net <vinc...@massol.net> wrote: > > > > > On 18 Jul 2014 at 19:31:50, Jeremie BOUSQUET > (jeremie.bousq...@gmail.com(mailto:jeremie.bousq...@gmail.com)) wrote: > >> 2014-07-18 18:01 GMT+02:00 Marius Dumitru Florea < >> mariusdumitru.flo...@xwiki.com>: >> >> > On Fri, Jul 18, 2014 at 5:29 PM, Jeremie BOUSQUET >> > wrote: >> > > Hello, >> > > >> > > I tried the sample show in [1], changing it to the following: >> > > >> > > #set ($queryStatement = 'property.XWiki.TagClass.tags:') >> > > #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 "" 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. >> > >> > This works for me: >> > >> > property.XWiki.TagClass.tags:Development >> > >> > And the above code works too if I replace "" with >> > "Development". Of course, I've tagged a few documents with >> > Development. >> > >> > > >> > > 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 >> > :) >> > >> > Besides what Jeremie has mentioned, there is also >> > >> > http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HFacetingonObjectProperties >> > . You can configure the Solr Search UI to add a new facet for tags. >> > I've just added >> > >> > property.XWiki.TagClass.tags_string >> > >> > and it simply worked! >> > >> >> Worked for me too, that's really nice, thanks ! >
> And I’ve now documented this example at > http://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application#HFacetingonObjectProperties There was an example above for publishDate property of Blog.BlogPostClass but it wasn't very explicit. Another example won't hurt :) Thanks, Marius > > :) > > Thanks > -Vincent > >> > Hope this helps, >> > Marius >> > >> > > >> > > [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 : >> > > >> > >> 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