[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12698201#action_12698201 ] Erik Hatcher commented on SOLR-620: --- Looks good, no objections at all. Commit when ready. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620-velocity.properties.patch, SOLR-620-velocity.properties.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12698304#action_12698304 ] Koji Sekiguchi commented on SOLR-620: - velocity.properties was committed revision 764347. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620-velocity.properties.patch, SOLR-620-velocity.properties.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12698116#action_12698116 ] Erik Hatcher commented on SOLR-620: --- Yeah, I figured we'd need to provide a mechanism to load velocity.properties, or at least specify them in some manner through config. Does the engine.init calls after setting some properties lose those values originally set? Maybe velocity.properties should be loaded from SolrResourceLoader so that it can live on the classpath? Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620-velocity.properties.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12648577#action_12648577 ] Erik Hatcher commented on SOLR-620: --- I have added in the json escaping/wrapping feature, renamed all parameters (including template overrides) to use the v. prefix. But I did not add the rawResponse feature yet. It needs more thought, and no known example is using it yet. I'd prefer that SolrJ's SolrQuery and SolrResponse objects be put into the Velocity context - making this portable between embedded and HTTP Solr calls. Using the SolrJ API will alleviate the need that rawResponse was filling, I believe. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12647706#action_12647706 ] Grant Ingersoll commented on SOLR-620: -- Just noticed that this contrib is not added into the release/signing/packaging stuff in the top level build. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12644328#action_12644328 ] Ryan McKinley commented on SOLR-620: Looks good. I think you should go ahead and commit it. It is easier to keep track of the changes once it is committed. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12644373#action_12644373 ] Erik Hatcher commented on SOLR-620: --- Thanks Ryan! Committed. Needs work, but it's a good starting point, and usable as is. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12644379#action_12644379 ] Ryan McKinley commented on SOLR-620: don't know why, but FF 3.0.3 (on mac) does not display anything unless we change: {code} Index: contrib/velocity/src/main/solr/conf/velocity/browse.vm === --- contrib/velocity/src/main/solr/conf/velocity/browse.vm (revision 709500) +++ contrib/velocity/src/main/solr/conf/velocity/browse.vm (working copy) @@ -7,7 +7,7 @@ head title#param('title')/title meta http-equiv=content-type content=text/html; charset=UTF-8/ - script type=text/javascript src=/solr/admin/jquery-1.2.3.min.js/ + script type=text/javascript src=/solr/admin/jquery-1.2.3.min.js/script link rel=stylesheet type=text/css href=/solr/admin/file?file=/velocity/main.csscontentType=text/css/ /head body {code} Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12644380#action_12644380 ] Ryan McKinley commented on SOLR-620: What are your thoughts on what should go in the velocity contrib src/main/solr files? I don't like that it duplicates all the stuff in /trunk/example/solr In my view (influenced by wicket), it would be great if the velocity templates were packaged in the .jar files rather then in the config directory. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12644474#action_12644474 ] Erik Hatcher commented on SOLR-620: --- As for the duplication - I agree really all I'm after is getting an example configuration, much like data import handler (which also duplicates an entire configuration, mostly). All this VelocityResponseWriter needs is to be registered in solrconfig.xml (where's Spring when you need it, such that dropping in a JAR is all that is needed to wire in a new component?! ;) Suggestions on improving, or just hardwire it into the default example config, are welcome? Regarding Velocity template location, Velocity has a very flexible resource loader mechanism. Right now it's hardcoded to use the custom parameter loader (template.template name=body) or the file system. Just wiring in the built-in classpath resource loader won't be enough... we need a SolrResourceLoader pass-through to pick up templates in JAR files in conf/lib - that'll be real handy. I'll work on the JAR loading capability, shouldn't be too hard to toss in there. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12644491#action_12644491 ] Erik Hatcher commented on SOLR-620: --- Ok, got your JAR loader in place. At this point, templates get found first in params (template.name=body), then the file system (either v.base_dir property value, bad name I know, or conf/velocity), then the JARs. This gives overridability down to the request level. The one caveat to the JAR loader... it's actually just a front-end to SolrResourceLoader#openResource(), so it can open files in the conf directory (or via absolute path, it seems!), as well as from conf/lib/*.jar's and the Solr classpath itself. We'll make the Velocity properties more flexibly managed as we evolve this. Templates on the file system really make the most sense to me, but we'll let Velocity's flexibility shine through. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.zip, SOLR-620.zip Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12643595#action_12643595 ] Erik Hatcher commented on SOLR-620: --- http://wiki.apache.org/solr/VelocityResponseWriter contains usage instructions and examples. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12642787#action_12642787 ] Erik Hatcher commented on SOLR-620: --- That's an interesting idea, Yonik. Easy enough to implement. I'm not quite sure how useful it'd be - I'm curious about what use cases this would be leveraged. I'll toss it in though. The same feature would be useful to the XsltResponseWriter also, I'd think. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12642622#action_12642622 ] Yonik Seeley commented on SOLR-620: --- Would it make sense to allow passing of the velocity template in a parameter for extra on-the-fly flexibility? Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12616953#action_12616953 ] Erik Hatcher commented on SOLR-620: --- Matthias - I'm perplexed by the JSON feature. The intention was to use the Velocity writer to produce templated output, but if you want JSON data, use wt=json, not the velocity one. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12616969#action_12616969 ] Ryan McKinley commented on SOLR-620: the JSON feature gets around a javascript limitation for cross-site scripting. If you enclose your HTML within a JSON tag, you can access from any server -- otherwise it has to come from the same machine. the json feature just sends your velocity template output (perhaps html) surrounded with: {\result\:\ + json encoded output + \} Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1261#action_1261 ] Ryan McKinley commented on SOLR-620: check SOLR-654 for a way to construct a SolrResponse from a given class -- this way the velocity writer can have access to any utility functions a SolrResponse implementation has. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12615320#action_12615320 ] Ryan McKinley commented on SOLR-620: Looking at a recent version of this, it seems best if we can reuse the NamedListObject parsing from solrj rather then have the velocity writer add helper functions to access parts of the response. I just posted SOLR-641 to expose this parsing form EmbeddedSolrServer Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12612801#action_12612801 ] Matthias Epheser commented on SOLR-620: --- bq. I've done it the hard way for now, by navigating the API as rawly as it gets to display the documents. Doing it this way for a bit will inform what kind of macros or other context helpers we need to make the view as clean as possible. Played around a bit with macros and their capabilities, I think creating a java context helper class is the better way. The velocity template should make it easy to create very custom html. With macros, we could hide the complex method calls, but eg. creating a shortcut for a loop AND customize the html inside this loop will not be possible easily. And, correct me if I'm wrong, your shortcut setters like #set($iterator=$response.values.response.iterator()) have to be declared in every template file, cause template libraries cannot share variables, and macros only produce Strings and no other return types. So I suggest a small java wrapper object that still uses the doclist for performance considerations and only provides handy convenience methods like getResultIterator() - iterator of ids, used in #foreachs getDocFieldValue(docId, fieldName) etc. so a custom result view looks like this: #foreach($docid in $helper.getResultIterator()) li$helper.getDocFieldValue(docid, title)/li #end This object can be passed to the velocity context and may be accessible to all custom templates, without changing the data's nature (doclist to momory objects or the like). I'll have a test version of thos approch ready this evening. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12612891#action_12612891 ] Noble Paul commented on SOLR-620: - Isn't this a good candidate for a contrib project? * It introduces quite a few dependencies Solr core does not need * Most of the users do not deploy the webapp in Solr itself (for security reasons) Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12612894#action_12612894 ] Erik Hatcher commented on SOLR-620: --- Sure, contrib is fine. Where it ends up isn't a big deal to me. As for how Solr is deployed - having the web tier and Solr be one and the same (in a read-only configuration of course) is a pretty compelling way to deploy, I'd think. Why separate Solr and the UI when using load balanced replicated servers? Of course it depends on the needs of the application, but keeping a separate web app to regurgitate what Solr returns can be an unnecessary deployment hassle. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (SOLR-620) Velocity Response Writer
It is not a recommended practice to expose Solr to the end-users because it is so easy to bring down the server if the user knows that it is a Solr server. We must devise a good mechanism to filter the kind of commands that can be served . On Fri, Jul 11, 2008 at 8:14 PM, Erik Hatcher (JIRA) [EMAIL PROTECTED] wrote: [ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12612894#action_12612894 ] Erik Hatcher commented on SOLR-620: --- Sure, contrib is fine. Where it ends up isn't a big deal to me. As for how Solr is deployed - having the web tier and Solr be one and the same (in a read-only configuration of course) is a pretty compelling way to deploy, I'd think. Why separate Solr and the UI when using load balanced replicated servers? Of course it depends on the needs of the application, but keeping a separate web app to regurgitate what Solr returns can be an unnecessary deployment hassle. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. -- --Noble Paul
Re: [jira] Commented: (SOLR-620) Velocity Response Writer
On Jul 11, 2008, at 11:08 AM, Noble Paul നോബിള് नोब्ळ् wrote: It is not a recommended practice to expose Solr to the end-users because it is so easy to bring down the server if the user knows that it is a Solr server. We must devise a good mechanism to filter the kind of commands that can be served . If all the request handlers were turned off but a /select constrained to dismax, what vulnerabilities exist? Erik
Re: [jira] Commented: (SOLR-620) Velocity Response Writer
* /update has to be enabled because that is used by the commit script to reload any new snapshots * user firing queries like *:* can cause heavy load on the server (if dismax is the not the only one) --Noble On Fri, Jul 11, 2008 at 10:15 PM, Erik Hatcher [EMAIL PROTECTED] wrote: On Jul 11, 2008, at 11:08 AM, Noble Paul നോബിള് नोब्ळ् wrote: It is not a recommended practice to expose Solr to the end-users because it is so easy to bring down the server if the user knows that it is a Solr server. We must devise a good mechanism to filter the kind of commands that can be served . If all the request handlers were turned off but a /select constrained to dismax, what vulnerabilities exist? Erik -- --Noble Paul
Re: [jira] Commented: (SOLR-620) Velocity Response Writer
On Jul 11, 2008, at 12:56 PM, Noble Paul നോബിള് नोब्ळ् wrote: * /update has to be enabled because that is used by the commit script to reload any new snapshots Even a servlet filter (or fronting web-server*) could turn off /update requests straightforwardely. Filter to allow only internal servers would do the trick, no? * I'm not necessarily proposing jetty be actually talking directly to browsers, but no reason why solr.war need be hidden from them either, providing we iron out whatever /update issues there are. Surely there are other alternative ways a Solr instance can be commanded to pull a new index besides an HTTP request, but I do freely admit that deployment is not my forte. * user firing queries like *:* can cause heavy load on the server (if dismax is the not the only one) That's why I specifically constrained to a reasonable query parser. The runaway query problem is, though, a problem regardless of whether Solr is fronted by another web UI tier or not. One could argue that is the problem of the front-end system to manage, but in reality users are passing queries straight through without massaging, through any number of layers of architecture. So /update is the only concern with Solr itself being a UI server? Erik --Noble On Fri, Jul 11, 2008 at 10:15 PM, Erik Hatcher [EMAIL PROTECTED] wrote: On Jul 11, 2008, at 11:08 AM, Noble Paul നോബിള് नोब्ळ् wrote: It is not a recommended practice to expose Solr to the end-users because it is so easy to bring down the server if the user knows that it is a Solr server. We must devise a good mechanism to filter the kind of commands that can be served . If all the request handlers were turned off but a /select constrained to dismax, what vulnerabilities exist? Erik -- --Noble Paul
Re: [jira] Commented: (SOLR-620) Velocity Response Writer
The front-ends can do some quick and dirty scanning before they fire a query. (Most don't do) still possible. We need a mechanism to filter out queries with some criteria. the /update vulnerability can to be addressed w/ an Apache front ending the server w/ ip based Access control. On Fri, Jul 11, 2008 at 10:38 PM, Erik Hatcher [EMAIL PROTECTED] wrote: On Jul 11, 2008, at 12:56 PM, Noble Paul നോബിള് नोब्ळ् wrote: * /update has to be enabled because that is used by the commit script to reload any new snapshots Even a servlet filter (or fronting web-server*) could turn off /update requests straightforwardely. Filter to allow only internal servers would do the trick, no? * I'm not necessarily proposing jetty be actually talking directly to browsers, but no reason why solr.war need be hidden from them either, providing we iron out whatever /update issues there are. Surely there are other alternative ways a Solr instance can be commanded to pull a new index besides an HTTP request, but I do freely admit that deployment is not my forte. * user firing queries like *:* can cause heavy load on the server (if dismax is the not the only one) That's why I specifically constrained to a reasonable query parser. The runaway query problem is, though, a problem regardless of whether Solr is fronted by another web UI tier or not. One could argue that is the problem of the front-end system to manage, but in reality users are passing queries straight through without massaging, through any number of layers of architecture. So /update is the only concern with Solr itself being a UI server? Erik --Noble On Fri, Jul 11, 2008 at 10:15 PM, Erik Hatcher [EMAIL PROTECTED] wrote: On Jul 11, 2008, at 11:08 AM, Noble Paul നോബിള് नोब्ळ् wrote: It is not a recommended practice to expose Solr to the end-users because it is so easy to bring down the server if the user knows that it is a Solr server. We must devise a good mechanism to filter the kind of commands that can be served . If all the request handlers were turned off but a /select constrained to dismax, what vulnerabilities exist? Erik -- --Noble Paul -- --Noble Paul
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12612527#action_12612527 ] Ryan McKinley commented on SOLR-620: perhaps look at convrting the DocList to a SolrDocumentList. Then velocity could use the solrj functions. take a look at: org.apache.solr.update.DocumentBuilder -- it has a function loadStoredFields that you can use to convert a Document to a SolrDocument. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620_20080710.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12612534#action_12612534 ] Erik Hatcher commented on SOLR-620: --- Matthias - I removed your patch to keep it clean here. If you name the patch SOLR-620.patch, it will grey out previous versions. Two comments on your patch, be sure to flag your patch as being ok to use within the ASF, and also be sure to svn add (locally only of course) the .vm files so they appear in the patch too. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12612535#action_12612535 ] Erik Hatcher commented on SOLR-620: --- Another handy method to get all the documents is SolrIndexSearcher#readDocs(Document[] docs, DocList ids) - however it is probably best for memory usage (or is it?) to continue to use the DocList#iterator() so only a single document is loaded at a time in case there are large field values or a lot of documents requested. Although this point will be a bit moot when Velocity layouts are implemented (something I plan to do eventually) where the original template is generated into a string buffer and then another wrapping template is generated around it. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12612537#action_12612537 ] Yonik Seeley commented on SOLR-620: --- bq. however it is probably best for memory usage (or is it?) to continue to use the DocList#iterator() so only a single document is loaded at a time Yes. That's why I deferred loading documents until response writing so things could be streamed one doc at a time. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-620) Velocity Response Writer
[ https://issues.apache.org/jira/browse/SOLR-620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12611424#action_12611424 ] Erik Hatcher commented on SOLR-620: --- There are a zillion bells and whistles that can be added to this, lots of Velocity parameters that can be controlled. We'll probably want to have some custom Solr macros to make templating life a lot easier. For example, we'll need to make navigating the DocList easier. Velocity Response Writer Key: SOLR-620 URL: https://issues.apache.org/jira/browse/SOLR-620 Project: Solr Issue Type: New Feature Components: search Affects Versions: 1.3 Reporter: Erik Hatcher Assignee: Erik Hatcher Priority: Minor Attachments: SOLR-620.jars.zip, SOLR-620.patch Add a Velocity - http://velocity.apache.org - response writer, making it possible to generate a decent search UI straight from Solr itself. Designed to work standalone or in conjunction with the JSON response writer (or SolrJS) for Ajaxy things. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.