Rafal,

Thanks for your response.

I defined what I think you're referring to as "the default search field" as

<defaultSearchField>text</defaultSearchField>

I'm confused about how this works. I defined that field "text" to be of
fieldType "text_en_splitting". I don't understand how associating "text"
with anything can work unless I ALSO associate *my* things (Title, TOC,
Keywords, Overview, and the contents of the URLs pointed to in the
urlpath) with "text" as well.

Does that mean that copyFields will always be necessary if query words
are sent to solr with no field qualifier?

Tim


-----Original Message-----
From: Rafał Kuć [mailto:r....@solr.pl]
Sent: Friday, January 27, 2012 9:43 AM
To: solr-user@lucene.apache.org
Subject: Re: Why are copyFields necessary here?

Hello!

If you don't specify the field, the query will be made against the
default search field defined in the schema.xml file. So, when the
default search field is empty (no copy fields) then there are no search
results.

--
Regards,
 Rafał Kuć

> Hi, all,

> I could use a little education here, if you'd be so kind. My queries
> without a field-name qualifier (such as "schedule a pickup", no
> quotes) don't return any values UNLESS I've defined copyFields as
> illustrated below. The queries work sufficiently well when those
> fields are defined, so I sort of have a reasonable fallback
> position... but I'd like to understand what's really happening. Any
insights are much appreciated.

> I'm using SolrJ from solr-3.5.0, and have the following field
> definitions in schema.xml:

>    <field name="urlpath" type="string" indexed="true" stored="true"/>
>    <field name="Title" type="text_en_splitting" indexed="true"
> stored="true" omitNorms="false"/>
>    <field name="UrlContent" type="text_en_splitting" indexed="true"
> stored="false" required="false"/>
>    <field name="ContentType" type="string" indexed="true" stored="false"
required="false"/>>
>    <field name="ApplicableCompanies" type="string" indexed="true"
> stored="true" required="true" multiValued="true"/>
>    <field name="Keywords" type="text_en_splitting" indexed="true"
> stored="false" required="false" multiValued="true" omitNorms="false"/>
>    <field name="Overview" type="text_en_splitting" indexed="true"
> stored="true" required="false" omitNorms="false"/>
>    <field name="RepType" type="string" indexed="true" stored="true"
> required="true" multiValued="true"/>
>    <field name="Status" type="text_en_splitting" indexed="true"
> stored="false" required="false"/>
>    <field name="TOC" type="text_en_splitting" indexed="true"
> stored="true" required="false" multiValued="true" omitNorms="false"/>
>    <field name="Topics" type="string" indexed="true" stored="true"
> required="false" multiValued="true"/>

> NOTES:
> - text_en_splitting hasn't been changed from the value defined in the
> example schema.xml with the 3.5.0 distribution...
> - <defaultSearchField>text</defaultSearchField> exists as such in the
> file...
> - field "text" is defined as:
>         <field name="text" type="text_en_splitting" indexed="true"
> stored="false" multiValued="true"/>
> - copyFields are:
>         <copyField source="Title" dest="text"/>
>         <copyField source="Keywords" dest="text"/>
>         <copyField source="TOC" dest="text"/>
>         <copyField source="Overview" dest="text"/>
> - If it's relevant, I'm boosting Keywords^2.5, Title^2.0, TOC^2.0, and
> Overview^1.5 when the index is built.

> Thanks,
> Tim Hibbs



Reply via email to