lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sznajder ForMailingList <bs4mailingl...@gmail.com>
Subject Re: Velocity UI and hyperlink
Date Wed, 10 Jun 2015 13:00:02 GMT
Hi Erik

When running solr in simple mode on my laptop, I found the *vm files under
under server/solr/COLLECTION_NAME/conf

however, when running on my server in cloud mode (with only one node), I do
not find these conf/ directory under server.

Does it sit on another place?

thanks!

On Tue, Jun 9, 2015 at 3:34 AM, Erik Hatcher <erik.hatcher@gmail.com> wrote:

> Do note that changing the file copied under solr/server is risky, as you
> may delete and recreate the collection and lose your changes.  If you use
> the system property trick mentioned below, you can develop without having
> to recreate the collection but once you do it’ll incorporate the changes.
>
> —
> Erik Hatcher, Senior Solutions Architect
> http://www.lucidworks.com <http://www.lucidworks.com/>
>
>
>
>
> > On Jun 8, 2015, at 5:37 PM, Sznajder ForMailingList <
> bs4mailinglist@gmail.com> wrote:
> >
> > Hi
> >
> > I am using 5.1
> >
> > Currently, I defined a directory solr-conf/ .
> > Under this directory, I have a velocity directory containing my different
> > *.vm files.
> >
> > When I create a collection, I am creating via
> > bin\solr create -c COLL_NAME -d PATH_TO_SOLR_CONF
> >
> > Your indication was helpful : changing the file copied under solr\server
> > was the right way!
> >
> > thanks again!
> >
> > Ben
> >
> > On Tue, Jun 9, 2015 at 12:25 AM, Erik Hatcher <erik.hatcher@gmail.com>
> > wrote:
> >
> >> What version of Solr?   And where is the file you’re changing?
> >>
> >> With Solr 5.2, one example of what you’re trying to do is under
> >> example/files.  In the README we have this:
> >>
> >>    bin/solr start
> >>
> -Dvelocity.template.base.dir=</full/path/to>/example/files/conf/velocity/
> >>
> >> When you create a collection it clones the configuration (in 5x; under
> >> server/solr/…) so if you wanted to in-place edit you’d edit those files
> >> rather than the original configuration which would require a collection
> >> re-create.
> >>
> >> With the above command-line, you can have templates anywhere you like
> and
> >> edit them in place, and they override any in the configuration of the
> Solr
> >> collection.
> >>
> >> See
> >>
> https://cwiki.apache.org/confluence/display/solr/Response+Writers#ResponseWriters-VelocityResponseWriter
> >> for perhaps some more details.  If there’s any way I can make this
> easier,
> >> let me know.
> >>
> >> If the above info doesn’t work or apply because you’re on a different
> >> version of Solr, provide more details and I’ll help from there.
> >>
> >> —
> >> Erik Hatcher, Senior Solutions Architect
> >> http://www.lucidworks.com
> >>
> >>
> >>
> >>
> >>> On Jun 8, 2015, at 5:07 PM, Sznajder ForMailingList <
> >> bs4mailinglist@gmail.com> wrote:
> >>>
> >>> Thanks!!
> >>>
> >>> However, each time I change a *.vm file, I do not succeed to see the
> >> change
> >>> on my browser until, I delete + recreate the collectoin and re-index.
> >>>
> >>> Isn't there a way to immediately see the display change?
> >>>
> >>> Best regards
> >>>
> >>> On Mon, Jun 8, 2015 at 11:46 PM, Erik Hatcher <erik.hatcher@gmail.com>
> >>> wrote:
> >>>
> >>>> Benjamin -
> >>>>
> >>>> The templates for VelocityResponseWriter (/browse, etc) are under
> >>>> conf/velocity.  Find the template that generates the piece you want
to
> >>>> affect (which may be hit.vm or hit_<something>.vm? - depends on
which
> >>>> version of Solr you’re using and which configuration you’ve started
> >> with to
> >>>> be more precise) and modify it to render a hyperlink around
> >>>> $doc.getFirstValue(“url”), maybe something like:
> >>>>
> >>>> <a href="$doc.getFirstValue(“url”)”>click here</a>
> >>>>
> >>>> Does that get you what you need?
> >>>>
> >>>> —
> >>>> Erik Hatcher, Senior Solutions Architect
> >>>> http://www.lucidworks.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>> On Jun 8, 2015, at 4:29 PM, Sznajder ForMailingList <
> >>>> bs4mailinglist@gmail.com> wrote:
> >>>>>
> >>>>> Hi
> >>>>>
> >>>>> I would like one of the fields, I display in the results of Velocity
> >> UI,
> >>>> to
> >>>>> be a hyperlink.
> >>>>>
> >>>>> In my example, I am storing a field "url" containing the link to
the
> >>>> online
> >>>>> page of the indexed document and I would like to have this displayed
> >>>> field
> >>>>> a hyperlink to this page.
> >>>>>
> >>>>> Could you please indicate me waht should I change to get that?
> >>>>>
> >>>>> thanks!
> >>>>>
> >>>>> Benjamin
> >>>>
> >>>>
> >>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message