Erik

Thanks for the great feedback. It fills me with joy to know that another
human being has chosen to use Solrstrap

1) I have added a couple more CONST variables to the code to allow the
implementer to specify the names of the hit body and hit title
(re: exampledocs/*.xml)

2) In order to pass a full document to the hit-template you could simply to
this:

    rs.append(hitTemplate({doc: result.response.docs[i]}));

and then change the hit template so that it references each hit as "doc"
and subfields thereof {{doc.somefield}}

    <script id="hit-template" type="text/x-handlebars-template">
    <div class="entry">
    <b>{{doc.title}}</b><br>
    {{doc.text}}
    {{doc.metadata}}
    </div>
    </script>

3) As for the license- I take your ribbing in the spirit in which it was
intended :) Seriously though- this is my first open source contribution, so
I haven't given licensing a lot of though. What would a more appropriate
license be?

Fergie

On Sun, Feb 17, 2013 at 12:43 PM, Erik Hatcher <erik.hatc...@gmail.com>wrote:

> Fergie -
>
> Nice!
>
> I was able to get this working on a Solr 4.1 "example" instance following
> these steps:
>
>   * Adjusting SERVERROOT in bootstrap/js/solrstrap.js to
> http://localhost:8983/solr/collection1/select/
>   * Changed line #38 in the same file to this:
>
>             rs.append(hitTemplate({title: result.response.docs[i].name,
> text: result.response.docs[i].text}));
>
> Just changing ".title" to ".name" since Solr's exampledocs/*.xml files use
> "name" not "title".
>
> I like projects like this, making it really point and click easy to see
> and work with Solr.  I'll just point out the important caveat that you
> mention, that it's "Designed for "open" solr instances" and "needs clear
> access to /select", as this is something easy to overlook at first
> (beautiful) glance and think we can just go to production without taking
> the necessary other steps to prevent Solr from being exposed directly.
>
> This is a nice start to a fun way to get started with Solr.
>
> A few questions:
>
> What would it take to get the full document object passed into the hit
> template?  And what would that hit template then look like?  (navigating
> say a "doc" object in the template rather than each field being passed
> explicitly)
>
> Right now it's called from the above line of code (is hitTemplate()
> mapping to the id="hit-template" in solrstramp.html part of handlebars
> magic?  Or is this explicit somewhere?)
>
> Here's the current hit template:
>
>     <script id="hit-template" type="text/x-handlebars-template">
>     <div class="entry">
>     <b>{{title}}</b><br>
>     {{text}}
>     </div>
>     </script>
>
> And finally... GPL?! ewww, why?! (-1)  :)
>
> Well played, Fergus!
>
>         Erik
>
>
> On Feb 17, 2013, at 05:35 , Fergus McDowall wrote:
>
> > Solrstrap is a very basic Query-Result interface for Solr. Solrstrap is
> intended to be a starting point for those building web interfaces that talk
> to Solr, or a very lightweight admin tool for querying Solr in a Googleish
> fashion.
> >
> > Cool things about Solrstrap:
> >
> >    * Requires only local installation- easy to set up
> >    * Access to all Bootstrap functionality. Can be easily extended in a
> Bootstrappy way.
> >    * Blazing fast
> >    * Uses less bandwidth
> >
> > Use it as you see fit. Merciless criticism and fawning praise equally
> welcome.
> >
> > See http://fergiemcdowall.github.com/solrstrap/
> >
> > and
> >
> > http://blog.comperiosearch.com/blog/2013/02/17/introducing-solrstrap/
> >
> > Fergus
> >
> >
>
>

Reply via email to