cleanup of comments relating to 'default' field values; cleanup of 'timestamp' usage examples -- switched to using 'manufacturedate_dt' as a generic date field example since yonik doens't want schema to have fields with default values uncommented

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@806357 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2009-08-20 21:04:08 +00:00
parent 12cc86b408
commit 9099b123d1
7 changed files with 32 additions and 28 deletions

View File

@ -27,7 +27,7 @@
<field name="price">92</field>
<field name="popularity">6</field>
<field name="inStock">true</field>
<field name="timestamp">NOW</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
</doc>
<doc>
@ -42,7 +42,7 @@
<field name="price">350</field>
<field name="popularity">6</field>
<field name="inStock">true</field>
<field name="timestamp">NOW</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
</doc>
</add>

View File

@ -28,7 +28,7 @@
<field name="price">19.95</field>
<field name="popularity">1</field>
<field name="inStock">false</field>
<field name="timestamp">2005-08-01T16:30:25Z</field>
<field name="manufacturedate_dt">2005-08-01T16:30:25Z</field>
</doc>
<doc>
@ -42,7 +42,7 @@
<field name="price">11.50</field>
<field name="popularity">1</field>
<field name="inStock">false</field>
<field name="timestamp">2006-02-14T23:55:59Z</field>
<field name="manufacturedate_dt">2006-02-14T23:55:59Z</field>
</doc>

View File

@ -32,5 +32,5 @@
<field name="price">399.00</field>
<field name="popularity">10</field>
<field name="inStock">true</field>
<field name="timestamp">2005-10-12T08:00:00Z</field>
<field name="manufacturedate_dt">2005-10-12T08:00:00Z</field>
</doc></add>

View File

@ -26,7 +26,7 @@
<field name="price">185</field>
<field name="popularity">5</field>
<field name="inStock">true</field>
<field name="timestamp">NOW</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
</doc>
<doc>
@ -38,7 +38,7 @@
<field name="price">74.99</field>
<field name="popularity">7</field>
<field name="inStock">true</field>
<field name="timestamp">NOW</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
</doc>
<doc>
@ -48,10 +48,10 @@
<field name="cat">electronics</field>
<field name="cat">memory</field>
<field name="features">CAS latency 3, 2.7v</field>
<!-- note: price is missing on this one -->
<field name="popularity">5</field>
<!-- note: price & popularity is missing on this one -->
<field name="popularity">0</field>
<field name="inStock">true</field>
<field name="timestamp">NOW</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
</doc>

View File

@ -30,5 +30,5 @@
<field name="price">329.95</field>
<field name="popularity">7</field>
<field name="inStock">true</field>
<field name="timestamp">NOW</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
</doc></add>

View File

@ -31,7 +31,7 @@
<field name="price">479.95</field>
<field name="popularity">7</field>
<field name="inStock">false</field>
<field name="timestamp">NOW/DAY</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z/DAY</field>
</doc>
<!-- yes, you can add more than one document at a time -->
<doc>
@ -49,6 +49,6 @@
<field name="price">649.99</field>
<field name="popularity">7</field>
<field name="inStock">false</field>
<field name="timestamp">NOW/DAY</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z/DAY</field>
</doc>
</add>

View File

@ -362,7 +362,8 @@
<fields>
<!-- Valid attributes for fields:
name: mandatory - the name for the field
type: mandatory - the name of a previously defined type from the <types> section
type: mandatory - the name of a previously defined type from the
<types> section
indexed: true if this field should be indexed (searchable or sortable)
stored: true if this field should be retrievable
compressed: [false] if this field should be stored using gzip compression
@ -373,11 +374,16 @@
this field (this disables length normalization and index-time
boosting for the field, and saves some memory). Only full-text
fields or fields that need an index-time boost need norms.
termVectors: [false] set to true to store the term vector for a given field.
When using MoreLikeThis, fields used for similarity should be stored for
best performance.
termPositions: Store position information with the term vector. This will increase storage costs.
termOffsets: Store offset information with the term vector. This will increase storage costs.
termVectors: [false] set to true to store the term vector for a
given field.
When using MoreLikeThis, fields used for similarity should be
stored for best performance.
termPositions: Store position information with the term vector.
This will increase storage costs.
termOffsets: Store offset information with the term vector. This
will increase storage costs.
default: a value that should be used if no value is specified
when adding a document.
-->
<field name="id" type="string" indexed="true" stored="true" required="true" />
@ -391,11 +397,8 @@
<field name="weight" type="float" indexed="true" stored="true"/>
<field name="price" type="float" indexed="true" stored="true"/>
<!-- "default" values can be specified for fields, indicating which
value should be used if no value is specified when adding a document.
-->
<field name="popularity" type="int" indexed="true" stored="true"/>
<field name="inStock" type="boolean" indexed="true" stored="true"/>
<field name="popularity" type="int" indexed="true" stored="true" />
<field name="inStock" type="boolean" indexed="true" stored="true" />
<field name="title" type="text" indexed="true" stored="true"/>
@ -410,11 +413,12 @@
<field name="payloads" type="payloads" indexed="true" stored="true"/>
<!-- Here, default is used to create a "timestamp" field indicating
When each document was indexed.
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
<!-- Uncommenting the following will create a "timestamp" field using
a default value of "NOW" to indicate when each document was indexed.
-->
<!--
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
-->
<field name="timestamp" type="date" indexed="true" stored="true" multiValued="false"/>
<!-- Dynamic field definitions. If a field name is not found, dynamicFields