mirror of https://github.com/apache/lucene.git
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:
parent
12cc86b408
commit
9099b123d1
|
@ -27,7 +27,7 @@
|
||||||
<field name="price">92</field>
|
<field name="price">92</field>
|
||||||
<field name="popularity">6</field>
|
<field name="popularity">6</field>
|
||||||
<field name="inStock">true</field>
|
<field name="inStock">true</field>
|
||||||
<field name="timestamp">NOW</field>
|
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
|
||||||
</doc>
|
</doc>
|
||||||
|
|
||||||
<doc>
|
<doc>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<field name="price">350</field>
|
<field name="price">350</field>
|
||||||
<field name="popularity">6</field>
|
<field name="popularity">6</field>
|
||||||
<field name="inStock">true</field>
|
<field name="inStock">true</field>
|
||||||
<field name="timestamp">NOW</field>
|
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
|
||||||
</doc>
|
</doc>
|
||||||
</add>
|
</add>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<field name="price">19.95</field>
|
<field name="price">19.95</field>
|
||||||
<field name="popularity">1</field>
|
<field name="popularity">1</field>
|
||||||
<field name="inStock">false</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>
|
||||||
|
|
||||||
<doc>
|
<doc>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<field name="price">11.50</field>
|
<field name="price">11.50</field>
|
||||||
<field name="popularity">1</field>
|
<field name="popularity">1</field>
|
||||||
<field name="inStock">false</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>
|
</doc>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,5 +32,5 @@
|
||||||
<field name="price">399.00</field>
|
<field name="price">399.00</field>
|
||||||
<field name="popularity">10</field>
|
<field name="popularity">10</field>
|
||||||
<field name="inStock">true</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>
|
</doc></add>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<field name="price">185</field>
|
<field name="price">185</field>
|
||||||
<field name="popularity">5</field>
|
<field name="popularity">5</field>
|
||||||
<field name="inStock">true</field>
|
<field name="inStock">true</field>
|
||||||
<field name="timestamp">NOW</field>
|
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
|
||||||
</doc>
|
</doc>
|
||||||
|
|
||||||
<doc>
|
<doc>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<field name="price">74.99</field>
|
<field name="price">74.99</field>
|
||||||
<field name="popularity">7</field>
|
<field name="popularity">7</field>
|
||||||
<field name="inStock">true</field>
|
<field name="inStock">true</field>
|
||||||
<field name="timestamp">NOW</field>
|
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
|
||||||
</doc>
|
</doc>
|
||||||
|
|
||||||
<doc>
|
<doc>
|
||||||
|
@ -48,10 +48,10 @@
|
||||||
<field name="cat">electronics</field>
|
<field name="cat">electronics</field>
|
||||||
<field name="cat">memory</field>
|
<field name="cat">memory</field>
|
||||||
<field name="features">CAS latency 3, 2.7v</field>
|
<field name="features">CAS latency 3, 2.7v</field>
|
||||||
<!-- note: price is missing on this one -->
|
<!-- note: price & popularity is missing on this one -->
|
||||||
<field name="popularity">5</field>
|
<field name="popularity">0</field>
|
||||||
<field name="inStock">true</field>
|
<field name="inStock">true</field>
|
||||||
<field name="timestamp">NOW</field>
|
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
|
||||||
</doc>
|
</doc>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,5 +30,5 @@
|
||||||
<field name="price">329.95</field>
|
<field name="price">329.95</field>
|
||||||
<field name="popularity">7</field>
|
<field name="popularity">7</field>
|
||||||
<field name="inStock">true</field>
|
<field name="inStock">true</field>
|
||||||
<field name="timestamp">NOW</field>
|
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
|
||||||
</doc></add>
|
</doc></add>
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<field name="price">479.95</field>
|
<field name="price">479.95</field>
|
||||||
<field name="popularity">7</field>
|
<field name="popularity">7</field>
|
||||||
<field name="inStock">false</field>
|
<field name="inStock">false</field>
|
||||||
<field name="timestamp">NOW/DAY</field>
|
<field name="manufacturedate_dt">2006-02-13T15:26:37Z/DAY</field>
|
||||||
</doc>
|
</doc>
|
||||||
<!-- yes, you can add more than one document at a time -->
|
<!-- yes, you can add more than one document at a time -->
|
||||||
<doc>
|
<doc>
|
||||||
|
@ -49,6 +49,6 @@
|
||||||
<field name="price">649.99</field>
|
<field name="price">649.99</field>
|
||||||
<field name="popularity">7</field>
|
<field name="popularity">7</field>
|
||||||
<field name="inStock">false</field>
|
<field name="inStock">false</field>
|
||||||
<field name="timestamp">NOW/DAY</field>
|
<field name="manufacturedate_dt">2006-02-13T15:26:37Z/DAY</field>
|
||||||
</doc>
|
</doc>
|
||||||
</add>
|
</add>
|
||||||
|
|
|
@ -362,7 +362,8 @@
|
||||||
<fields>
|
<fields>
|
||||||
<!-- Valid attributes for fields:
|
<!-- Valid attributes for fields:
|
||||||
name: mandatory - the name for the field
|
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)
|
indexed: true if this field should be indexed (searchable or sortable)
|
||||||
stored: true if this field should be retrievable
|
stored: true if this field should be retrievable
|
||||||
compressed: [false] if this field should be stored using gzip compression
|
compressed: [false] if this field should be stored using gzip compression
|
||||||
|
@ -373,11 +374,16 @@
|
||||||
this field (this disables length normalization and index-time
|
this field (this disables length normalization and index-time
|
||||||
boosting for the field, and saves some memory). Only full-text
|
boosting for the field, and saves some memory). Only full-text
|
||||||
fields or fields that need an index-time boost need norms.
|
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.
|
termVectors: [false] set to true to store the term vector for a
|
||||||
When using MoreLikeThis, fields used for similarity should be stored for
|
given field.
|
||||||
best performance.
|
When using MoreLikeThis, fields used for similarity should be
|
||||||
termPositions: Store position information with the term vector. This will increase storage costs.
|
stored for best performance.
|
||||||
termOffsets: Store offset information with the term vector. This will increase storage costs.
|
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" />
|
<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="weight" type="float" indexed="true" stored="true"/>
|
||||||
<field name="price" type="float" indexed="true" stored="true"/>
|
<field name="price" type="float" indexed="true" stored="true"/>
|
||||||
<!-- "default" values can be specified for fields, indicating which
|
<field name="popularity" type="int" indexed="true" stored="true" />
|
||||||
value should be used if no value is specified when adding a document.
|
<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"/>
|
<field name="title" type="text" indexed="true" stored="true"/>
|
||||||
|
@ -410,11 +413,12 @@
|
||||||
|
|
||||||
<field name="payloads" type="payloads" indexed="true" stored="true"/>
|
<field name="payloads" type="payloads" indexed="true" stored="true"/>
|
||||||
|
|
||||||
<!-- Here, default is used to create a "timestamp" field indicating
|
<!-- Uncommenting the following will create a "timestamp" field using
|
||||||
When each document was indexed.
|
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" 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
|
<!-- Dynamic field definitions. If a field name is not found, dynamicFields
|
||||||
|
|
Loading…
Reference in New Issue