Thanks  for quick responses,

 Ahemt , i  have tried by removing ampersand then xml response has not
converted to html response it is in just xml only.

Erik , according to  your suggestion  i used VelocityResponseWriter.
like this manner
            query.set("&wt", "velocity");
            query.set("&v.template","browse");
            query.set("&v.layout", "layout");
then also it is throwing same exception as previous
Exception in thread "main"
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:
Expected mime type application/xml but got text/html. 
at
org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:516)
        at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
        at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
        at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:91)


but when i do searching  through solr admin interface then  response is
converted to html.
1. using XslResponseWriter

http://localhost:8983/solr/collection1/select?q=coby&df=text&wt=xslt&indent=true&tr=example.xsl&hl=true&hl.fl=content&hl.fragsize=1000&hl.simple.pre=%3Cem%3E&hl.simple.post=%3C%2Fem%3E

2. using VelocityResponseWriter

http://localhost:8983/solr/collection1/select?q=coby&wt=velocity&indent=true&v.template=browse&v.layout=layout&hl=true&hl.fl=content&hl.fragsize=1000&hl.simple.pre=%3Cem%3E&hl.simple.post=%3C%2Fem%3E

It seems like coding issue of solrj (HttpSolrServer class).


so could you please provide me suggestions.

Thanks,

Venkata krishna Tolusuri.
 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Converting-XML-response-of-Search-query-into-HTML-tp4141456p4142490.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to