On Fri, May 20, 2011 at 9:35 PM, fredylee
<fredy_ru...@co.washington.or.us> wrote:
[...]
> The documentations for SOLR however mentions nothing about declaring fields
> in the schema.xml in order for data import to work.  I must have missed it.
>
> So All I need to do is declaring field name?  like the one I do below?
>   <field name="companyname" type="string" indexed="true" stored="true"
> default="NOW"/>
[...]

By and large, yes, though the default="NOW" probably does not
make sense. Also:
* One typically one wants search fields to be analysed, so type="text"
  might be better
* Depending on the application, one might, or might not, want
  stored="true". This would depend on whether one wants just to
  search in the field, or also to retrieve data (e.g., for display on
  a web front-end).

A good starting point might be:
* The Solr tutorial: http://lucene.apache.org/solr/tutorial.html
* The Solr Wiki: http://wiki.apache.org/solr/SolrResources

The Solr book is also quite useful, at least when getting
started.

Regards,
Gora

Reply via email to