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 Sushil Vegad <vs...@serebrum.com> on 2009/01/02 18:03:49 UTC
Highlighting not working
Hi,
I cant get highlighting to work. I tried everything mentioned about it on
the forum. PLEASE HELP...
We use solrJ; search a field called content, it is the default search field,
indexed and stored. Its type is text, has analyzer associated with it. There
is no uniqueKey in the schema
SolrQuery query = new SolrQuery();
query.setHighlight(true);
query.setQuery(queryStr);
When this query is fired, it throws the exception below that says "Message:
requires 'name' attribute: lst". What am I doing wrong? I have attached the
solrconfig.xml for your reference.
THANK YOU.
The exception trace is:
org.apache.solr.client.solrj.SolrServerException: Error executing query
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:88)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:126)
at test.Client.main(Client.java:143)
Caused by: org.apache.solr.common.SolrException: parsing error
at
org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:140)
at
org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:106)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:427)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:206)
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:84)
... 2 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[3,1440]
Message: requires 'name' attribute: lst
at
org.apache.solr.client.solrj.impl.XMLResponseParser.readNamedList(XMLResponseParser.java:284)
at
org.apache.solr.client.solrj.impl.XMLResponseParser.readNamedList(XMLResponseParser.java:291)
at
org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:127)
http://www.nabble.com/file/p21254049/solrconfig.xml solrconfig.xml
--
View this message in context: http://www.nabble.com/Highlighting-not-working-tp21254049p21254049.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Highlighting not working
Posted by Chris Hostetter <ho...@fucit.org>.
The problem here seems to be that SolrJ can't parse the XML response
comming back from your solr server ... can you check your servlet
container logs and let us know:
1) exactly what URL it says SolrJ is hitting.
2) the response you get when you hit that same url in your browser?
: Caused by: javax.xml.stream.XMLStreamException: ParseError at
: [row,col]:[3,1440]
: Message: requires 'name' attribute: lst
: at
: org.apache.solr.client.solrj.impl.XMLResponseParser.readNamedList(XMLResponseParser.java:284)
-Hoss