Where can I configure the Solr Search UI to add a new facet for tags? I can see the kind of changes I have to make to add tags, but I don't know where to implement them...
Thanks in advance, 2014-07-21 11:34 GMT+02:00 vinc...@massol.net <vinc...@massol.net>: > > > > > On 21 Jul 2014 at 11:15:42, Marius Dumitru Florea ( > mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com)) > wrote: > > > On Fri, Jul 18, 2014 at 10:30 PM, 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 :) > > Yes I know. I've added this example for 2 reasons: > > 1) It took me a while to understand the existing example. It didn’t say > really how to do it in practice and when I looked at the config wiki page I > wondered how to do it. > 2) Using tags seems a pretty nice and common use case so it made sense to > me to add an example about it. Actually it could even make sense to have it > by default. > > Thanks > -Vincent > > > > 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