Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E6BE174A4 for ; Wed, 10 Jun 2015 13:00:34 +0000 (UTC) Received: (qmail 48243 invoked by uid 500); 10 Jun 2015 13:00:30 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 48175 invoked by uid 500); 10 Jun 2015 13:00:30 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 48163 invoked by uid 99); 10 Jun 2015 13:00:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 13:00:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bs4mailinglist@gmail.com designates 209.85.192.44 as permitted sender) Received: from [209.85.192.44] (HELO mail-qg0-f44.google.com) (209.85.192.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jun 2015 12:58:15 +0000 Received: by qgep100 with SMTP id p100so15774710qge.3 for ; Wed, 10 Jun 2015 06:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=511y4fT+MBGfnG93eaGOWunSVLYEgSWvAfD1e+hcSpg=; b=W1O4aN9hKVyZBo9a87ghA9Xy8IrFUT93vuqhR5HIFn08m2YIg7P6iLOR0MQgPeJRK4 qBHX8D1aJ8+0CrLOgg0rFSWZGHPdW17VEunFLwp3ydclp+UVC+wpeRI7VgK8G0sT8n4D tf1grxMpNPSNx7eUQUs096Q/dynXh9j72dDhBIf+T+G4nhrt6+wU7bJFP+TF8Fzan9e7 BJW6NL1LiaumLPbBtPl5HwJ/BfCX7o55ubdHMVccVLvQUTw8bj6iw8/yJKk0k57nHvWv SFLTjjk+9uuzWhO6NfyMPjXhhcfpNUg6LKjxwfMLQh/2KQrMkKOHENPtLQbguEfEjGfB bWPA== MIME-Version: 1.0 X-Received: by 10.55.40.218 with SMTP id o87mr5891086qko.82.1433941202930; Wed, 10 Jun 2015 06:00:02 -0700 (PDT) Received: by 10.140.22.201 with HTTP; Wed, 10 Jun 2015 06:00:02 -0700 (PDT) In-Reply-To: <4BA6AC31-1D81-4729-B704-AB5EC88DF0AD@gmail.com> References: <8CE9911A-A8DF-4FB0-800C-8BED18D1C27E@gmail.com> <7EE3BB27-7C3D-4756-AF05-EFE61E482037@gmail.com> <4BA6AC31-1D81-4729-B704-AB5EC88DF0AD@gmail.com> Date: Wed, 10 Jun 2015 16:00:02 +0300 Message-ID: Subject: Re: Velocity UI and hyperlink From: Sznajder ForMailingList To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a113ea656079b45051829746e X-Virus-Checked: Checked by ClamAV on apache.org --001a113ea656079b45051829746e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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=E2=80=99ll incorporate the = changes. > > =E2=80=94 > Erik Hatcher, Senior Solutions Architect > 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 differe= nt > > *.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\serve= r > > was the right way! > > > > thanks again! > > > > Ben > > > > On Tue, Jun 9, 2015 at 12:25 AM, Erik Hatcher > > wrote: > > > >> What version of Solr? And where is the file you=E2=80=99re changing? > >> > >> With Solr 5.2, one example of what you=E2=80=99re trying to do is unde= r > >> example/files. In the README we have this: > >> > >> bin/solr start > >> > -Dvelocity.template.base.dir=3D/example/files/conf/velocit= y/ > >> > >> When you create a collection it clones the configuration (in 5x; under > >> server/solr/=E2=80=A6) so if you wanted to in-place edit you=E2=80=99d= edit those files > >> rather than the original configuration which would require a collectio= n > >> 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#Respons= eWriters-VelocityResponseWriter > >> for perhaps some more details. If there=E2=80=99s any way I can make = this > easier, > >> let me know. > >> > >> If the above info doesn=E2=80=99t work or apply because you=E2=80=99re= on a different > >> version of Solr, provide more details and I=E2=80=99ll help from there= . > >> > >> =E2=80=94 > >> 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 > >>> 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_.vm? - depends on whic= h > >>>> version of Solr you=E2=80=99re using and which configuration you=E2= =80=99ve started > >> with to > >>>> be more precise) and modify it to render a hyperlink around > >>>> $doc.getFirstValue(=E2=80=9Curl=E2=80=9D), maybe something like: > >>>> > >>>> click = here > >>>> > >>>> Does that get you what you need? > >>>> > >>>> =E2=80=94 > >>>> 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 Velocit= y > >> UI, > >>>> to > >>>>> be a hyperlink. > >>>>> > >>>>> In my example, I am storing a field "url" containing the link to th= e > >>>> online > >>>>> page of the indexed document and I would like to have this displaye= d > >>>> field > >>>>> a hyperlink to this page. > >>>>> > >>>>> Could you please indicate me waht should I change to get that? > >>>>> > >>>>> thanks! > >>>>> > >>>>> Benjamin > >>>> > >>>> > >> > >> > > --001a113ea656079b45051829746e--