On Wed, May 20, 2009 at 16:24, PERINAUD Christophe
<[email protected]> wrote:
> Hello
>
> I try to make the WebSearch to search for documents in different wikis.
> In the WebSearchCode, i loop on 3 wikis, changing the context 
> ($context.setDatabase)but it does not work. I try to give each wiki's name to 
> the searchDocuments function (like #foreach ($item in 
> $xwiki.searchDocuments("$wikiSearch", $sql , $nbitems, 0, null)) But still 
> does not work.
>
> Any idea if it's possible and how ?

You need programing right to use $context.setDatabase(database),
otherwise it does nothing. But you can use
XWiki.searchDocumentsNames(String wikiName, String
parametrizedSqlClause, int nb, int start, List< ? > parameterValues)
which support the name of the wiki. See
http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/api/XWiki.html#searchDocumentsNames%28java.lang.String,%20java.lang.String,%20int,%20int,%20java.util.List%29

>
> Thank you all
>
> Christophe Périnaud
> Windows Server 2003 SP2 in a VMWare instance
> Oracle 10g
> Java 1.6.0_12
> Xwiki 1.8 from the pack Jetty/HSQL
>
>
> --------------------------------------------------------------------------------
>
> This e-mail is intended only for the addressee named above. It does not bind 
> the sender, except in the case of an existing written convention with the 
> addressee. This e-mail may contain material that is confidential and 
> privileged for the sole use of the intended recipient. Any review, reliance 
> or distribution by others or forwarding without express permission is 
> strictly prohibited and may be unlawful. If you are not the intended 
> recipient, please contact the sender and delete all copies.
>
> While reasonable precautions have been taken to ensure that this e-mail and 
> any attachments are free from any computer virus or similar defect, no 
> liability will be accepted in that respect. Anyone accessing this e-mail must 
> take their own precautions as to security and virus protection.
>
> KBL European Private Bankers S.A., 43 boulevard Royal L-2955 Luxembourg, 
> R.C.S. Luxembourg B 6395, T (352) 47 97 1
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Thomas Mortagne
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to