SOLR-9990: Add PointFields in example/default schemas

This commit is contained in:
Tomas Fernandez Lobbe 2017-03-16 11:08:50 -07:00 committed by Shalin Shekhar Mangar
parent 2064532417
commit 7183dfda2e
4 changed files with 157 additions and 61 deletions

View File

@ -365,6 +365,8 @@ Other Changes
* SOLR-10247: Support non-numeric metrics and a "compact" format of /admin/metrics output. (ab)
* SOLR-9990: Add PointFields in example/default schemas (Tomás Fernández Löbbe)
================== 6.4.2 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -71,14 +71,14 @@
indexed: true if this field should be indexed (searchable or sortable)
stored: true if this field should be retrievable
docValues: true if this field should have doc values. Doc values are
useful for faceting, grouping, sorting and function queries. Although not
required, doc values will make the index faster to load, more
NRT-friendly and more memory-efficient. They however come with some
limitations: they are currently only supported by StrField, UUIDField
and all Trie*Fields, and depending on the field type, they might
require the field to be single-valued, be required or have a default
value (check the documentation of the field type you're interested in
for more information)
useful (required, if you are using *Point fields) for faceting,
grouping, sorting and function queries. Doc values will make the index
faster to load, more NRT-friendly and more memory-efficient.
They however come with some limitations: they are currently only
supported by StrField, UUIDField, all Trie*Fields and *PointFields,
and depending on the field type, they might require the field to be
single-valued, be required or have a default value (check the
documentation of the field type you're interested in for more information)
multiValued: true if this field may contain multiple values per document
omitNorms: (expert) set to true to omit the norms associated with
this field (this disables length normalization and index-time
@ -153,7 +153,19 @@
<dynamicField name="*_p" type="location" indexed="true" stored="true"/>
<dynamicField name="*_srpt" type="location_rpt" indexed="true" stored="true"/>
<!-- some trie-coded dynamic fields for faster range queries -->
<!-- KD-tree (point) numerics -->
<dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
<dynamicField name="*_pis" type="pints" indexed="true" stored="true"/>
<dynamicField name="*_pl" type="plong" indexed="true" stored="true"/>
<dynamicField name="*_pls" type="plongs" indexed="true" stored="true"/>
<dynamicField name="*_pf" type="pfloat" indexed="true" stored="true"/>
<dynamicField name="*_pfs" type="pfloats" indexed="true" stored="true"/>
<dynamicField name="*_pd" type="pdouble" indexed="true" stored="true"/>
<dynamicField name="*_pds" type="pdoubles" indexed="true" stored="true"/>
<dynamicField name="*_pdt" type="pdate" indexed="true" stored="true"/>
<dynamicField name="*_pdts" type="pdates" indexed="true" stored="true"/>
<!-- some trie-coded dynamic fields -->
<dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
<dynamicField name="*_tis" type="tints" indexed="true" stored="true"/>
<dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
@ -216,8 +228,8 @@
<!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
currently supported on types that are sorted internally as strings
and on numeric types.
This includes "string","boolean", and, as of 3.5 (and 4.x),
int, float, long, date, double, including the "Trie" variants.
This includes "string","boolean", "int", "float", "long", "date", "double",
including the "Trie" and "Point" variants.
- If sortMissingLast="true", then a sort on this field will cause documents
without the field to come after documents with the field,
regardless of the requested sort order (asc or desc).
@ -230,10 +242,23 @@
-->
<!--
Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
Numeric field types that index values using KD-trees. *Point fields are faster and more efficient than Trie* fields both, at
search time and at index time, but some features are still not supported.
Point fields don't support FieldCache, so they must have docValues="true" if needed for sorting, faceting, functions, etc.
-->
<fieldType name="pint" class="solr.IntPointField" docValues="true"/>
<fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
These fields support doc values, but they require the field to be
single-valued and either be required or have a default value.
<fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
<fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
<fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
<fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
<!--
Default numeric field types. For faster range queries, consider *PointFields (pint/pfloat/plong/pdouble), or the
tint/tfloat/tlong/tdouble types.
-->
<fieldType name="int" class="solr.TrieIntField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
@ -254,6 +279,8 @@
Smaller precisionStep values (specified in bits) will lead to more tokens
indexed per value, slightly larger index size, and faster range queries.
A precisionStep of 0 disables indexing at different precision levels.
Consider using pint/pfloat/plong/pdouble instead of Trie* fields if possible
-->
<fieldType name="tint" class="solr.TrieIntField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tfloat" class="solr.TrieFloatField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
@ -284,15 +311,15 @@
the current day
Consult the TrieDateField javadocs for more information.
Note: For faster range queries, consider the tdate type
-->
<!-- KD-tree versions of date fields -->
<fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
<fieldType name="pdates" class="solr.DatePointField" docValues="true" multiValued="true"/>
<fieldType name="date" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="dates" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0" multiValued="true"/>
<!-- A Trie based date field for faster date range queries and date faceting. -->
<fieldType name="tdate" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0"/>
<fieldType name="tdates" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0" multiValued="true"/>

View File

@ -71,14 +71,14 @@
indexed: true if this field should be indexed (searchable or sortable)
stored: true if this field should be retrievable
docValues: true if this field should have doc values. Doc values are
useful for faceting, grouping, sorting and function queries. Although not
required, doc values will make the index faster to load, more
NRT-friendly and more memory-efficient. They however come with some
limitations: they are currently only supported by StrField, UUIDField
and all Trie*Fields, and depending on the field type, they might
require the field to be single-valued, be required or have a default
value (check the documentation of the field type you're interested in
for more information)
useful (required, if you are using *Point fields) for faceting,
grouping, sorting and function queries. Doc values will make the index
faster to load, more NRT-friendly and more memory-efficient.
They however come with some limitations: they are currently only
supported by StrField, UUIDField, all Trie*Fields and *PointFields,
and depending on the field type, they might require the field to be
single-valued, be required or have a default value (check the
documentation of the field type you're interested in for more information)
multiValued: true if this field may contain multiple values per document
omitNorms: (expert) set to true to omit the norms associated with
this field (this disables length normalization and index-time
@ -153,7 +153,19 @@
<dynamicField name="*_p" type="location" indexed="true" stored="true"/>
<dynamicField name="*_srpt" type="location_rpt" indexed="true" stored="true"/>
<!-- some trie-coded dynamic fields for faster range queries -->
<!-- KD-tree (point) numerics -->
<dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
<dynamicField name="*_pis" type="pints" indexed="true" stored="true"/>
<dynamicField name="*_pl" type="plong" indexed="true" stored="true"/>
<dynamicField name="*_pls" type="plongs" indexed="true" stored="true"/>
<dynamicField name="*_pf" type="pfloat" indexed="true" stored="true"/>
<dynamicField name="*_pfs" type="pfloats" indexed="true" stored="true"/>
<dynamicField name="*_pd" type="pdouble" indexed="true" stored="true"/>
<dynamicField name="*_pds" type="pdoubles" indexed="true" stored="true"/>
<dynamicField name="*_pdt" type="pdate" indexed="true" stored="true"/>
<dynamicField name="*_pdts" type="pdates" indexed="true" stored="true"/>
<!-- some trie-coded dynamic fields -->
<dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
<dynamicField name="*_tis" type="tints" indexed="true" stored="true"/>
<dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
@ -216,8 +228,8 @@
<!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
currently supported on types that are sorted internally as strings
and on numeric types.
This includes "string","boolean", and, as of 3.5 (and 4.x),
int, float, long, date, double, including the "Trie" variants.
This includes "string","boolean", "int", "float", "long", "date", "double",
including the "Trie" and "Point" variants.
- If sortMissingLast="true", then a sort on this field will cause documents
without the field to come after documents with the field,
regardless of the requested sort order (asc or desc).
@ -230,10 +242,23 @@
-->
<!--
Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
Numeric field types that index values using KD-trees. *Point fields are faster and more efficient than Trie* fields both, at
search time and at index time, but some features are still not supported.
Point fields don't support FieldCache, so they must have docValues="true" if needed for sorting, faceting, functions, etc.
-->
<fieldType name="pint" class="solr.IntPointField" docValues="true"/>
<fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
These fields support doc values, but they require the field to be
single-valued and either be required or have a default value.
<fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
<fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
<fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
<fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
<!--
Default numeric field types. For faster range queries, consider *PointFields (pint/pfloat/plong/pdouble), or the
tint/tfloat/tlong/tdouble types.
-->
<fieldType name="int" class="solr.TrieIntField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
@ -254,6 +279,8 @@
Smaller precisionStep values (specified in bits) will lead to more tokens
indexed per value, slightly larger index size, and faster range queries.
A precisionStep of 0 disables indexing at different precision levels.
Consider using pint/pfloat/plong/pdouble instead of Trie* fields if possible
-->
<fieldType name="tint" class="solr.TrieIntField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tfloat" class="solr.TrieFloatField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
@ -284,15 +311,14 @@
the current day
Consult the TrieDateField javadocs for more information.
Note: For faster range queries, consider the tdate type
-->
<!-- KD-tree versions of date fields -->
<fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
<fieldType name="pdates" class="solr.DatePointField" docValues="true" multiValued="true"/>
<fieldType name="date" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="dates" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0" multiValued="true"/>
<!-- A Trie based date field for faster date range queries and date faceting. -->
<fieldType name="tdate" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0"/>
<fieldType name="tdates" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0" multiValued="true"/>

View File

@ -72,14 +72,14 @@
indexed: true if this field should be indexed (searchable or sortable)
stored: true if this field should be retrievable
docValues: true if this field should have doc values. Doc values are
useful for faceting, grouping, sorting and function queries. Although not
required, doc values will make the index faster to load, more
NRT-friendly and more memory-efficient. They however come with some
limitations: they are currently only supported by StrField, UUIDField
and all Trie*Fields, and depending on the field type, they might
require the field to be single-valued, be required or have a default
value (check the documentation of the field type you're interested in
for more information)
useful (required, if you are using *Point fields) for faceting,
grouping, sorting and function queries. Doc values will make the index
faster to load, more NRT-friendly and more memory-efficient.
They however come with some limitations: they are currently only
supported by StrField, UUIDField, all Trie*Fields and *PointFields,
and depending on the field type, they might require the field to be
single-valued, be required or have a default value (check the
documentation of the field type you're interested in for more information)
multiValued: true if this field may contain multiple values per document
omitNorms: (expert) set to true to omit the norms associated with
this field (this disables length normalization and index-time
@ -139,9 +139,9 @@
<field name="features" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="includes" type="text_general" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />
<field name="weight" type="float" indexed="true" stored="true"/>
<field name="price" type="float" indexed="true" stored="true"/>
<field name="popularity" type="int" indexed="true" stored="true" />
<field name="weight" type="pfloat" indexed="true" stored="true"/>
<field name="price" type="pfloat" indexed="true" stored="true"/>
<field name="popularity" type="pint" indexed="true" stored="true" />
<field name="inStock" type="boolean" indexed="true" stored="true" />
<field name="store" type="location" indexed="true" stored="true"/>
@ -164,7 +164,7 @@
<field name="resourcename" type="text_general" indexed="true" stored="true"/>
<field name="url" type="text_general" indexed="true" stored="true"/>
<field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="last_modified" type="date" indexed="true" stored="true"/>
<field name="last_modified" type="pdate" indexed="true" stored="true"/>
<field name="links" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="_src_" type="string" indexed="false" stored="true"/>
@ -216,7 +216,19 @@
<dynamicField name="*_dts" type="date" indexed="true" stored="true" multiValued="true"/>
<dynamicField name="*_p" type="location" indexed="true" stored="true"/>
<!-- some trie-coded dynamic fields for faster range queries -->
<!-- KD-tree (point) numerics -->
<dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
<dynamicField name="*_pis" type="pints" indexed="true" stored="true"/>
<dynamicField name="*_pl" type="plong" indexed="true" stored="true"/>
<dynamicField name="*_pls" type="plongs" indexed="true" stored="true"/>
<dynamicField name="*_pf" type="pfloat" indexed="true" stored="true"/>
<dynamicField name="*_pfs" type="pfloats" indexed="true" stored="true"/>
<dynamicField name="*_pd" type="pdouble" indexed="true" stored="true"/>
<dynamicField name="*_pds" type="pdoubles" indexed="true" stored="true"/>
<dynamicField name="*_pdt" type="pdate" indexed="true" stored="true"/>
<dynamicField name="*_pdts" type="pdates" indexed="true" stored="true"/>
<!-- some trie-coded dynamic fields -->
<dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
<dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
<dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
@ -283,6 +295,18 @@
<copyField source="resourcename" dest="text"/>
<copyField source="url" dest="text"/>
<!-- Copy numeric fields to *PointFields implementation -->
<copyField source="*_i" dest="*_pi"/>
<copyField source="*_l" dest="*_pl"/>
<copyField source="*_f" dest="*_pf"/>
<copyField source="*_d" dest="*_pd"/>
<copyField source="*_dt" dest="*_pdt"/>
<copyField source="*_is" dest="*_pis"/>
<copyField source="*_ls" dest="*_pds"/>
<copyField source="*_fs" dest="*_pfs"/>
<copyField source="*_ds" dest="*_pds"/>
<copyField source="*_dts" dest="*_pdts"/>
<!-- Create a string version of author for faceting -->
<copyField source="author" dest="author_s"/>
@ -317,8 +341,8 @@
<!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
currently supported on types that are sorted internally as strings
and on numeric types.
This includes "string","boolean", and, as of 3.5 (and 4.x),
int, float, long, date, double, including the "Trie" variants.
This includes "string","boolean", "int", "float", "long", "date", "double",
including the "Trie" and "Point" variants.
- If sortMissingLast="true", then a sort on this field will cause documents
without the field to come after documents with the field,
regardless of the requested sort order (asc or desc).
@ -331,10 +355,23 @@
-->
<!--
Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
Numeric field types that index values using KD-trees. *Point fields are faster and more efficient than Trie* fields both, at
search time and at index time, but some features are still not supported.
Point fields don't support FieldCache, so they must have docValues="true" if needed for sorting, faceting, functions, etc.
-->
<fieldType name="pint" class="solr.IntPointField" docValues="true"/>
<fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
These fields support doc values, but they require the field to be
single-valued and either be required or have a default value.
<fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
<fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
<fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
<fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
<!--
Default numeric field types. For faster range queries, consider *PointFields (pint/pfloat/plong/pdouble), or the
tint/tfloat/tlong/tdouble types.
-->
<fieldType name="int" class="solr.TrieIntField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
@ -350,6 +387,8 @@
Smaller precisionStep values (specified in bits) will lead to more tokens
indexed per value, slightly larger index size, and faster range queries.
A precisionStep of 0 disables indexing at different precision levels.
Consider using pint/pfloat/plong/pdouble instead of Trie* fields if possible
-->
<fieldType name="tint" class="solr.TrieIntField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tfloat" class="solr.TrieFloatField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
@ -375,12 +414,14 @@
the current day
Consult the TrieDateField javadocs for more information.
Note: For faster range queries, consider the tdate type
-->
<fieldType name="date" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<!-- A Trie based date field for faster date range queries and date faceting. -->
<!-- KD-tree versions of date fields -->
<fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
<fieldType name="pdates" class="solr.DatePointField" docValues="true" multiValued="true"/>
<fieldType name="date" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="tdate" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0"/>