Re: Build Solr to run SolrJS
I just got the client-side demo on trunk to work (with a few tweaks to make it work with the example core Solr data). On trunk follow these steps: * root directory: ant example * separate console, index data: cd example/exampledocs; java -jar post.jar *.xml * open contrib/javascript/example/testClientside.html in your browser The serverSide.html example is still not quite wired together properly to be an easy-to-run-demo, as what's on trunk doesn't include the reuters data and the velocity stuff is not wired in with it yet either. We'll get this working better/cleaner as we go, so we appreciate your early adopter help ironing out this stuff. Erik On Nov 20, 2008, at 5:44 PM, JCodina wrote: I could not manage, yet to use it. :confused: My doubts are: - must I download solr from svn - trunk? - then, must I apply the patches of solrjs and velocity and unzip the files? or is this already in trunk? because trunk contains velocity and javascript in contrib. but does not find the velocity - How do I edit/activate SolrJs to adapt it to my data, the wiki page says how to deploy the sample, and I looked at the sample page from the sample site, but I don't find how to manually install it on a tomcat server. PD. If I get how to do it, I promise I will introduce that information in the solrjs wiki page =) . Matthias Epheser wrote: Erik Hatcher schrieb: On Nov 16, 2008, at 1:40 PM, Matthias Epheser wrote: Matthias and Ryan - let's get SolrJS integrated into contrib/velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/ javascript and create a dependency to contrib/velocity for ServerSideWidgets? Sure, contrib/javascript sounds perfect. If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. Awesome, thanks! Just uploaded solrjs.zip to https://issues.apache.org/jira/browse/SOLR-868. It is intended to be extracted in contrib/javascript and supports the following ant targets: * ant dist - creates a single js file and a jar that holds velocity templates. * ant docs - creates js docs. test in browser: doc/index.html * ant example-init - (depends ant dist on solr root) copies the current built of solr.war and solr-velocity.jar to example/testsolr/.. * ant example-start - starts the testsolr server on port 8983 * ant example-import - imports 3000 test data rows (requires a started testserver) Erik -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20611635.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
On Nov 22, 2008, at 4:26 AM, Erik Hatcher wrote: I just got the client-side demo on trunk to work (with a few tweaks to make it work with the example core Solr data). On trunk follow these steps: * root directory: ant example One extra step needed, for the pedantic... * launch Solr: cd example; java -jar start.jar * separate console, index data: cd example/exampledocs; java -jar post.jar *.xml * open contrib/javascript/example/testClientside.html in your browser The serverSide.html example is still not quite wired together properly to be an easy-to-run-demo, as what's on trunk doesn't include the reuters data and the velocity stuff is not wired in with it yet either. We'll get this working better/cleaner as we go, so we appreciate your early adopter help ironing out this stuff. Erik
Re: Build Solr to run SolrJS
Yesterday I got it running, I thouhght I had post it, but I should not push the post button. The problem I had to solve to run it with the Velocity was to copy by hand the velocity jar files to /lib. Erik Hatcher wrote: I just got the client-side demo on trunk to work (with a few tweaks to make it work with the example core Solr data). On trunk follow these steps: * root directory: ant example * separate console, index data: cd example/exampledocs; java -jar post.jar *.xml * open contrib/javascript/example/testClientside.html in your browser The serverSide.html example is still not quite wired together properly to be an easy-to-run-demo, as what's on trunk doesn't include the reuters data and the velocity stuff is not wired in with it yet either. We'll get this working better/cleaner as we go, so we appreciate your early adopter help ironing out this stuff. Erik On Nov 20, 2008, at 5:44 PM, JCodina wrote: I could not manage, yet to use it. :confused: My doubts are: - must I download solr from svn - trunk? - then, must I apply the patches of solrjs and velocity and unzip the files? or is this already in trunk? because trunk contains velocity and javascript in contrib. but does not find the velocity - How do I edit/activate SolrJs to adapt it to my data, the wiki page says how to deploy the sample, and I looked at the sample page from the sample site, but I don't find how to manually install it on a tomcat server. PD. If I get how to do it, I promise I will introduce that information in the solrjs wiki page =) . Matthias Epheser wrote: Erik Hatcher schrieb: On Nov 16, 2008, at 1:40 PM, Matthias Epheser wrote: Matthias and Ryan - let's get SolrJS integrated into contrib/velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/ javascript and create a dependency to contrib/velocity for ServerSideWidgets? Sure, contrib/javascript sounds perfect. If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. Awesome, thanks! Just uploaded solrjs.zip to https://issues.apache.org/jira/browse/SOLR-868. It is intended to be extracted in contrib/javascript and supports the following ant targets: * ant dist - creates a single js file and a jar that holds velocity templates. * ant docs - creates js docs. test in browser: doc/index.html * ant example-init - (depends ant dist on solr root) copies the current built of solr.war and solr-velocity.jar to example/testsolr/.. * ant example-start - starts the testsolr server on port 8983 * ant example-import - imports 3000 test data rows (requires a started testserver) Erik -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20611635.html Sent from the Solr - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20634725.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
JCodina schrieb: Yesterday I got it running, I thouhght I had post it, but I should not push the post button. The problem I had to solve to run it with the Velocity was to copy by hand the velocity jar files to /lib. There is an ant task example-init in contrib/javascript/build.xml that should do this trick for you. It copies solr.war to example/webapps and all the contrib/velicity stuff to example/solr/lib. I'm just about to post a patch to integrate a small set of testdata automatically to the example, so your're tweaking with the core testdata can be avoided. I will update the wiki as soon as this is commited. After that, only a checkout and ant example-init ant example-start ant example-import will create working examples for you. matthias Erik Hatcher wrote: I just got the client-side demo on trunk to work (with a few tweaks to make it work with the example core Solr data). On trunk follow these steps: * root directory: ant example * separate console, index data: cd example/exampledocs; java -jar post.jar *.xml * open contrib/javascript/example/testClientside.html in your browser The serverSide.html example is still not quite wired together properly to be an easy-to-run-demo, as what's on trunk doesn't include the reuters data and the velocity stuff is not wired in with it yet either. We'll get this working better/cleaner as we go, so we appreciate your early adopter help ironing out this stuff. Erik On Nov 20, 2008, at 5:44 PM, JCodina wrote: I could not manage, yet to use it. :confused: My doubts are: - must I download solr from svn - trunk? - then, must I apply the patches of solrjs and velocity and unzip the files? or is this already in trunk? because trunk contains velocity and javascript in contrib. but does not find the velocity - How do I edit/activate SolrJs to adapt it to my data, the wiki page says how to deploy the sample, and I looked at the sample page from the sample site, but I don't find how to manually install it on a tomcat server. PD. If I get how to do it, I promise I will introduce that information in the solrjs wiki page =) . Matthias Epheser wrote: Erik Hatcher schrieb: On Nov 16, 2008, at 1:40 PM, Matthias Epheser wrote: Matthias and Ryan - let's get SolrJS integrated into contrib/velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/ javascript and create a dependency to contrib/velocity for ServerSideWidgets? Sure, contrib/javascript sounds perfect. If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. Awesome, thanks! Just uploaded solrjs.zip to https://issues.apache.org/jira/browse/SOLR-868. It is intended to be extracted in contrib/javascript and supports the following ant targets: * ant dist - creates a single js file and a jar that holds velocity templates. * ant docs - creates js docs. test in browser: doc/index.html * ant example-init - (depends ant dist on solr root) copies the current built of solr.war and solr-velocity.jar to example/testsolr/.. * ant example-start - starts the testsolr server on port 8983 * ant example-import - imports 3000 test data rows (requires a started testserver) Erik -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20611635.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
Erik Hatcher schrieb: It'd be nice to have SolrJS and VrW's examples, at least the default one, work off the built-in Solr example data. It's pretty minimal, and somewhat contrived, but it'll make it lots easier to document and demonstrate this stuff if it's cohesive that way. Certainly, though, it's not possible to show off all widgets this way (like country selection), but the more unified we make SolrJS and VrW, the easier it will be for folks to try and eventually adopt these cool technologies. Just posted the patch to SOLR-868, everything is done by ant as described, so you should be able to see meaningful examples within a minute. A script is attached that makes it possible to include 1+ more of testdata if you like, but you don't have to. No manual tweaking is necessary, I don't think it adds to much complexity, as for solrjs purpose, this testdata looks much more real life. matthias Erik On Nov 22, 2008, at 5:50 AM, Matthias Epheser wrote: JCodina schrieb: Yesterday I got it running, I thouhght I had post it, but I should not push the post button. The problem I had to solve to run it with the Velocity was to copy by hand the velocity jar files to /lib. There is an ant task example-init in contrib/javascript/build.xml that should do this trick for you. It copies solr.war to example/webapps and all the contrib/velicity stuff to example/solr/lib. I'm just about to post a patch to integrate a small set of testdata automatically to the example, so your're tweaking with the core testdata can be avoided. I will update the wiki as soon as this is commited. After that, only a checkout and ant example-init ant example-start ant example-import will create working examples for you. matthias Erik Hatcher wrote: I just got the client-side demo on trunk to work (with a few tweaks to make it work with the example core Solr data). On trunk follow these steps: * root directory: ant example * separate console, index data: cd example/exampledocs; java -jar post.jar *.xml * open contrib/javascript/example/testClientside.html in your browser The serverSide.html example is still not quite wired together properly to be an easy-to-run-demo, as what's on trunk doesn't include the reuters data and the velocity stuff is not wired in with it yet either. We'll get this working better/cleaner as we go, so we appreciate your early adopter help ironing out this stuff. Erik On Nov 20, 2008, at 5:44 PM, JCodina wrote: I could not manage, yet to use it. :confused: My doubts are: - must I download solr from svn - trunk? - then, must I apply the patches of solrjs and velocity and unzip the files? or is this already in trunk? because trunk contains velocity and javascript in contrib. but does not find the velocity - How do I edit/activate SolrJs to adapt it to my data, the wiki page says how to deploy the sample, and I looked at the sample page from the sample site, but I don't find how to manually install it on a tomcat server. PD. If I get how to do it, I promise I will introduce that information in the solrjs wiki page =) . Matthias Epheser wrote: Erik Hatcher schrieb: On Nov 16, 2008, at 1:40 PM, Matthias Epheser wrote: Matthias and Ryan - let's get SolrJS integrated into contrib/velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/ javascript and create a dependency to contrib/velocity for ServerSideWidgets? Sure, contrib/javascript sounds perfect. If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. Awesome, thanks! Just uploaded solrjs.zip to https://issues.apache.org/jira/browse/SOLR-868. It is intended to be extracted in contrib/javascript and supports the following ant targets: * ant dist - creates a single js file and a jar that holds velocity templates. * ant docs - creates js docs. test in browser: doc/index.html * ant example-init - (depends ant dist on solr root) copies the current built of solr.war and solr-velocity.jar to example/testsolr/.. * ant example-start - starts the testsolr server on port 8983 * ant example-import - imports 3000 test data rows (requires a started testserver) Erik --View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20611635.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
Maybe another template idea ... I just started playing around w/ this plugin: http://malsup.com/jquery/taconite/ Would be pretty neat to have that as a response (or @ least the technique), not sure how well known it is or if there is something W3C- based in the pipeline that is similar. Pretty neat though. - Jon On Nov 22, 2008, at 4:26 AM, Erik Hatcher wrote: I just got the client-side demo on trunk to work (with a few tweaks to make it work with the example core Solr data). On trunk follow these steps: * root directory: ant example * separate console, index data: cd example/exampledocs; java -jar post.jar *.xml * open contrib/javascript/example/testClientside.html in your browser The serverSide.html example is still not quite wired together properly to be an easy-to-run-demo, as what's on trunk doesn't include the reuters data and the velocity stuff is not wired in with it yet either. We'll get this working better/cleaner as we go, so we appreciate your early adopter help ironing out this stuff. Erik On Nov 20, 2008, at 5:44 PM, JCodina wrote: I could not manage, yet to use it. :confused: My doubts are: - must I download solr from svn - trunk? - then, must I apply the patches of solrjs and velocity and unzip the files? or is this already in trunk? because trunk contains velocity and javascript in contrib. but does not find the velocity - How do I edit/activate SolrJs to adapt it to my data, the wiki page says how to deploy the sample, and I looked at the sample page from the sample site, but I don't find how to manually install it on a tomcat server. PD. If I get how to do it, I promise I will introduce that information in the solrjs wiki page =) . Matthias Epheser wrote: Erik Hatcher schrieb: On Nov 16, 2008, at 1:40 PM, Matthias Epheser wrote: Matthias and Ryan - let's get SolrJS integrated into contrib/velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/ javascript and create a dependency to contrib/velocity for ServerSideWidgets? Sure, contrib/javascript sounds perfect. If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. Awesome, thanks! Just uploaded solrjs.zip to https://issues.apache.org/jira/browse/SOLR-868. It is intended to be extracted in contrib/javascript and supports the following ant targets: * ant dist - creates a single js file and a jar that holds velocity templates. * ant docs - creates js docs. test in browser: doc/index.html * ant example-init - (depends ant dist on solr root) copies the current built of solr.war and solr-velocity.jar to example/testsolr/.. * ant example-start - starts the testsolr server on port 8983 * ant example-import - imports 3000 test data rows (requires a started testserver) Erik -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20611635.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
I could not manage, yet to use it. :confused: My doubts are: - must I download solr from svn - trunk? - then, must I apply the patches of solrjs and velocity and unzip the files? or is this already in trunk? because trunk contains velocity and javascript in contrib. but does not find the velocity - How do I edit/activate SolrJs to adapt it to my data, the wiki page says how to deploy the sample, and I looked at the sample page from the sample site, but I don't find how to manually install it on a tomcat server. PD. If I get how to do it, I promise I will introduce that information in the solrjs wiki page =) . Matthias Epheser wrote: Erik Hatcher schrieb: On Nov 16, 2008, at 1:40 PM, Matthias Epheser wrote: Matthias and Ryan - let's get SolrJS integrated into contrib/velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/javascript and create a dependency to contrib/velocity for ServerSideWidgets? Sure, contrib/javascript sounds perfect. If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. Awesome, thanks! Just uploaded solrjs.zip to https://issues.apache.org/jira/browse/SOLR-868. It is intended to be extracted in contrib/javascript and supports the following ant targets: * ant dist - creates a single js file and a jar that holds velocity templates. * ant docs - creates js docs. test in browser: doc/index.html * ant example-init - (depends ant dist on solr root) copies the current built of solr.war and solr-velocity.jar to example/testsolr/.. * ant example-start - starts the testsolr server on port 8983 * ant example-import - imports 3000 test data rows (requires a started testserver) Erik -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20611635.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
To give you more information. The error I get is this one: java.lang.NoClassDefFoundError: org/apache/solr/request/VelocityResponseWriter (wrong name: contrib/velocity/src/main/java/org/apache/solr/request/VelocityResponseWriter) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at and in the build , if i do a build-contrib-dist i get these messages.. ... build: [jar] Building jar: /home/joan/workspace/solr/contrib/dataimporthandler/target/apache-solr-dataimporthandler-1.4-dev.jar dist: [copy] Copying 1 file to /home/joan/workspace/solr/build/web/WEB-INF/lib [copy] Copying 1 file to /home/joan/workspace/solr/dist init: init-forrest-entities: compile-common: compile: make-manifest: compile: [javac] Compiling 4 source files to /home/joan/workspace/solr/contrib/velocity/target/classes build: [jar] Building jar: /home/joan/workspace/solr/contrib/velocity/src/main/solr/lib/apache-solr-velocity-1.4-dev.jar dist: ... where the dataimporthanler seems that is copied in the dist folders but velocity is not. Hope this saves you some time.. Joan -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20535777.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
On Nov 17, 2008, at 3:55 AM, JCodina wrote: java.lang.NoClassDefFoundError: org/apache/solr/request/VelocityResponseWriter (wrong name: ... [jar] Building jar: /home/joan/workspace/solr/contrib/dataimporthandler/target/apache- solr-dataimporthandler-1.4-dev.jar dist: ... [jar] Building jar: /home/joan/workspace/solr/contrib/velocity/src/main/solr/lib/apache- solr-velocity-1.4-dev.jar dist: ... where the dataimporthanler seems that is copied in the dist folders but velocity is not. Correct - I didn't want VelocityResponseWriter put into the example WAR by default. It's a contrib, not core, so I intentionally put it in a separate lib directory. Here are the instructions to wire it in successfully from trunk: http://wiki.apache.org/solr/VelocityResponseWriter However, it isn't currently suitable for wiring to SolrJS - Matthias and I will have to resolve that. Erik
Re: Build Solr to run SolrJS
On Nov 16, 2008, at 1:40 PM, Matthias Epheser wrote: Matthias and Ryan - let's get SolrJS integrated into contrib/ velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/ javascript and create a dependency to contrib/velocity for ServerSideWidgets? Sure, contrib/javascript sounds perfect. If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. Awesome, thanks! Erik
Re: Build Solr to run SolrJS
Erik Hatcher schrieb: However, it isn't currently suitable for wiring to SolrJS - Matthias and I will have to resolve that. Just noticed that VelocityResponeWriter in trunk is very reduced to my last patch from 2008-07-25. Moving the templates into a jar shouldn't be a problem. Setting the contentType is still possible, the methods{} wrapper may be moved into the template itself. The crucial difference is the missing translation into a solrj response by specifying the vl.response parameter. This was intended to make template creation more handy, cause the queryResponse is much nicer to navigate. If this conversion is to specific and shouldn't be in VelocityResponseWriter, would it be a problem to create a subclass inside contrib/javascript? matthias Erik
Re: Build Solr to run SolrJS
On Nov 17, 2008, at 11:45 AM, Matthias Epheser wrote: Just noticed that VelocityResponeWriter in trunk is very reduced to my last patch from 2008-07-25. Right, that was intentional for my own simplicity's sake... The crucial difference is the missing translation into a solrj response by specifying the vl.response parameter. This was intended to make template creation more handy, cause the queryResponse is much nicer to navigate. If this conversion is to specific and shouldn't be in VelocityResponseWriter, would it be a problem to create a subclass inside contrib/javascript? I need to understand it a bit more, but no subclass is necessary... we'll patch it into contrib/velocity's VrW like you had it before. Erik
Re: Build Solr to run SolrJS
Erik Hatcher schrieb: On Nov 17, 2008, at 11:45 AM, Matthias Epheser wrote: Just noticed that VelocityResponeWriter in trunk is very reduced to my last patch from 2008-07-25. Right, that was intentional for my own simplicity's sake... The crucial difference is the missing translation into a solrj response by specifying the vl.response parameter. This was intended to make template creation more handy, cause the queryResponse is much nicer to navigate. If this conversion is to specific and shouldn't be in VelocityResponseWriter, would it be a problem to create a subclass inside contrib/javascript? I need to understand it a bit more, but no subclass is necessary... we'll patch it into contrib/velocity's VrW like you had it before. The key part is to pass a parameter like vl.response=QueryResponse, so the transformation works like that: object = request.getCore().getResourceLoader().newInstance(className, client.solrj.response.); solrResponse.setResponse(new EmbeddedSolrServer(request.getCore()).getParsedResponse(request, response)); This was done based on api changes from Ryan to generalize the second setResponse part. In the etmplate , there is access to the created response, as well as to the rawResponse. I'll try to add the least necessary stuff to current vrw, test ist against solrjs and post a patch to jira. matthias Erik
Re: Build Solr to run SolrJS
Can you elaborate on the use case for why you need the raw response like that? I vaguely get it, but want to really understand the need here. I'm weary of the EmbeddedSolrServer usage in there, as I want to distill the VrW stuff to be able to use SolrJ's API rather than assume embedded Solr. This way VrW can be separated from core Solr to another tier and template on remote Solr responses. Thoughts on how this feature might play out in that scenario? Erik On Nov 17, 2008, at 1:09 PM, Matthias Epheser wrote: Erik Hatcher schrieb: On Nov 17, 2008, at 11:45 AM, Matthias Epheser wrote: Just noticed that VelocityResponeWriter in trunk is very reduced to my last patch from 2008-07-25. Right, that was intentional for my own simplicity's sake... The crucial difference is the missing translation into a solrj response by specifying the vl.response parameter. This was intended to make template creation more handy, cause the queryResponse is much nicer to navigate. If this conversion is to specific and shouldn't be in VelocityResponseWriter, would it be a problem to create a subclass inside contrib/javascript? I need to understand it a bit more, but no subclass is necessary... we'll patch it into contrib/velocity's VrW like you had it before. The key part is to pass a parameter like vl.response=QueryResponse, so the transformation works like that: object = request.getCore().getResourceLoader().newInstance(className, client.solrj.response.); solrResponse.setResponse(new EmbeddedSolrServer(request.getCore()).getParsedResponse(request, response)); This was done based on api changes from Ryan to generalize the second setResponse part. In the etmplate , there is access to the created response, as well as to the rawResponse. I'll try to add the least necessary stuff to current vrw, test ist against solrjs and post a patch to jira. matthias Erik
Re: Build Solr to run SolrJS
On Nov 17, 2008, at 1:35 PM, Erik Hatcher wrote: Can you elaborate on the use case for why you need the raw response like that? I vaguely get it, but want to really understand the need here. I'm weary of the EmbeddedSolrServer usage in there, as I want to distill the VrW stuff to be able to use SolrJ's API rather than assume embedded Solr. This way VrW can be separated from core Solr to another tier and template on remote Solr responses. Thoughts on how this feature might play out in that scenario? Essentially the function: solrResponse.setResponse(new EmbeddedSolrServer(request.getCore()).getParsedResponse(request, response)); makes the results look as if they came from solrj. If the results did come from solrj, we would not need to set the solrResponse -- they would already be set and in the proper form. ryan
Re: Build Solr to run SolrJS
Ryan McKinley schrieb: On Nov 17, 2008, at 1:35 PM, Erik Hatcher wrote: Can you elaborate on the use case for why you need the raw response like that? I vaguely get it, but want to really understand the need here. I'm weary of the EmbeddedSolrServer usage in there, as I want to distill the VrW stuff to be able to use SolrJ's API rather than assume embedded Solr. This way VrW can be separated from core Solr to another tier and template on remote Solr responses. Thoughts on how this feature might play out in that scenario? After we add the SolrQueryResponse to the templates first, we realized that some convenience methods for iterating the result docs, accessing facets etc. would be fine. The idea was to reuse the existing wrappers (eg. QueryResponse). It makes it much nicer to create templates, because velocity is made to just render things, so code using docsets etc. directly may be very overloaded. Essentially the function: solrResponse.setResponse(new EmbeddedSolrServer(request.getCore()).getParsedResponse(request, response)); makes the results look as if they came from solrj. If the results did come from solrj, we would not need to set the solrResponse -- they would already be set and in the proper form. ryan
Re: Build Solr to run SolrJS
On Nov 17, 2008, at 2:11 PM, Matthias Epheser wrote: After we add the SolrQueryResponse to the templates first, we realized that some convenience methods for iterating the result docs, accessing facets etc. would be fine. The idea was to reuse the existing wrappers (eg. QueryResponse). It makes it much nicer to create templates, because velocity is made to just render things, so code using docsets etc. directly may be very overloaded. Right, and well understood. What I've put out there is a barebones skeleton, and there are lots of TODOs for these conveniences. I want to get it using SolrJ's API for request/response rather than the more internal stuff we're using now. Erik
Re: Build Solr to run SolrJS
On Nov 17, 2008, at 2:59 PM, Erik Hatcher wrote: On Nov 17, 2008, at 2:11 PM, Matthias Epheser wrote: After we add the SolrQueryResponse to the templates first, we realized that some convenience methods for iterating the result docs, accessing facets etc. would be fine. The idea was to reuse the existing wrappers (eg. QueryResponse). It makes it much nicer to create templates, because velocity is made to just render things, so code using docsets etc. directly may be very overloaded. Right, and well understood. What I've put out there is a barebones skeleton, and there are lots of TODOs for these conveniences. I want to get it using SolrJ's API for request/response rather than the more internal stuff we're using now. I think the 'internal' stuff mode is there because Yonik expressed concern about requiring the conversion of DocList to SolrDocumentList -- since Matthias had already done the work to access docs out of the DocList, I figured we should leave it in, even if I can't imagine using it. (someone may be worried about the performance win of not serializing DocList) ryan
Re: Build Solr to run SolrJS
Erik Hatcher schrieb: On Nov 17, 2008, at 2:11 PM, Matthias Epheser wrote: After we add the SolrQueryResponse to the templates first, we realized that some convenience methods for iterating the result docs, accessing facets etc. would be fine. The idea was to reuse the existing wrappers (eg. QueryResponse). It makes it much nicer to create templates, because velocity is made to just render things, so code using docsets etc. directly may be very overloaded. Right, and well understood. What I've put out there is a barebones skeleton, and there are lots of TODOs for these conveniences. I want to get it using SolrJ's API for request/response rather than the more internal stuff we're using now. Got your point. I just added a new patch at https://issues.apache.org/jira/browse/SOLR-620 that makes solrjs run again. It includes: - support for response wrapping - support for json wrap - adding the v. prefix to all request parameters for consistency reasons. I'm aware that some parts of this features may be achieved in a nicer way. As you know the SolrJ code better, thanks for your thoughts, I'll try also to dig into the SolrJ side to get a better picture. See this patch as a feature list I need for solrjs. matthias Erik
Re: Build Solr to run SolrJS
Erik Hatcher schrieb: On Nov 16, 2008, at 1:40 PM, Matthias Epheser wrote: Matthias and Ryan - let's get SolrJS integrated into contrib/velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/javascript and create a dependency to contrib/velocity for ServerSideWidgets? Sure, contrib/javascript sounds perfect. If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. Awesome, thanks! Just uploaded solrjs.zip to https://issues.apache.org/jira/browse/SOLR-868. It is intended to be extracted in contrib/javascript and supports the following ant targets: * ant dist - creates a single js file and a jar that holds velocity templates. * ant docs - creates js docs. test in browser: doc/index.html * ant example-init - (depends ant dist on solr root) copies the current built of solr.war and solr-velocity.jar to example/testsolr/.. * ant example-start - starts the testsolr server on port 8983 * ant example-import - imports 3000 test data rows (requires a started testserver) Erik
Build Solr to run SolrJS
I downloaded solr/trunk and build it, everything seems to work except that the VelocityResponseWriter is not in the war file and tomcat , gives an error of configuration when using the conf.xml of the solrjs. Any suggestion on how to build the solr to work with solrjs?? Thanks Joan Codina -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20526644.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
Joan - I'll have a look at this in the near future. SolrJS was using a custom version of a VelocityResponseWriter patch, but since then I have committed a version of that code to the contrib/velocity area of Solr. contrib/velocity probably does not work with SolrJS currently, but we'll get that fixed up. Maybe it all works using the the codebase here? http://wiki.apache.org/solr/SolrJS Matthias and Ryan - let's get SolrJS integrated into contrib/ velocity. Any objections/reservations? Erik On Nov 16, 2008, at 10:59 AM, JCodina wrote: I downloaded solr/trunk and build it, everything seems to work except that the VelocityResponseWriter is not in the war file and tomcat , gives an error of configuration when using the conf.xml of the solrjs. Any suggestion on how to build the solr to work with solrjs?? Thanks Joan Codina -- View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20526644.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Build Solr to run SolrJS
Erik Hatcher schrieb: Joan - I'll have a look at this in the near future. SolrJS was using a custom version of a VelocityResponseWriter patch, but since then I have committed a version of that code to the contrib/velocity area of Solr. contrib/velocity probably does not work with SolrJS currently, but we'll get that fixed up. I'll also have a look at the VelocityResponseWriter from 1.3 and current trunk, concerning solrjs tomorrow. Maybe it all works using the the codebase here? http://wiki.apache.org/solr/SolrJS The solr.war of the testdata in solrjs trunk is a custom build that was created before the official 1.3.0 release. It includes the Velocity patch, so it should work. As mentioned, it is a custom build from august, so we should aim to make it work with 1.3 and trunk. Matthias and Ryan - let's get SolrJS integrated into contrib/velocity. Any objections/reservations? As SolrJS may be used without velocity at all (using eg. ClientSideWidgets), is it possible to put it into contrib/javascript and create a dependency to contrib/velocity for ServerSideWidgets? If that's ok, I'll have a look at the directory structure and the current ant build.xml to make them fit into the common solr structure and build. regards, matthias Erik On Nov 16, 2008, at 10:59 AM, JCodina wrote: I downloaded solr/trunk and build it, everything seems to work except that the VelocityResponseWriter is not in the war file and tomcat , gives an error of configuration when using the conf.xml of the solrjs. Any suggestion on how to build the solr to work with solrjs?? Thanks Joan Codina --View this message in context: http://www.nabble.com/Build-Solr-to-run-SolrJS-tp20526644p20526644.html Sent from the Solr - User mailing list archive at Nabble.com.