lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Horninger <>
Subject Same query fails in SolrJ, but works in the browser.
Date Tue, 04 Aug 2015 13:24:26 GMT
Hi Solr Users,

I am running into a problem where a more complex dismax query I am trying to run works with
no problem in the browser.  The query is as follows:

Like I said, I can run this query without problem in the browser, however there is a problem
trying to run the exact same query within SolrJ, I get a 400 error back, with the text "undefined
field name"

The code to generate the query is as follows:
q: Fred
defType: dismax
sort: date1 desc
qf: Line1^2 Line2 Line3 Line4 Line5 Line6 Line7^2 Line8^2 Line9 Line10^1

String result = null;
            SolrClient client = null;
            QueryResponse response = null;
            try {
                  client = new HttpSolrClient(
                  SolrQuery parms = new SolrQuery();
                  parms.set("q", q);
                  parms.set("defTpe", defType);
                  parms.set("sort", sort);
                  parms.set("qf", qf);
                  parms.set("rows", rows);
                  response = client.query(parms);
            } catch (SolrServerException e) {
            } catch (IOException e) {
            } finally {
                  if (client != null) {
                        try {
                        } catch (IOException e) {
            if(response != null) {
                  result = response.toString();
            return result;

For whatever reason, this is not working.  If anyone could shed some light on the issue I
would be extremely grateful.


GHS Confidentiality Notice

This e-mail message, including any attachments, is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any unauthorized review, use, disclosure
or distribution of this information is prohibited, and may be punishable by law. If this was
sent to you in error, please notify the sender by reply e-mail and destroy all copies of the
original message.

GrayHair Software <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message