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 Rohit <ro...@in-rev.com> on 2012/06/11 14:58:03 UTC

defaultSearchField not working after upgrade to solr3.6

Hi,

 

We have just migrated from solr3.5 to solr3.6, for all this time we have
been querying solr as,

 

http://122.166.9.144:8080/solr/
<http://122.166.9.144:8080/solr/%3c%3ccorename%3e%3e/?q=apple>
<<corename>>/?q=apple

 

But now this is not working and the name of the search field needs to be
provided everytime, which was not the case earlier. What might be casing
this?

 

Regards,

Rohit

 


Re: defaultSearchField not working after upgrade to solr3.6

Posted by Jack Krupansky <ja...@basetechnology.com>.
Hmmm... how could I have gotten so confused?!?! Actually, I recognized my 
mistake yesterday (after reading the code some more for David's Jira) but 
hadn't gotten around to correcting myself.

In any case, the original problematic scenario may have been simply copying 
3.5 request handler/params to the 3.6 example solrconfig but not realizing 
that the deprecated defaultSearchField element needed to be uncommented in 
the 3.6 schema.

A second scenario was using in fact setting defaultSearchField but it wasn't 
working - because the request handler for 3.6 had set df to "text" and the 
code won't check the defaultSearchField if "df" is set.

-- Jack Krupansky

-----Original Message----- 
From: Chris Hostetter
Sent: Thursday, June 14, 2012 4:05 PM
To: solr-user@lucene.apache.org
Subject: Re: defaultSearchField not working after upgrade to solr3.6


: Correct. In 3.6 it is simply ignored. In 4.x it currently does work.

That's not true.

the example cofigs in Solr 3.6 no longer mention defaultSearchField,
but Solr 3.6 will still respect a <defaultSearchField/> declaration if
it exists in your schema.xml -- I just verified this by running Solr 3.6
using hte Solr 3.5 example configs.

The only change SOLR-2274 made to the *CODE* in 3.6 was to improve the
wording in the logs/error messages to better distiguish when it was
refering to the "df" param vs the "<defaultSearchField/>"

Rohit: if you are running 3.6 wit ha schema.xml that contains a
<defaultSearchField> and you are seeing a failure related to not fiding
hte default field, please post your schema.xml and the stack trace of the
error.


-Hoss 


Re: defaultSearchField not working after upgrade to solr3.6

Posted by Chris Hostetter <ho...@fucit.org>.
: Correct. In 3.6 it is simply ignored. In 4.x it currently does work.

That's not true.

the example cofigs in Solr 3.6 no longer mention defaultSearchField, 
but Solr 3.6 will still respect a <defaultSearchField/> declaration if 
it exists in your schema.xml -- I just verified this by running Solr 3.6 
using hte Solr 3.5 example configs.

The only change SOLR-2274 made to the *CODE* in 3.6 was to improve the 
wording in the logs/error messages to better distiguish when it was 
refering to the "df" param vs the "<defaultSearchField/>"

Rohit: if you are running 3.6 wit ha schema.xml that contains a 
<defaultSearchField> and you are seeing a failure related to not fiding 
hte default field, please post your schema.xml and the stack trace of the 
error.


-Hoss

Re: defaultSearchField not working after upgrade to solr3.6

Posted by Jack Krupansky <ja...@basetechnology.com>.
Correct. In 3.6 it is simply ignored. In 4.x it currently does work.

Generally, Solr ignores any elements that it does not support.

-- Jack Krupansky

-----Original Message----- 
From: Rohit 
Sent: Monday, June 11, 2012 12:55 PM 
To: solr-user@lucene.apache.org 
Subject: RE: defaultSearchField not working after upgrade to solr3.6 

Thanks for the pointers Jack, actually the strange part is that the
defaultSearchField element is present and uncommented yet not working.

<uniqueKey>docKey</uniqueKey>
<defaultSearchField>searchText</defaultSearchField>


Regards,
Rohit

-----Original Message-----
From: Jack Krupansky [mailto:jack@basetechnology.com] 
Sent: 11 June 2012 20:35
To: solr-user@lucene.apache.org
Subject: Re: defaultSearchField not working after upgrade to solr3.6

Just to clarify one point from my original response, the "df" parameter is
already set for the default request handlers, so all you need to do is
change it from the "text" field to your preferred default field.

Or, you can simply uncomment the deprecated defaultSearchField element in
your schema and you should get the old behavior.

As far as the rationale, the discussion is here:
https://issues.apache.org/jira/browse/SOLR-2724
"Deprecate defaultSearchField and defaultOperator defined in schema.xml"

In 4.x, this change was reverted, so the defaultSearchField element is
present.

The issue is still open for 4.x.

Feel free to comment directly on that Jira.

-- Jack Krupansky

-----Original Message-----
From: Rohit
Sent: Monday, June 11, 2012 9:49 AM
To: solr-user@lucene.apache.org
Subject: RE: defaultSearchField not working after upgrade to solr3.6

Hi Jack,

I understand that df would make this work normaly, but why did
defaultSearchField stop working suddenly. I notice that there is talk about
deprecating it, but even then it should continue to work right?

Regards,
Rohit

-----Original Message-----
From: Jack Krupansky [mailto:jack@basetechnology.com]
Sent: 11 June 2012 18:49
To: solr-user@lucene.apache.org
Subject: Re: defaultSearchField not working after upgrade to solr3.6

Add the "df" parameter to your query request handler. It names the default
field. Or use "qf" for the edismax query parser.

-- Jack Krupansky

-----Original Message-----
From: Rohit
Sent: Monday, June 11, 2012 8:58 AM
To: solr-user@lucene.apache.org
Subject: defaultSearchField not working after upgrade to solr3.6

Hi,



We have just migrated from solr3.5 to solr3.6, for all this time we have
been querying solr as,



http://122.166.9.144:8080/solr/
<http://122.166.9.144:8080/solr/%3c%3ccorename%3e%3e/?q=apple>
<<corename>>/?q=apple



But now this is not working and the name of the search field needs to be
provided everytime, which was not the case earlier. What might be casing
this?



Regards,

Rohit




RE: defaultSearchField not working after upgrade to solr3.6

Posted by Rohit <ro...@in-rev.com>.
Thanks for the pointers Jack, actually the strange part is that the
defaultSearchField element is present and uncommented yet not working.

<uniqueKey>docKey</uniqueKey>
<defaultSearchField>searchText</defaultSearchField>


Regards,
Rohit

-----Original Message-----
From: Jack Krupansky [mailto:jack@basetechnology.com] 
Sent: 11 June 2012 20:35
To: solr-user@lucene.apache.org
Subject: Re: defaultSearchField not working after upgrade to solr3.6

Just to clarify one point from my original response, the "df" parameter is
already set for the default request handlers, so all you need to do is
change it from the "text" field to your preferred default field.

Or, you can simply uncomment the deprecated defaultSearchField element in
your schema and you should get the old behavior.

As far as the rationale, the discussion is here:
https://issues.apache.org/jira/browse/SOLR-2724
"Deprecate defaultSearchField and defaultOperator defined in schema.xml"

In 4.x, this change was reverted, so the defaultSearchField element is
present.

The issue is still open for 4.x.

Feel free to comment directly on that Jira.

-- Jack Krupansky

-----Original Message-----
From: Rohit
Sent: Monday, June 11, 2012 9:49 AM
To: solr-user@lucene.apache.org
Subject: RE: defaultSearchField not working after upgrade to solr3.6

Hi Jack,

I understand that df would make this work normaly, but why did
defaultSearchField stop working suddenly. I notice that there is talk about
deprecating it, but even then it should continue to work right?

Regards,
Rohit

-----Original Message-----
From: Jack Krupansky [mailto:jack@basetechnology.com]
Sent: 11 June 2012 18:49
To: solr-user@lucene.apache.org
Subject: Re: defaultSearchField not working after upgrade to solr3.6

Add the "df" parameter to your query request handler. It names the default
field. Or use "qf" for the edismax query parser.

-- Jack Krupansky

-----Original Message-----
From: Rohit
Sent: Monday, June 11, 2012 8:58 AM
To: solr-user@lucene.apache.org
Subject: defaultSearchField not working after upgrade to solr3.6

Hi,



We have just migrated from solr3.5 to solr3.6, for all this time we have
been querying solr as,



http://122.166.9.144:8080/solr/
<http://122.166.9.144:8080/solr/%3c%3ccorename%3e%3e/?q=apple>
<<corename>>/?q=apple



But now this is not working and the name of the search field needs to be
provided everytime, which was not the case earlier. What might be casing
this?



Regards,

Rohit





Re: defaultSearchField not working after upgrade to solr3.6

Posted by Jack Krupansky <ja...@basetechnology.com>.
Just to clarify one point from my original response, the "df" parameter is 
already set for the default request handlers, so all you need to do is 
change it from the "text" field to your preferred default field.

Or, you can simply uncomment the deprecated defaultSearchField element in 
your schema and you should get the old behavior.

As far as the rationale, the discussion is here:
https://issues.apache.org/jira/browse/SOLR-2724
"Deprecate defaultSearchField and defaultOperator defined in schema.xml"

In 4.x, this change was reverted, so the defaultSearchField element is 
present.

The issue is still open for 4.x.

Feel free to comment directly on that Jira.

-- Jack Krupansky

-----Original Message----- 
From: Rohit
Sent: Monday, June 11, 2012 9:49 AM
To: solr-user@lucene.apache.org
Subject: RE: defaultSearchField not working after upgrade to solr3.6

Hi Jack,

I understand that df would make this work normaly, but why did
defaultSearchField stop working suddenly. I notice that there is talk about
deprecating it, but even then it should continue to work right?

Regards,
Rohit

-----Original Message-----
From: Jack Krupansky [mailto:jack@basetechnology.com]
Sent: 11 June 2012 18:49
To: solr-user@lucene.apache.org
Subject: Re: defaultSearchField not working after upgrade to solr3.6

Add the "df" parameter to your query request handler. It names the default
field. Or use "qf" for the edismax query parser.

-- Jack Krupansky

-----Original Message-----
From: Rohit
Sent: Monday, June 11, 2012 8:58 AM
To: solr-user@lucene.apache.org
Subject: defaultSearchField not working after upgrade to solr3.6

Hi,



We have just migrated from solr3.5 to solr3.6, for all this time we have
been querying solr as,



http://122.166.9.144:8080/solr/
<http://122.166.9.144:8080/solr/%3c%3ccorename%3e%3e/?q=apple>
<<corename>>/?q=apple



But now this is not working and the name of the search field needs to be
provided everytime, which was not the case earlier. What might be casing
this?



Regards,

Rohit




RE: defaultSearchField not working after upgrade to solr3.6

Posted by Rohit <ro...@in-rev.com>.
Hi Jack,

I understand that df would make this work normaly, but why did
defaultSearchField stop working suddenly. I notice that there is talk about
deprecating it, but even then it should continue to work right? 

Regards,
Rohit

-----Original Message-----
From: Jack Krupansky [mailto:jack@basetechnology.com] 
Sent: 11 June 2012 18:49
To: solr-user@lucene.apache.org
Subject: Re: defaultSearchField not working after upgrade to solr3.6

Add the "df" parameter to your query request handler. It names the default
field. Or use "qf" for the edismax query parser.

-- Jack Krupansky

-----Original Message-----
From: Rohit
Sent: Monday, June 11, 2012 8:58 AM
To: solr-user@lucene.apache.org
Subject: defaultSearchField not working after upgrade to solr3.6

Hi,



We have just migrated from solr3.5 to solr3.6, for all this time we have
been querying solr as,



http://122.166.9.144:8080/solr/
<http://122.166.9.144:8080/solr/%3c%3ccorename%3e%3e/?q=apple>
<<corename>>/?q=apple



But now this is not working and the name of the search field needs to be
provided everytime, which was not the case earlier. What might be casing
this?



Regards,

Rohit





Re: defaultSearchField not working after upgrade to solr3.6

Posted by Jack Krupansky <ja...@basetechnology.com>.
Add the "df" parameter to your query request handler. It names the default 
field. Or use "qf" for the edismax query parser.

-- Jack Krupansky

-----Original Message----- 
From: Rohit
Sent: Monday, June 11, 2012 8:58 AM
To: solr-user@lucene.apache.org
Subject: defaultSearchField not working after upgrade to solr3.6

Hi,



We have just migrated from solr3.5 to solr3.6, for all this time we have
been querying solr as,



http://122.166.9.144:8080/solr/
<http://122.166.9.144:8080/solr/%3c%3ccorename%3e%3e/?q=apple>
<<corename>>/?q=apple



But now this is not working and the name of the search field needs to be
provided everytime, which was not the case earlier. What might be casing
this?



Regards,

Rohit