lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <erik.hatc...@gmail.com>
Subject Re: VelocityResponseWriter's future
Date Sat, 10 Dec 2011 01:56:30 GMT
Oh gosh... there's no "argument" at all.  I dig Velocity (and other things), and I'm cool with
folks not liking it or not (and you like it, so it seems).  

I'm not sure I get what you mean by the testability though.  Could you clarify?   Taken a
bit literally with the VRW, there's this in a test case:

    SolrQueryRequest req = req("v.template","custom", "v.template.custom","$response.response.response_data");
//...
    rsp.add("response_data", "testing");
    vrw.write(buf, req, rsp);
    assertEquals("testing", buf.toString());

Pretty predictable in this context, but I think you mean something different than JUnit testing
like this.

Regarding documenting comment I made, I was just filling in what I think is needed to making
it better and I like your wiki page tutorial idea.  But if /browse doesn't work literally
out of the box when copying the example configuration files (and as I said in a previous e-mail,
neither does Solr Cell, etc) then we don't really have "out-of-the-box"'ness - it requires
moving JARs or adjusting solrconfig.xml to make these things work.

	Erik


On Dec 9, 2011, at 18:01 , Paul Libbrecht wrote:

> Erik,
> 
> don't argue with me about Velocity, I'm using it several hours a day in XWiki.
> It's fast and easy but its testing ability is simply... unpredictable.
> 
> I did not mean to say it is not documented enough but that it could be reformulated as
a tutorial wiki page instead of an example software.
> 
> paul
> 
> Le 9 déc. 2011 à 23:17, Erik Hatcher a écrit :
> 
>> s/choice templating languages/template language choices/
>> 
>> Also, meant to include
>> * http://today.java.net/pub/a/today/2003/12/16/velocity.html
>> 
>> On Dec 9, 2011, at 17:07 , Erik Hatcher wrote:
>> 
>>> Paul -
>>> 
>>> Thanks for your feedback.
>>> 
>>> As for JSP... the problem with JSP's is that they must be inside the .war file
and that is prohibitive for the flexibility of adjusting the vm files to "create links to
the right resource" easily.  Certainly choice templating languages are an opinionated kind
of thing, and quite obviously I prefer Velocity templating* over pretty much any alternative.
 Angle brackets are meant for HTML, and mixing JSP and HTML is not very clean to me.  And
I've built a full-featured browse.jsp and browse.php examples too in past lives too :)
>>> 
>>> Regarding it being an example... it's wired into Solr under example/ as-is. 
Unfortunately, yet understandably, that example gets copied by many to start new projects
and then the UI needs adjustments to be in line with different data (as does the schema and
solrconfig, but many folks don't adjust those either).  Point taken that it certainly could
be implemented/documented better though.
>>> 
>>> 	Erik
>>> 
>>> 
>>> On Dec 9, 2011, at 16:38 , Paul Libbrecht wrote:
>>> 
>>>> Erik,
>>>> 
>>>> The VelocityResponseWriter has solved a need by me: provide an interface
that shows off an amount of the solr capability with queries close to a developer and a UI
that you can mail to colleagues.
>>>> 
>>>> The out-of-the-box-ness is crucial here.
>>>> Adjust the vm files was also crucial (e.g. to create links to the right resource).
>>>> 
>>>> The VelocityResponseWriter also has a big advantage: it is a very tiny code
so it is easy to adapt.
>>>> 
>>>> How about making it an example or tutorial?
>>>> 
>>>> paul
>>>> 
>>>> PS: I'll note that I would prefer a "candid" jsp equivalent (I still do)
but it was never available (one day I'll make one).
>>>> 
>>>> 
>>>> Le 9 déc. 2011 à 22:30, Erik Hatcher a écrit :
>>>> 
>>>>> So I thought that Solr having a decent HTML search UI out of the box
was a good idea.  I still do.  But it's been a bit of a pain to maintain (originally it was
a contrib module, then core, then folks didn't want it as a core dependency, and now it is
back as a contrib), and the UI has accumulated a fair bit of cruft/ugliness as folks have
tacked on "the kitchen sink" into it compared to my idealistic generic (not specific to the
example data) lean and clean sensibilities.
>>>>> 
>>>>> What should be done?  Who actually cares about VRW or the /browse interface?
 And if you do care, what do you like or dislike about it?  And if you really really care,
patches welcome! ;)
>>>>> 
>>>>> Perhaps, as I'm starting to feel in general about open source pet projects,
add-on's, "monkey patches" to open source software, it should be moved out of Solr's repo
altogether and maintained elsewhere (say my personal or Lucid's github).
>>>>> 
>>>>> I appreciate your candid thoughts on this.
>>>>> 
>>>>> 	Erik
>>>>> 
>>>> 
>>> 
>> 
> 


Mime
View raw message