Re: [xwiki-users] exclude attachments from search
Hi, Well, you have 2 options: 1) when you search for something, simply add -type:attachment (without quotes) after you search to exclude attachments from your result 2) edit the page Main.LuceneSearch and look for this (along about 2 thirds of the document): ## --- ## Lucene search ## --- #set($searchresults = $lucene.getSearchResults(+(${query})${extraClause}${hiddenClause}, '', $wikinames, $!languages)) Edit it and add the extra clause that I mentioned at point 1). Doing so will no longer require you to do option 1) each time, in the input field, and it will be set as default. Example: ## --- ## Lucene search ## --- #set($extraClause = -type:attachment${extraClause}) #set($searchresults = $lucene.getSearchResults(+(${query})${extraClause}${hiddenClause}, '', $wikinames, $!languages)) (Note the extra line that I have added) Hope this helps. P.S.: Make sure to check out the new Solr search (currently in experimental phase). It has advanced search options and will also feature faceted search. Thanks, Eduard On Wed, Jan 16, 2013 at 11:24 AM, CarlJ c...@host-factory.co.uk wrote: Sorry to bump this but I would really grateful if someone could help me on this matter Thanks -- View this message in context: http://xwiki.475771.n2.nabble.com/exclude-attachments-from-search-tp7583287p7583301.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ 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
Re: [xwiki-users] exclude attachments from search
## --- ## Lucene search ## --- #set($extraClause = -type:attachment${extraClause}) #set($searchresults = $lucene.getSearchResults(+(${query})${extraClause}${hiddenClause}, '', $wikinames, $!languages)) (Note the extra line that I have added) Hi Eduard, Thanks a million for this, so far its working how I want. P.S.: Make sure to check out the new Solr search (currently in experimental phase). It has advanced search options and will also feature faceted search. I read the release note for this and it does a nice improvement and exactly what this company I am contracted to work for need, but unfortunately I'm not willing to implement this until the feature is out of experimental phase as I am working on a live production server Thanks again, Carl J -- View this message in context: http://xwiki.475771.n2.nabble.com/exclude-attachments-from-search-tp7583287p7583369.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] exclude attachments from search
Sorry to bump this but I would really grateful if someone could help me on this matter Thanks -- View this message in context: http://xwiki.475771.n2.nabble.com/exclude-attachments-from-search-tp7583287p7583301.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] exclude attachments from search
Afternoon all, I was wondering if its at all possible to exclude attachments from showing up in xwiki search Thanks -- View this message in context: http://xwiki.475771.n2.nabble.com/exclude-attachments-from-search-tp7583287.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users