Sunday, April 1, 2018

FW: solrj question

-----Original Message-----
From: Webster Homer [mailto:webster.homer@sial.com]
Sent: 24 March 2018 02:55
To: solr-user@lucene.apache.org
Subject: solrj question

I am working on a program to play back queries from a log file. It seemed
straight forward. The log has the solr query written to it. via the
SolrQuery.toString method. The SolrQuery class has a constructor which takes
a string. It does instantiate a SolrQuery object, however when I try to
actually use it in a search, Solr throws an error that it is not able to
parse the query.

I see this in the output:
Lexical error at line 1, column 1759. Encountered: <EOF> after :
"/select?defType=edismax&start=0&rows=25&...
It has basically the entire solr query which it obviously couldn't parse.

solrQuery = new SolrQuery(log.getQuery());

the log.getQuery method just returns the query that was written to the log
with the toString() method

Is there something I'm doing wrong, or is it that the SolrQuery class cannot
really take its toString output to make itself? Does it have a different
serialization method that could be used?

This would be very useful functionality.

--


This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not the intended recipient,
you must not copy this message or attachment or disclose the contents to any
other person. If you have received this transmission in error, please notify
the sender immediately and delete the message and any attachment from your
system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not
accept liability for any omissions or errors in this message which may arise
as a result of E-Mail-transmission or for damages resulting from any
unauthorized changes of the content of this message and any attachment
thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not
guarantee that this message is free of viruses and does not accept liability
for any damages caused by any virus transmitted therewith.

Click http://www.emdgroup.com/disclaimer to access the German, French,
Spanish and Portuguese versions of this disclaimer.

No comments:

Post a Comment