Re: Fwd: Trouble with Velocity in SOLR 5.0.0

2015-03-11 Thread Sergiu Dumitriu
That's a change in the velocity engine, the way nested quotes are
escaped is by doubling them:

#set ($temp0 = $paramsq.replaceAll("""", ""))

Or better:

#set ($temp0 = $paramsq.replaceAll('"', ''))

I guess Solr 5 upgraded the version of Velocity they embed, thus the
regression in your code.

On 03/11/2015 04:46 AM, phi...@free.fr wrote:
> 
> Good morning,
> 
> I have found the cause of the error (see below) in this line:
> 
> #set ($temp0 = $paramsq.replaceAll("\"", ""))
> 
> I replaced \" by \u0022, and the error message vanished.
> 
> #set ($temp0 = $test.replaceAll("\u0022", ""))
> 
> Philippe
> 
> 
> 
> ERROR 500
> Encountered "AND" at richtext_doc.vm[line 65, column 51] Was expecting one 
> of: "," ... ")" ... ... 
> 
> -
> 
> 
> #if ($params.q and $pdf_dir_v and $pdf_year_mon_v and $pdf_day_v and 
> $pdf_name_v)
> 
>   #set ($paramsq = $params.q)
>   
>   #if ($paramsq.length() > 0)
>   
>   paramsq = $paramsq
>   
>   ## Remove double quotes
>   #set ($temp0 = $paramsq.replaceAll("\"", ""))
> 
> 
> 
> -
> 
> 
> 
> 
> 
> 
> - Mail transféré -
> De: phi...@free.fr
> À: "Velocity Users List" 
> Envoyé: Mardi 10 Mars 2015 16:29:48
> Objet: Re: Trouble with Velocity in SOLR 5.0.0
> 
> Problem solved.
> 
> A query Response Writer was not declared in my solrconfig.xml file.
> 
>   startup="lazy">
> ${velocity.template.base.dir:}
>   
>   
> 
> 
> 
> - Mail original -
> De: phi...@free.fr
> À: "Velocity Users List" 
> Envoyé: Mardi 10 Mars 2015 14:16:41
> Objet: Trouble with Velocity in SOLR 5.0.0
> 
> Hello,
> 
> I am trying to make Velocity work in SOLR 5.0.0.
> 
> First of all, I have added the following lines to my core's solrconfig.xml 
> file:
> 
> 5.0.0
>   
>   
>   
> 
>   
>   
> 
>   
>   
> ...
> 
> 
> ... and created a /browse request handler
> 
> 
>  
>  
>explicit
> 
>
>velocity
>browse
>layout
>Archives
> 
>
>edismax
>  
> I have also copied the 'velocity' directory from a 4.9 core to the 
> 
> /archives/solr-5.0.0/server/solr/mycore1/conf directory  
> 
> as well as the toolbox.xml file.
> 
> 
> The mycore1's conf directory now contains the following files and directories:
> 
> currency.xml  lang  protwords.txt  _rest_managed.json  schema.xml  
> solrconfig.xml  stopwords.txt  synonyms.txt  toolbox.xml  velocity
> 
> 
> 
> When I type http://myserver.com:8990/solr/mycore1/select?q=*:* in a browser, 
> I get an XML page, not HTML generated by Velocity, as expected.
> 
> 
> 
> 0
> 5
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> What did I miss?
> 
> Cheers,
> 
> Philippe
> 
> 
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
> For additional commands, e-mail: user-h...@velocity.apache.org
> 


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/

-
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org



Fwd: Trouble with Velocity in SOLR 5.0.0

2015-03-11 Thread phiroc

Good morning,

I have found the cause of the error (see below) in this line:

#set ($temp0 = $paramsq.replaceAll("\"", ""))

I replaced \" by \u0022, and the error message vanished.

#set ($temp0 = $test.replaceAll("\u0022", ""))

Philippe



ERROR 500
Encountered "AND" at richtext_doc.vm[line 65, column 51] Was expecting one of: 
"," ... ")" ... ... 

-


#if ($params.q and $pdf_dir_v and $pdf_year_mon_v and $pdf_day_v and 
$pdf_name_v)

#set ($paramsq = $params.q)

#if ($paramsq.length() > 0)

paramsq = $paramsq

## Remove double quotes
#set ($temp0 = $paramsq.replaceAll("\"", ""))



-






- Mail transféré -----
De: phi...@free.fr
À: "Velocity Users List" 
Envoyé: Mardi 10 Mars 2015 16:29:48
Objet: Re: Trouble with Velocity in SOLR 5.0.0

Problem solved.

A query Response Writer was not declared in my solrconfig.xml file.

 
${velocity.template.base.dir:}
  
  



----- Mail original -
De: phi...@free.fr
À: "Velocity Users List" 
Envoyé: Mardi 10 Mars 2015 14:16:41
Objet: Trouble with Velocity in SOLR 5.0.0

Hello,

I am trying to make Velocity work in SOLR 5.0.0.

First of all, I have added the following lines to my core's solrconfig.xml file:

5.0.0
  
  
  

  
  

  
  
...


... and created a /browse request handler


 
 
   explicit

   
   velocity
   browse
   layout
   Archives

   
   edismax
 
I have also copied the 'velocity' directory from a 4.9 core to the 

/archives/solr-5.0.0/server/solr/mycore1/conf directory  

as well as the toolbox.xml file.


The mycore1's conf directory now contains the following files and directories:

currency.xml  lang  protwords.txt  _rest_managed.json  schema.xml  
solrconfig.xml  stopwords.txt  synonyms.txt  toolbox.xml  velocity



When I type http://myserver.com:8990/solr/mycore1/select?q=*:* in a browser, I 
get an XML page, not HTML generated by Velocity, as expected.



0
5
















What did I miss?

Cheers,

Philippe








-
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org



Re: Trouble with Velocity in SOLR 5.0.0

2015-03-10 Thread phiroc
Problem solved.

A query Response Writer was not declared in my solrconfig.xml file.

 
${velocity.template.base.dir:}
  
  



- Mail original -
De: phi...@free.fr
À: "Velocity Users List" 
Envoyé: Mardi 10 Mars 2015 14:16:41
Objet: Trouble with Velocity in SOLR 5.0.0

Hello,

I am trying to make Velocity work in SOLR 5.0.0.

First of all, I have added the following lines to my core's solrconfig.xml file:

5.0.0
  
  
  

  
  

  
  
...


... and created a /browse request handler


 
 
   explicit

   
   velocity
   browse
   layout
   Archives

   
   edismax
 
I have also copied the 'velocity' directory from a 4.9 core to the 

/archives/solr-5.0.0/server/solr/mycore1/conf directory  

as well as the toolbox.xml file.


The mycore1's conf directory now contains the following files and directories:

currency.xml  lang  protwords.txt  _rest_managed.json  schema.xml  
solrconfig.xml  stopwords.txt  synonyms.txt  toolbox.xml  velocity



When I type http://myserver.com:8990/solr/mycore1/select?q=*:* in a browser, I 
get an XML page, not HTML generated by Velocity, as expected.



0
5
















What did I miss?

Cheers,

Philippe








-
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org



Trouble with Velocity in SOLR 5.0.0

2015-03-10 Thread phiroc
Hello,

I am trying to make Velocity work in SOLR 5.0.0.

First of all, I have added the following lines to my core's solrconfig.xml file:

5.0.0
  
  
  

  
  

  
  
...


... and created a /browse request handler


 
 
   explicit

   
   velocity
   browse
   layout
   Archives

   
   edismax
 
I have also copied the 'velocity' directory from a 4.9 core to the 

/archives/solr-5.0.0/server/solr/mycore1/conf directory  

as well as the toolbox.xml file.


The mycore1's conf directory now contains the following files and directories:

currency.xml  lang  protwords.txt  _rest_managed.json  schema.xml  
solrconfig.xml  stopwords.txt  synonyms.txt  toolbox.xml  velocity



When I type http://myserver.com:8990/solr/mycore1/select?q=*:* in a browser, I 
get an XML page, not HTML generated by Velocity, as expected.



0
5
















What did I miss?

Cheers,

Philippe








-
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org