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 Rakesh Varna <ra...@gmail.com> on 2012/02/04 14:11:12 UTC

Catchall field does not seem to work. Solr 3.4

Hello Solr-users,
             I am trying to search a patents dataset (in xml format) which
has fields like title, abstract, patent_ number,year of submission . Since
I would not want to specify the field name in a query, I have used a
catchall field, and using copyField, I copied all fields into it. I then
made it the default search field.
My schema looks something like:

 <field name="year" type="int" indexed="true" stored="true"/>
   <field name="title" type="text_general" indexed="true" stored="true" />
   <field name="abs" type="text_general" indexed="true" stored="true"/>
      <field name="patent_no" type="string" indexed="true" stored="true" />

   <field name="searchField" type="text_general" indexed="true"
stored="true" multiValued="true"/>


 <copyField source="year" dest="searchField"/>
 <copyField source="abs" dest="searchField"/>
 <copyfield source="title" dest="searchField"/>
 <copyfield source="patent_no" dest="searchField"/>

 <defaultSearchField>searchField</defaultSearchField>


I have noticed that 'title' field  and 'patent_no' field are not getting
copied. If i search a string which appears in the title, like
'quinolinecarboxylic', I do not get any results. But if specify
'title:quinolinecarboxylic', I get the result correctly. I checked the
output and saw that even in the correct result, the searchField tag did not
contain the title and patent no data. But I do see the 'year' and 'abs'
field data replicated in the 'searchField' tag. I am checking the xml
output and hence the tag.

Any idea or pointers to what I might be doing wrong? I am using Solr 3.4
with tomcat.

Regards,
Rakesh Varna

Re: Catchall field does not seem to work. Solr 3.4

Posted by Rakesh Varna <ra...@gmail.com>.
Thanks! I will look into it.

Regards,
Rakesh Varna

On Sat, Feb 4, 2012 at 10:09 AM, Esteban Donato <es...@gmail.com>wrote:

> also, if you want to search across different fields without specifying
> field names, you can use dismax
> http://wiki.apache.org/solr/DisMaxQParserPlugin
>
>
> On Sat, Feb 4, 2012 at 11:06 AM, Ahmet Arslan <io...@yahoo.com> wrote:
> >>  <copyField source="year" dest="searchField"/>
> >>  <copyField source="abs" dest="searchField"/>
> >>  <copyfield source="title" dest="searchField"/>
> >>  <copyfield source="patent_no" dest="searchField"/>
> >>
> >>  <defaultSearchField>searchField</defaultSearchField>
> >>
> >>
> >> I have noticed that 'title' field  and 'patent_no'
> >> field are not getting
> >> copied.
> >
> > You need to use upper case F letter. copyField versus copyfield.
>

Re: Catchall field does not seem to work. Solr 3.4

Posted by Esteban Donato <es...@gmail.com>.
also, if you want to search across different fields without specifying
field names, you can use dismax
http://wiki.apache.org/solr/DisMaxQParserPlugin


On Sat, Feb 4, 2012 at 11:06 AM, Ahmet Arslan <io...@yahoo.com> wrote:
>>  <copyField source="year" dest="searchField"/>
>>  <copyField source="abs" dest="searchField"/>
>>  <copyfield source="title" dest="searchField"/>
>>  <copyfield source="patent_no" dest="searchField"/>
>>
>>  <defaultSearchField>searchField</defaultSearchField>
>>
>>
>> I have noticed that 'title' field  and 'patent_no'
>> field are not getting
>> copied.
>
> You need to use upper case F letter. copyField versus copyfield.

Re: Catchall field does not seem to work. Solr 3.4

Posted by Ahmet Arslan <io...@yahoo.com>.
>  <copyField source="year" dest="searchField"/>
>  <copyField source="abs" dest="searchField"/>
>  <copyfield source="title" dest="searchField"/>
>  <copyfield source="patent_no" dest="searchField"/>
> 
>  <defaultSearchField>searchField</defaultSearchField>
> 
> 
> I have noticed that 'title' field  and 'patent_no'
> field are not getting
> copied. 

You need to use upper case F letter. copyField versus copyfield.