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 Lakshmi Bhargavi <la...@gmail.com> on 2012/08/06 16:48:03 UTC

Reg Default search field

Hi ,

I have a question on the default search field defined in schema.xml or in
the later versions , specified as part of the search handlers. Do we always
need to have this default search field defined in order to do search if the
field name is not passed? 

Suppose , there is a field named 'Title' and it holds a value called 'solr'.  

In order to get results for this search -
http://localhost:8080/solr/select/?q=solr&version=2.2&start=0&rows=10&indent=on
,

 do I need to define default search field and copy the contents of the
specific field into this default search field ?

<DefaultSearchField>text</defaultSearchField>
<copyField source="Title" dest="text"/>

Thanks in advance!
Lakshmi



--
View this message in context: http://lucene.472066.n3.nabble.com/Reg-Default-search-field-tp3999387.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Reg Default search field

Posted by Erik Hatcher <er...@gmail.com>.
Lakschmi - The field(s) used for querying needs to be specified somewhere, either as a default field or as a qf parameter to (e)dismax, etc.

	Erik

On Aug 6, 2012, at 10:48 , Lakshmi Bhargavi wrote:

> Hi ,
> 
> I have a question on the default search field defined in schema.xml or in
> the later versions , specified as part of the search handlers. Do we always
> need to have this default search field defined in order to do search if the
> field name is not passed? 
> 
> Suppose , there is a field named 'Title' and it holds a value called 'solr'.  
> 
> In order to get results for this search -
> http://localhost:8080/solr/select/?q=solr&version=2.2&start=0&rows=10&indent=on
> ,
> 
> do I need to define default search field and copy the contents of the
> specific field into this default search field ?
> 
> <DefaultSearchField>text</defaultSearchField>
> <copyField source="Title" dest="text"/>
> 
> Thanks in advance!
> Lakshmi
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Reg-Default-search-field-tp3999387.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Reg Default search field

Posted by Jack Krupansky <ja...@basetechnology.com>.
defaultSearchField is deprecated in Solr 3.6. It is still supported, but the 
"df" query request parameter overrides it. So, go into solrconfig.xml and 
change the "df" parameter value from "text" to "Title".

-- Jack Krupansky

-----Original Message----- 
From: Lakshmi Bhargavi
Sent: Monday, August 06, 2012 10:48 AM
To: solr-user@lucene.apache.org
Subject: Reg Default search field

Hi ,

I have a question on the default search field defined in schema.xml or in
the later versions , specified as part of the search handlers. Do we always
need to have this default search field defined in order to do search if the
field name is not passed?

Suppose , there is a field named 'Title' and it holds a value called 'solr'.

In order to get results for this search -
http://localhost:8080/solr/select/?q=solr&version=2.2&start=0&rows=10&indent=on
,

do I need to define default search field and copy the contents of the
specific field into this default search field ?

<DefaultSearchField>text</defaultSearchField>
<copyField source="Title" dest="text"/>

Thanks in advance!
Lakshmi



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Reg-Default-search-field-tp3999387.html
Sent from the Solr - User mailing list archive at Nabble.com.