Sorry, just discovered a keyboard shortcut for "send". :-)

That's a common one to get bit by. The fieldtype StrField indexes the entire
field as one item. So you can only find it if your search term is everything
in the field. That is, "fox" will not find "The Quick Brown Fox", because
it's not the whole field.

The ID field probably works because it has one term in it. "1" finds "1"
just fine.

Try solr.TextField instead.

Tom


On Mon, Dec 7, 2009 at 7:47 PM, Tom Hill <solr-l...@worldware.com> wrote:

> Hi -
>
> That's a common one to get bit by. The string
>
>
> On Mon, Dec 7, 2009 at 7:44 PM, regany <re...@newzealand.co.nz> wrote:
>
>>
>> hi all - newbie solr question - I've indexed some documents and can search
>> /
>> receive results using the following schema - BUT ONLY when searching on
>> the
>> "id" field. If I try searching on the title, subtitle, body or text field
>> I
>> receive NO results. Very confused. :confused: Can anyone see anything
>> obvious I'm doing wrong???? Regan.
>>
>>
>>
>> <?xml version="1.0" ?>
>>
>> <schema name="core0" version="1.1">
>>
>> <types>
>>        <fieldtype name="string" class="solr.StrField"
>> sortMissingLast="true" omitNorms="true" />
>> </types>
>>
>>  <fields>
>> <!-- general -->
>>        <field  name="id" type="string" indexed="true" stored="true"
>> multiValued="false" required="true" />
>>        <field name="title" type="string" indexed="true" stored="true"
>> multiValued="false" />
>>        <field name="subtitle" type="string" indexed="true" stored="true"
>> multiValued="false" />
>>        <field name="body" type="string" indexed="true" stored="true"
>> multiValued="false" />
>>        <field name="text" type="string" indexed="true" stored="false"
>> multiValued="true" />
>>  </fields>
>>
>>  <!-- field to use to determine and enforce document uniqueness. -->
>>  <uniqueKey>id</uniqueKey>
>>
>>  <!-- field for the QueryParser to use when an explicit fieldname is
>> absent
>> -->
>>  <defaultSearchField>text</defaultSearchField>
>>
>>  <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
>>  <solrQueryParser defaultOperator="OR"/>
>>
>>  <!-- copyFields group fields into one single searchable indexed field for
>> speed.  -->
>> <copyField source="title" dest="text" />
>> <copyField source="subtitle" dest="text" />
>> <copyField source="body" dest="text" />
>>
>> </schema>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/why-no-results--tp26688249p26688249.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
>

Reply via email to