[xwiki-users] Access to Bindings in Python
The documentation seems to indicate that bindings normally available in Velocity like $context should be available in other scripting languages, but accessing 'context' in Python (e.g. if context.action == 'inline':) always gives me problems. Any help? Thanks, Josh
Try "xcontext" instead. "context" is reserved in JSR223 so we had to rename it. See http://markmail.org/message/o2trzrnv5xts6x6v Hope this helps, Jerome. On 12/9/09 2:50 AM, Josh Eastburn wrote:
The documentation seems to indicate that bindings normally available in Velocity like $context should be available in other scripting languages, but accessing 'context' in Python (e.g. if context.action == 'inline':) always gives me problems. Any help?
Thanks,
Josh _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, On Wed, Dec 9, 2009 at 02:50, Josh Eastburn <[email protected]> wrote:
The documentation seems to indicate that bindings normally available in Velocity like $context should be available in other scripting languages, but accessing 'context' in Python (e.g. if context.action == 'inline':) always gives me problems. Any help?
"context" is deprecated and contains JSR223 ScriptContext (it's a reserved keyword). You need to use "xcontext".
Thanks,
Josh _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
Thomas, So far, no luck. I tried a simple script like: {{python}} try: print xcontext.action except Exception: print 'exception' {{/python}} this outputs: exception Side note: {{python}} try: print xcontext.action except Exception as exc: print exc {{/python}} Results in a failure to execute the macro. -Josh On Wed, Dec 9, 2009 at 4:17 AM, Thomas Mortagne <[email protected]> wrote:
Hi,
On Wed, Dec 9, 2009 at 02:50, Josh Eastburn <[email protected]<jkeastburn%[email protected]>>
wrote:
The documentation seems to indicate that bindings normally available in Velocity like $context should be available in other scripting languages, but accessing 'context' in Python (e.g. if context.action == 'inline':) always gives me problems. Any help?
"context" is deprecated and contains JSR223 ScriptContext (it's a reserved keyword). You need to use "xcontext".
Thanks,
Josh _______________________________________________ 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
On Wed, Dec 9, 2009 at 22:08, Josh Eastburn <[email protected]> wrote:
Thomas,
So far, no luck.
I tried a simple script like:
{{python}} try: print xcontext.action except Exception: print 'exception' {{/python}}
this outputs:
exception
Side note:
{{python}} try: print xcontext.action except Exception as exc: print exc {{/python}}
Results in a failure to execute the macro.
Indeed it seems there is a bug in Jython JSR 223 implementation. I'm looking at it and will report the issue to jython if i can validate that it comes from jython.
-Josh
On Wed, Dec 9, 2009 at 4:17 AM, Thomas Mortagne <[email protected]> wrote:
Hi,
On Wed, Dec 9, 2009 at 02:50, Josh Eastburn <[email protected]<jkeastburn%[email protected]>>
wrote:
The documentation seems to indicate that bindings normally available in Velocity like $context should be available in other scripting languages, but accessing 'context' in Python (e.g. if context.action == 'inline':) always gives me problems. Any help?
"context" is deprecated and contains JSR223 ScriptContext (it's a reserved keyword). You need to use "xcontext".
Thanks,
Josh _______________________________________________ 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
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
On Thu, Dec 10, 2009 at 10:15, Thomas Mortagne <[email protected]> wrote:
On Wed, Dec 9, 2009 at 22:08, Josh Eastburn <[email protected]> wrote:
Thomas,
So far, no luck.
I tried a simple script like:
{{python}} try: print xcontext.action except Exception: print 'exception' {{/python}}
this outputs:
exception
Side note:
{{python}} try: print xcontext.action except Exception as exc: print exc {{/python}}
Results in a failure to execute the macro.
Indeed it seems there is a bug in Jython JSR 223 implementation. I'm looking at it and will report the issue to jython if i can validate that it comes from jython.
I has already been reported, see http://bugs.jython.org/issue1426, hope it will be fixed soon...
-Josh
On Wed, Dec 9, 2009 at 4:17 AM, Thomas Mortagne <[email protected]> wrote:
Hi,
On Wed, Dec 9, 2009 at 02:50, Josh Eastburn <[email protected]<jkeastburn%[email protected]>>
wrote:
The documentation seems to indicate that bindings normally available in Velocity like $context should be available in other scripting languages, but accessing 'context' in Python (e.g. if context.action == 'inline':) always gives me problems. Any help?
"context" is deprecated and contains JSR223 ScriptContext (it's a reserved keyword). You need to use "xcontext".
Thanks,
Josh _______________________________________________ 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
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
-- Thomas Mortagne
As a workaround you can get the current XWiki ExecutionContext component, here is how to do it in java (until I find how to write it in Python): XWikiContext context = (XWikiContext) com.xpn.xwiki.web.Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext"); On Thu, Dec 10, 2009 at 10:51, Thomas Mortagne <[email protected]> wrote:
On Thu, Dec 10, 2009 at 10:15, Thomas Mortagne <[email protected]> wrote:
On Wed, Dec 9, 2009 at 22:08, Josh Eastburn <[email protected]> wrote:
Thomas,
So far, no luck.
I tried a simple script like:
{{python}} try: print xcontext.action except Exception: print 'exception' {{/python}}
this outputs:
exception
Side note:
{{python}} try: print xcontext.action except Exception as exc: print exc {{/python}}
Results in a failure to execute the macro.
Indeed it seems there is a bug in Jython JSR 223 implementation. I'm looking at it and will report the issue to jython if i can validate that it comes from jython.
I has already been reported, see http://bugs.jython.org/issue1426, hope it will be fixed soon...
-Josh
On Wed, Dec 9, 2009 at 4:17 AM, Thomas Mortagne <[email protected]> wrote:
Hi,
On Wed, Dec 9, 2009 at 02:50, Josh Eastburn <[email protected]<jkeastburn%[email protected]>>
wrote:
The documentation seems to indicate that bindings normally available in Velocity like $context should be available in other scripting languages, but accessing 'context' in Python (e.g. if context.action == 'inline':) always gives me problems. Any help?
"context" is deprecated and contains JSR223 ScriptContext (it's a reserved keyword). You need to use "xcontext".
Thanks,
Josh _______________________________________________ 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
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne
On Thu, Dec 10, 2009 at 11:11, Thomas Mortagne <[email protected]> wrote:
As a workaround you can get the current XWiki ExecutionContext component, here is how to do it in java (until I find how to write it in Python):
XWikiContext context = (XWikiContext) com.xpn.xwiki.web.Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext");
XWikiContext context = (XWikiContext) com.xpn.xwiki.web.Utils.getComponent(org.xwiki.context.Execution.class).getContext().getProperty("xwikicontext"); to be more precise
On Thu, Dec 10, 2009 at 10:51, Thomas Mortagne <[email protected]> wrote:
On Thu, Dec 10, 2009 at 10:15, Thomas Mortagne <[email protected]> wrote:
On Wed, Dec 9, 2009 at 22:08, Josh Eastburn <[email protected]> wrote:
Thomas,
So far, no luck.
I tried a simple script like:
{{python}} try: print xcontext.action except Exception: print 'exception' {{/python}}
this outputs:
exception
Side note:
{{python}} try: print xcontext.action except Exception as exc: print exc {{/python}}
Results in a failure to execute the macro.
Indeed it seems there is a bug in Jython JSR 223 implementation. I'm looking at it and will report the issue to jython if i can validate that it comes from jython.
I has already been reported, see http://bugs.jython.org/issue1426, hope it will be fixed soon...
-Josh
On Wed, Dec 9, 2009 at 4:17 AM, Thomas Mortagne <[email protected]> wrote:
Hi,
On Wed, Dec 9, 2009 at 02:50, Josh Eastburn <[email protected]<jkeastburn%[email protected]>>
wrote:
The documentation seems to indicate that bindings normally available in Velocity like $context should be available in other scripting languages, but accessing 'context' in Python (e.g. if context.action == 'inline':) always gives me problems. Any help?
"context" is deprecated and contains JSR223 ScriptContext (it's a reserved keyword). You need to use "xcontext".
Thanks,
Josh _______________________________________________ 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
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne
Hi, I'd like to index files to find them with Lucene search (TXT, PDF, WORD, PPT, XML, HTML...) I found this very useful tool in apache projects : Solr (http://lucene.apache.org/solr/) This works on top of lucene search tool. Is it possible to install Apache Solr on XWiki ? Thanks Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu sch�tzen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Thomas, {{python}} try: from com.xpn.xwiki.web import Utils from org.xwiki.context import Execution except ImportError: print 'import error' try: context = Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext") except: print 'method call failed' {{/python}} outputs: method call failed I might just have to wait for a Jython fix. Thanks, Josh On Thu, Dec 10, 2009 at 2:26 AM, Thomas Mortagne <[email protected]>wrote:
On Thu, Dec 10, 2009 at 11:11, Thomas Mortagne <[email protected]> wrote:
As a workaround you can get the current XWiki ExecutionContext component, here is how to do it in java (until I find how to write it in Python):
XWikiContext context = (XWikiContext)
com.xpn.xwiki.web.Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext");
XWikiContext context = (XWikiContext)
com.xpn.xwiki.web.Utils.getComponent(org.xwiki.context.Execution.class).getContext().getProperty("xwikicontext");
to be more precise
On Thu, Dec 10, 2009 at 10:51, Thomas Mortagne <[email protected]> wrote:
On Thu, Dec 10, 2009 at 10:15, Thomas Mortagne <[email protected]> wrote:
On Wed, Dec 9, 2009 at 22:08, Josh Eastburn <
[email protected] <jkeastburn%[email protected]>> wrote:
Thomas,
So far, no luck.
I tried a simple script like:
{{python}} try: print xcontext.action except Exception: print 'exception' {{/python}}
this outputs:
exception
Side note:
{{python}} try: print xcontext.action except Exception as exc: print exc {{/python}}
Results in a failure to execute the macro.
Indeed it seems there is a bug in Jython JSR 223 implementation. I'm looking at it and will report the issue to jython if i can validate that it comes from jython.
I has already been reported, see http://bugs.jython.org/issue1426, hope it will be fixed soon...
-Josh
On Wed, Dec 9, 2009 at 4:17 AM, Thomas Mortagne <
wrote:
Hi,
On Wed, Dec 9, 2009 at 02:50, Josh Eastburn <
[email protected] <jkeastburn%[email protected]>< jkeastburn%[email protected] <jkeastburn%[email protected]>>> wrote:
> The documentation seems to indicate that bindings normally available in > Velocity like $context should be available in other scripting languages, but > accessing 'context' in Python (e.g. if context.action == 'inline':) always > gives me problems. Any help?
"context" is deprecated and contains JSR223 ScriptContext (it's a reserved keyword). You need to use "xcontext".
> > Thanks, > > Josh > _______________________________________________ > 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
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Thu, Dec 10, 2009 at 20:51, Josh Eastburn <[email protected]> wrote:
Thomas,
{{python}} try: from com.xpn.xwiki.web import Utils from org.xwiki.context import Execution except ImportError: print 'import error'
try: context = Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext") except: print 'method call failed' {{/python}}
outputs: method call failed
I might just have to wait for a Jython fix.
The problem is the "Execution.class" it seems, i don't know how to get the java class object in Jython but i guess there is a way.
Thanks,
Josh
On Thu, Dec 10, 2009 at 2:26 AM, Thomas Mortagne <[email protected]>wrote:
On Thu, Dec 10, 2009 at 11:11, Thomas Mortagne <[email protected]> wrote:
As a workaround you can get the current XWiki ExecutionContext component, here is how to do it in java (until I find how to write it in Python):
XWikiContext context = (XWikiContext)
com.xpn.xwiki.web.Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext");
XWikiContext context = (XWikiContext)
com.xpn.xwiki.web.Utils.getComponent(org.xwiki.context.Execution.class).getContext().getProperty("xwikicontext");
to be more precise
On Thu, Dec 10, 2009 at 10:51, Thomas Mortagne <[email protected]> wrote:
On Thu, Dec 10, 2009 at 10:15, Thomas Mortagne <[email protected]> wrote:
On Wed, Dec 9, 2009 at 22:08, Josh Eastburn <
[email protected] <jkeastburn%[email protected]>> wrote:
Thomas,
So far, no luck.
I tried a simple script like:
{{python}} try: print xcontext.action except Exception: print 'exception' {{/python}}
this outputs:
exception
Side note:
{{python}} try: print xcontext.action except Exception as exc: print exc {{/python}}
Results in a failure to execute the macro.
Indeed it seems there is a bug in Jython JSR 223 implementation. I'm looking at it and will report the issue to jython if i can validate that it comes from jython.
I has already been reported, see http://bugs.jython.org/issue1426, hope it will be fixed soon...
-Josh
On Wed, Dec 9, 2009 at 4:17 AM, Thomas Mortagne <
wrote: > > Hi, > > On Wed, Dec 9, 2009 at 02:50, Josh Eastburn < [email protected] <jkeastburn%[email protected]>< jkeastburn%[email protected] <jkeastburn%[email protected]>>> wrote: > > The documentation seems to indicate that bindings normally available in > > Velocity like $context should be available in other scripting languages, but > > accessing 'context' in Python (e.g. if context.action == 'inline':) always > > gives me problems. Any help? > > "context" is deprecated and contains JSR223 ScriptContext (it's a > reserved keyword). You need to use "xcontext". > > > > > Thanks, > > > > Josh > > _______________________________________________ > > 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 _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
On 12/10/2009 03:48 PM, Gaci, Hakim wrote:
Hi,
I'd like to index files to find them with Lucene search (TXT, PDF, WORD, PPT, XML, HTML...) I found this very useful tool in apache projects : Solr (http://lucene.apache.org/solr/) This works on top of lucene search tool. Is it possible to install Apache Solr on XWiki ?
Hi, Yes, it is possible, but it's not very easy at the moment, since the integration hasn't been done yet. We're also evaluating different strategies for our next search engine, since the current Lucene plugin is pretty old, buggy and deprecated. We can either reimplement or improve a direct Lucene plugin, use Solr, or use Compass. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi Sergiu, Thanks for your answer, I have to implement this for an important customer... I thought it was possible (and I know it won't be easy) But do know how I can do this ? The general steps and principles ? Do I have to create a plugin ? Regards -----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Sergiu Dumitriu Envoyé : lundi 14 décembre 2009 01:25 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ? On 12/10/2009 03:48 PM, Gaci, Hakim wrote:
Hi,
I'd like to index files to find them with Lucene search (TXT, PDF, WORD, PPT, XML, HTML...) I found this very useful tool in apache projects : Solr (http://lucene.apache.org/solr/) This works on top of lucene search tool. Is it possible to install Apache Solr on XWiki ?
Hi, Yes, it is possible, but it's not very easy at the moment, since the integration hasn't been done yet. We're also evaluating different strategies for our next search engine, since the current Lucene plugin is pretty old, buggy and deprecated. We can either reimplement or improve a direct Lucene plugin, use Solr, or use Compass. -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Hi, On Dec 14, 2009, at 10:10 AM, Gaci, Hakim wrote:
Hi Sergiu,
Thanks for your answer, I have to implement this for an important customer... I thought it was possible (and I know it won't be easy) But do know how I can do this ? The general steps and principles ? Do I have to create a plugin ?
The best solution IMO is to contact XWiki SAS (http://xwiki.com) and ask them if they could do custom development for you (ie subcontract to them). If not then you'll need to read the source code since this is not done and there's no documentation on this. Note that what you do may also be made obsolete later on when we work on this here (unless you participate and propose a design here, make it accepted and develop it collaboratively with the xwiki developers). Thanks -Vincent
Regards
-----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Sergiu Dumitriu Envoyé : lundi 14 décembre 2009 01:25 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ?
On 12/10/2009 03:48 PM, Gaci, Hakim wrote:
Hi,
I'd like to index files to find them with Lucene search (TXT, PDF, WORD, PPT, XML, HTML...) I found this very useful tool in apache projects : Solr (http://lucene.apache.org/solr/ ) This works on top of lucene search tool. Is it possible to install Apache Solr on XWiki ?
Hi,
Yes, it is possible, but it's not very easy at the moment, since the integration hasn't been done yet.
We're also evaluating different strategies for our next search engine, since the current Lucene plugin is pretty old, buggy and deprecated. We can either reimplement or improve a direct Lucene plugin, use Solr, or use Compass.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Dec 14, 2009, at 10:14 AM, Vincent Massol wrote:
Hi,
On Dec 14, 2009, at 10:10 AM, Gaci, Hakim wrote:
Hi Sergiu,
Thanks for your answer, I have to implement this for an important customer... I thought it was possible (and I know it won't be easy) But do know how I can do this ? The general steps and principles ? Do I have to create a plugin ?
The best solution IMO is to contact XWiki SAS (http://xwiki.com) and ask them if they could do custom development for you (ie subcontract to them).
Just to clarify what I meant (since I found it not clear after re- reading myself): - One way to participate to the XWiki projects is to sponsor the development of some features. This has a double advantage: it helps the XWiki project and in addition if what is developed goes back in the community you get "free" support for it in future releases. The other way is to participate directly to the xwiki development here by making a design proposal, gather a discussion around your idea, generate an agreement, create some patches implementing the idea and get some committers to commit them for you (basically this is exactly what XWiki SAS would do if you contacted them to help you with this development). Thanks -Vincent PS: For full disclosure, I am XWiki SAS CTO. I am also a xwiki committer. Hence the reason I present the 2 sides of the story and the 2 possibilities that exist ;)
If not then you'll need to read the source code since this is not done and there's no documentation on this. Note that what you do may also be made obsolete later on when we work on this here (unless you participate and propose a design here, make it accepted and develop it collaboratively with the xwiki developers).
Thanks -Vincent
Regards
-----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Sergiu Dumitriu Envoyé : lundi 14 décembre 2009 01:25 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ?
On 12/10/2009 03:48 PM, Gaci, Hakim wrote:
Hi,
I'd like to index files to find them with Lucene search (TXT, PDF, WORD, PPT, XML, HTML...) I found this very useful tool in apache projects : Solr (http://lucene.apache.org/solr/ ) This works on top of lucene search tool. Is it possible to install Apache Solr on XWiki ?
Hi,
Yes, it is possible, but it's not very easy at the moment, since the integration hasn't been done yet.
We're also evaluating different strategies for our next search engine, since the current Lucene plugin is pretty old, buggy and deprecated. We can either reimplement or improve a direct Lucene plugin, use Solr, or use Compass.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
I can't find any source files in the XWiki Enterprise folder... no .java, no .jsp !? Did I miss something ? -----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Vincent Massol Envoyé : lundi 14 décembre 2009 10:26 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ? On Dec 14, 2009, at 10:14 AM, Vincent Massol wrote:
Hi,
On Dec 14, 2009, at 10:10 AM, Gaci, Hakim wrote:
Hi Sergiu,
Thanks for your answer, I have to implement this for an important customer... I thought it was possible (and I know it won't be easy) But do know how I can do this ? The general steps and principles ? Do I have to create a plugin ?
The best solution IMO is to contact XWiki SAS (http://xwiki.com) and ask them if they could do custom development for you (ie subcontract to them).
Just to clarify what I meant (since I found it not clear after re- reading myself): - One way to participate to the XWiki projects is to sponsor the development of some features. This has a double advantage: it helps the XWiki project and in addition if what is developed goes back in the community you get "free" support for it in future releases. The other way is to participate directly to the xwiki development here by making a design proposal, gather a discussion around your idea, generate an agreement, create some patches implementing the idea and get some committers to commit them for you (basically this is exactly what XWiki SAS would do if you contacted them to help you with this development). Thanks -Vincent PS: For full disclosure, I am XWiki SAS CTO. I am also a xwiki committer. Hence the reason I present the 2 sides of the story and the 2 possibilities that exist ;)
If not then you'll need to read the source code since this is not done and there's no documentation on this. Note that what you do may also be made obsolete later on when we work on this here (unless you participate and propose a design here, make it accepted and develop it collaboratively with the xwiki developers).
Thanks -Vincent
Regards
-----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Sergiu Dumitriu Envoyé : lundi 14 décembre 2009 01:25 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ?
On 12/10/2009 03:48 PM, Gaci, Hakim wrote:
Hi,
I'd like to index files to find them with Lucene search (TXT, PDF, WORD, PPT, XML, HTML...) I found this very useful tool in apache projects : Solr (http://lucene.apache.org/solr/ ) This works on top of lucene search tool. Is it possible to install Apache Solr on XWiki ?
Hi,
Yes, it is possible, but it's not very easy at the moment, since the integration hasn't been done yet.
We're also evaluating different strategies for our next search engine, since the current Lucene plugin is pretty old, buggy and deprecated. We can either reimplement or improve a direct Lucene plugin, use Solr, or use Compass.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
So I can do this by developing a new plugin "SolrSearch" ? -----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Vincent Massol Envoyé : lundi 14 décembre 2009 10:26 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ? On Dec 14, 2009, at 10:14 AM, Vincent Massol wrote:
Hi,
On Dec 14, 2009, at 10:10 AM, Gaci, Hakim wrote:
Hi Sergiu,
Thanks for your answer, I have to implement this for an important customer... I thought it was possible (and I know it won't be easy) But do know how I can do this ? The general steps and principles ? Do I have to create a plugin ?
The best solution IMO is to contact XWiki SAS (http://xwiki.com) and ask them if they could do custom development for you (ie subcontract to them).
Just to clarify what I meant (since I found it not clear after re- reading myself): - One way to participate to the XWiki projects is to sponsor the development of some features. This has a double advantage: it helps the XWiki project and in addition if what is developed goes back in the community you get "free" support for it in future releases. The other way is to participate directly to the xwiki development here by making a design proposal, gather a discussion around your idea, generate an agreement, create some patches implementing the idea and get some committers to commit them for you (basically this is exactly what XWiki SAS would do if you contacted them to help you with this development). Thanks -Vincent PS: For full disclosure, I am XWiki SAS CTO. I am also a xwiki committer. Hence the reason I present the 2 sides of the story and the 2 possibilities that exist ;)
If not then you'll need to read the source code since this is not done and there's no documentation on this. Note that what you do may also be made obsolete later on when we work on this here (unless you participate and propose a design here, make it accepted and develop it collaboratively with the xwiki developers).
Thanks -Vincent
Regards
-----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Sergiu Dumitriu Envoyé : lundi 14 décembre 2009 01:25 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ?
On 12/10/2009 03:48 PM, Gaci, Hakim wrote:
Hi,
I'd like to index files to find them with Lucene search (TXT, PDF, WORD, PPT, XML, HTML...) I found this very useful tool in apache projects : Solr (http://lucene.apache.org/solr/ ) This works on top of lucene search tool. Is it possible to install Apache Solr on XWiki ?
Hi,
Yes, it is possible, but it's not very easy at the moment, since the integration hasn't been done yet.
We're also evaluating different strategies for our next search engine, since the current Lucene plugin is pretty old, buggy and deprecated. We can either reimplement or improve a direct Lucene plugin, use Solr, or use Compass.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Gaci, Hakim wrote:
I can't find any source files in the XWiki Enterprise folder... no .java, no .jsp !? Did I miss something ?
Have you read http://dev.xwiki.org/xwiki/bin/view/Community/SourceRepository ? Marius
-----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Vincent Massol Envoyé : lundi 14 décembre 2009 10:26 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ?
On Dec 14, 2009, at 10:14 AM, Vincent Massol wrote:
Hi,
On Dec 14, 2009, at 10:10 AM, Gaci, Hakim wrote:
Hi Sergiu,
Thanks for your answer, I have to implement this for an important customer... I thought it was possible (and I know it won't be easy) But do know how I can do this ? The general steps and principles ? Do I have to create a plugin ? The best solution IMO is to contact XWiki SAS (http://xwiki.com) and ask them if they could do custom development for you (ie subcontract to them).
Just to clarify what I meant (since I found it not clear after re- reading myself): - One way to participate to the XWiki projects is to sponsor the development of some features. This has a double advantage: it helps the XWiki project and in addition if what is developed goes back in the community you get "free" support for it in future releases.
The other way is to participate directly to the xwiki development here by making a design proposal, gather a discussion around your idea, generate an agreement, create some patches implementing the idea and get some committers to commit them for you (basically this is exactly what XWiki SAS would do if you contacted them to help you with this development).
Thanks -Vincent
PS: For full disclosure, I am XWiki SAS CTO. I am also a xwiki committer. Hence the reason I present the 2 sides of the story and the 2 possibilities that exist ;)
If not then you'll need to read the source code since this is not done and there's no documentation on this. Note that what you do may also be made obsolete later on when we work on this here (unless you participate and propose a design here, make it accepted and develop it collaboratively with the xwiki developers).
Thanks -Vincent
Regards
-----Message d'origine----- De : [email protected] [mailto:[email protected]] De la part de Sergiu Dumitriu Envoyé : lundi 14 décembre 2009 01:25 À : XWiki Users Objet : Re: [xwiki-users] Apache Solr installation ?
On 12/10/2009 03:48 PM, Gaci, Hakim wrote:
Hi,
I'd like to index files to find them with Lucene search (TXT, PDF, WORD, PPT, XML, HTML...) I found this very useful tool in apache projects : Solr (http://lucene.apache.org/solr/ ) This works on top of lucene search tool. Is it possible to install Apache Solr on XWiki ? Hi,
Yes, it is possible, but it's not very easy at the moment, since the integration hasn't been done yet.
We're also evaluating different strategies for our next search engine, since the current Lucene plugin is pretty old, buggy and deprecated. We can either reimplement or improve a direct Lucene plugin, use Solr, or use Compass.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu schützen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, I wrote the workaround for getting context/document/wiki access in python. i will be posting as a snippet and reference in scripting howto. {{python}} # This python snippet loads the script engine bindings which are unavailable in jython # because of http://bugs.jython.org/issue1426 # The only bindings which are loaded are: xcontext, doc, xwiki, request and response import com.xpn.xwiki.web.Utils as Utils import org.xwiki.context.Execution as Execution import com.xpn.xwiki.api.Context as Context import com.xpn.xwiki.api.XWiki as XWiki import com.xpn.xwiki.api.Document as Document xcontext = Context(Utils.getComponent(Execution).getContext().getProperty("xwikicontext")) doc = Document(xcontext.getDoc(), xcontext.getContext()) xwiki = XWiki(xcontext.getXWiki(), xcontext.getContext()) request = xcontext.getRequest() response = xcontext.getResponse() #insert your python code here {{/python}} Good Luck, Caleb James DeLisle Thomas Mortagne wrote:
On Thu, Dec 10, 2009 at 20:51, Josh Eastburn <[email protected]> wrote:
Thomas,
{{python}} try: from com.xpn.xwiki.web import Utils from org.xwiki.context import Execution except ImportError: print 'import error'
try: context = Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext") except: print 'method call failed' {{/python}}
outputs: method call failed
I might just have to wait for a Jython fix.
The problem is the "Execution.class" it seems, i don't know how to get the java class object in Jython but i guess there is a way.
Thanks,
Josh
On Thu, Dec 10, 2009 at 2:26 AM, Thomas Mortagne <[email protected]>wrote:
On Thu, Dec 10, 2009 at 11:11, Thomas Mortagne <[email protected]> wrote:
As a workaround you can get the current XWiki ExecutionContext component, here is how to do it in java (until I find how to write it in Python):
XWikiContext context = (XWikiContext)
com.xpn.xwiki.web.Utils.getComponent(Execution.class).getContext().getProperty("xwikicontext");
XWikiContext context = (XWikiContext)
com.xpn.xwiki.web.Utils.getComponent(org.xwiki.context.Execution.class).getContext().getProperty("xwikicontext");
to be more precise
On Thu, Dec 10, 2009 at 10:51, Thomas Mortagne <[email protected]> wrote:
On Thu, Dec 10, 2009 at 10:15, Thomas Mortagne <[email protected]> wrote:
On Wed, Dec 9, 2009 at 22:08, Josh Eastburn < [email protected] <jkeastburn%[email protected]>> wrote: > Thomas, > > So far, no luck. > > I tried a simple script like: > > {{python}} > try: > print xcontext.action > except Exception: > print 'exception' > {{/python}} > > this outputs: > > exception > > Side note: > > {{python}} > try: > print xcontext.action > except Exception as exc: > print exc > {{/python}} > > Results in a failure to execute the macro. Indeed it seems there is a bug in Jython JSR 223 implementation. I'm looking at it and will report the issue to jython if i can validate that it comes from jython. I has already been reported, see http://bugs.jython.org/issue1426, hope it will be fixed soon...
> -Josh > > On Wed, Dec 9, 2009 at 4:17 AM, Thomas Mortagne < [email protected]> > wrote: >> Hi, >> >> On Wed, Dec 9, 2009 at 02:50, Josh Eastburn < [email protected] <jkeastburn%[email protected]>< jkeastburn%[email protected] <jkeastburn%[email protected]>>> > wrote: >>> The documentation seems to indicate that bindings normally available in >>> Velocity like $context should be available in other scripting languages, > but >>> accessing 'context' in Python (e.g. if context.action == 'inline':) > always >>> gives me problems. Any help? >> "context" is deprecated and contains JSR223 ScriptContext (it's a >> reserved keyword). You need to use "xcontext". >> >>> Thanks, >>> >>> Josh >>> _______________________________________________ >>> 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 > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users >
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne
-- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (8)
-
Caleb James DeLisle -
Gaci, Hakim -
Jerome Velociter -
Josh Eastburn -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol