You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "henri.gouraud@laposte.net" <he...@laposte.net> on 2012/03/26 17:05:01 UTC
First steps with Solr
Hi, I have been exploring Solr through the example provided.
I have created my own set of documents, and can start to index and query
using the Solritas GUI.
Two questions:
1/ I would like to have the "name" field to contain a URL to another server
on my machine.
When I put " .... text " inside the name field, Solr complains at indexing
time.
What is the easy solution
2/ Where are the various aspects of the GUI documented or parametrised? I
believe playing with an existing/running program is one nice way to
discover.
Thanks for any help.
Henri
--
View this message in context: http://lucene.472066.n3.nabble.com/First-steps-with-Solr-tp3858406p3858406.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: First steps with Solr
Posted by "henri.gouraud@laposte.net" <he...@laposte.net>.
Partially solved problem!
I am playing with the doc.vm file in the velocity folder.
I have replaced
*#field('name')*
by
* http://127.0.0.1:2317/Chausey?#field('access') #field('name') *
where access is the value or the URL I want.
problem is that someone seems to insert spaces (%20) between *
Chausey? and #field('access') resulting into an invalid query. Everthing
else seems OK.
Is there a way to control this spaces insertion, or to remove them client
side.
Thanks,
Henri
--
View this message in context: http://lucene.472066.n3.nabble.com/First-steps-with-Solr-tp3858406p3858582.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: First steps with Solr
Posted by "henri.gouraud@laposte.net" <he...@laposte.net>.
Partially solved problem!
I am playing with the doc.vm file in the velocity folder.
I have replaced
where access is the value or the URL I want.
problem is that someone seems to insert spaces (%20) between *
Chausey? and #field('access') resulting into an invalid query. Everthing
else seems OK.
Is there a way to control this spaces insertion, or to remove them client
side.
Thanks,
Henri
--
View this message in context: http://lucene.472066.n3.nabble.com/First-steps-with-Solr-tp3858406p3858607.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: First steps with Solr
Posted by Erik Hatcher <er...@gmail.com>.
Note that the VelocityResponseWriter puts a tool in the context to escape various things. See the "Velocity Context" section here: <http://wiki.apache.org/solr/VelocityResponseWriter>. That'll take you to this <http://velocity.apache.org/tools/releases/1.4/generic/EscapeTool.html>
You can do $esc.url($some_variable) to URL encode _pieces_ of a URL. You can see the use of $esc in VM_global_library.vm and some of the other templates that ship with Solr.
Erik
On Mar 27, 2012, at 10:00 , Marcelo Carvalho Fernandes wrote:
> I've had the same problem and my solution was to...
>
> #set($pName = "#field('name')")
> #set($pName = $pName.trim())
>
> ----
> Marcelo Carvalho Fernandes
> +55 21 8272-7970
> +55 21 2205-2786
>
>
> On Mon, Mar 26, 2012 at 3:24 PM, henri.gouraud@laposte.net <
> henri.gouraud@laposte.net> wrote:
>
>> trying to play with javascript to clean-up my URL!!
>> Context is velocity
>>
>>
>>
>> Suggestions?
>> Thanks
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/First-steps-with-Solr-tp3858406p3858959.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
Re: First steps with Solr
Posted by Marcelo Carvalho Fernandes <mc...@gmail.com>.
I've had the same problem and my solution was to...
#set($pName = "#field('name')")
#set($pName = $pName.trim())
----
Marcelo Carvalho Fernandes
+55 21 8272-7970
+55 21 2205-2786
On Mon, Mar 26, 2012 at 3:24 PM, henri.gouraud@laposte.net <
henri.gouraud@laposte.net> wrote:
> trying to play with javascript to clean-up my URL!!
> Context is velocity
>
>
>
> Suggestions?
> Thanks
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/First-steps-with-Solr-tp3858406p3858959.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: First steps with Solr
Posted by "henri.gouraud@laposte.net" <he...@laposte.net>.
trying to play with javascript to clean-up my URL!!
Context is velocity
Suggestions?
Thanks
--
View this message in context: http://lucene.472066.n3.nabble.com/First-steps-with-Solr-tp3858406p3858959.html
Sent from the Solr - User mailing list archive at Nabble.com.