Skip to content

Commit

Permalink
issue #1009 - fix partial updates of documents containing field of ty…
Browse files Browse the repository at this point in the history
…pe bbox
  • Loading branch information
rzeh4n committed Nov 23, 2023
1 parent 819bc53 commit 744cd8a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 39 deletions.
15 changes: 7 additions & 8 deletions installation/solr-7.x_8x/search/conf/managed-schema
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!-- box field -->
<fieldType name="bbox" class="solr.BBoxField" geo="true" numberType="_bbox_coord" storeSubFields="false" stored="true"/>
<fieldType name="_bbox_coord" class="solr.TrieDoubleField" precisionStep="8" docValues="true" stored="false"/>
<fieldType name="_bbox_coord" class="solr.TrieDoubleField" precisionStep="8" docValues="false" stored="false"/>

<!--
A Geohash is a compact representation of a latitude longitude pair in a single field.
Expand Down Expand Up @@ -509,8 +509,8 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<!--hlavni nazev-->
<field name="title.search" type="text_fgs" indexed="true" stored="true" multiValued="false" docValues="false"/>

<!-- localized collection titles -->
<dynamicField name="title.search_*" type="text_fgs" indexed="true" stored="true" multiValued="true" docValues="false"/>
<!-- localized collection titles -->
<dynamicField name="title.search_*" type="text_fgs" indexed="true" stored="true" multiValued="true" docValues="false"/>

<!--hlavni nazev (bez hodnoty nonSort)-->
<field name="title.sort" type="string" indexed="true" stored="true" multiValued="false" docValues="true"/>
Expand Down Expand Up @@ -636,7 +636,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!-- geo coordinates -->
<!-- bounding box -->
<field name="coords.bbox" type="bbox"/>
<field name="coords.bbox" type="bbox" multiValued="false"/>
<!-- center of the bounding box -->
<field name="coords.bbox.center" type="location_rpt" indexed="true" stored="true" multiValued="false"/>
<!--south west corner of the bounding box-->
Expand Down Expand Up @@ -666,8 +666,8 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<!--kratky popis sbirky-->
<field name="collection.desc" type="string" indexed="true" stored="true" multiValued="true"/>

<!-- localized collection desc -->
<dynamicField name="collection.desc_*" type="text_general_not_lemmatized" indexed="true" stored="true" multiValued="true" docValues="false"/>
<!-- localized collection desc -->
<dynamicField name="collection.desc_*" type="text_general_not_lemmatized" indexed="true" stored="true" multiValued="true" docValues="false"/>

<field name="collection.is_standalone" type="boolean" indexed="true" stored="true"/>

Expand All @@ -690,7 +690,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<!-- licences belonging to (own) ancestors-->
<field name="licenses_of_ancestors" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>

<!-- licenses facet field; contains data from licenenses, contains_licenses, licenses_of_ancestors -->
<!-- licenses facet field; contains data from licenenses, contains_licenses, licenses_of_ancestors -->
<field name="licenses.facet" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>
<copyField source="licenses_of_ancestors" dest="licenses.facet"/>
<copyField source="contains_licenses" dest="licenses.facet"/>
Expand All @@ -705,5 +705,4 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<uniqueKey>pid</uniqueKey>



</schema>
34 changes: 16 additions & 18 deletions installation/solr-9.x.cloud/search/managed-schema
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT


<!-- hunspell analyzer; czech language; not stopwords -->
<!--
<!--
<fieldType name="text_general_lemmatized_no_stopwords" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
Expand All @@ -71,10 +71,10 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
</analyzer>
</fieldType>
-->
-->

<!-- hunspell analyzer; czech language -->
<!--
<!--
<fieldType name="text_general_lemmatized" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
Expand Down Expand Up @@ -102,10 +102,10 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
</analyzer>
</fieldType>
-->
-->

<!-- hunspell analyzer; czech language only ascii -->
<!--
<!--
<fieldType name="text_general_lemmatized_ascii" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
Expand All @@ -130,7 +130,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
</analyzer>
</fieldType>
-->
-->
<!-- general not lemmatized text with czech stop words -->
<fieldType name="text_general_not_lemmatized" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
Expand Down Expand Up @@ -440,7 +440,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!-- box field -->
<fieldType name="bbox" class="solr.BBoxField" geo="true" numberType="_bbox_coord" storeSubFields="false" stored="true"/>
<fieldType name="_bbox_coord" class="solr.TrieDoubleField" precisionStep="8" docValues="true" stored="false"/>
<fieldType name="_bbox_coord" class="solr.TrieDoubleField" precisionStep="8" docValues="false" stored="false"/>

<!--
A Geohash is a compact representation of a latitude longitude pair in a single field.
Expand Down Expand Up @@ -474,7 +474,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<!--temporary field used for indexation processes, after (full) indexation is sucessfully finished, this field is cleared-->
<field name="full_indexation_in_progress" type="boolean" indexed="true" stored="true"/>

<field name="compositeId" type="string" indexed="true" stored="true" required="true" />
<field name="compositeId" type="string" indexed="true" stored="true" required="true"/>
<field name="pid" type="string" indexed="true" stored="true" required="true"/>
<field name="model" type="string" indexed="true" stored="true" multiValued="false" docValues="true"/>

Expand Down Expand Up @@ -509,8 +509,8 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!--hlavni nazev-->
<field name="title.search" type="text_fgs" indexed="true" stored="true" multiValued="false" docValues="false"/>
<!-- localized collection titles -->
<dynamicField name="title.search_*" type="text_fgs" indexed="true" stored="true" multiValued="true" docValues="false"/>
<!-- localized collection titles -->
<dynamicField name="title.search_*" type="text_fgs" indexed="true" stored="true" multiValued="true" docValues="false"/>

<!--hlavni nazev (bez hodnoty nonSort)-->
<field name="title.sort" type="string" indexed="true" stored="true" multiValued="false" docValues="true"/>
Expand Down Expand Up @@ -636,7 +636,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!-- geo coordinates -->
<!-- bounding box -->
<field name="coords.bbox" type="bbox"/>
<field name="coords.bbox" type="bbox" multiValued="false"/>
<!-- center of the bounding box -->
<field name="coords.bbox.center" type="location_rpt" indexed="true" stored="true" multiValued="false"/>
<!--south west corner of the bounding box-->
Expand Down Expand Up @@ -667,8 +667,8 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<field name="collection.desc" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="collection.is_standalone" type="boolean" indexed="true" stored="true"/>

<!-- localized collection desc -->
<dynamicField name="collection.desc_*" type="text_general_not_lemmatized" indexed="true" stored="true" multiValued="true" docValues="false"/>
<!-- localized collection desc -->
<dynamicField name="collection.desc_*" type="text_general_not_lemmatized" indexed="true" stored="true" multiValued="true" docValues="false"/>

<!--OTHER-->

Expand All @@ -688,14 +688,13 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<!-- licences belonging to (own) ancestors-->
<field name="licenses_of_ancestors" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>

<!-- licenses facet field; contains data from licenenses, contains_licenses, licenses_of_ancestors -->
<!-- licenses facet field; contains data from licenenses, contains_licenses, licenses_of_ancestors -->
<field name="licenses.facet" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>
<copyField source="licenses_of_ancestors" dest="licenses.facet"/>
<copyField source="contains_licenses" dest="licenses.facet"/>
<copyField source="licenses" dest="licenses.facet"/>



</fields>

<!-- Field to use to determine and enforce document uniqueness.
Expand All @@ -704,5 +703,4 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<uniqueKey>compositeId</uniqueKey>



</schema>
22 changes: 10 additions & 12 deletions installation/solr-9.x/search/conf/managed-schema
Original file line number Diff line number Diff line change
Expand Up @@ -439,16 +439,16 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!-- box field -->
<fieldType name="bbox" class="solr.BBoxField" geo="true" numberType="_bbox_coord" storeSubFields="false" stored="true"/>
<fieldType name="_bbox_coord" class="solr.TrieDoubleField" precisionStep="8" docValues="true" stored="false"/>
<fieldType name="_bbox_coord" class="solr.TrieDoubleField" precisionStep="8" docValues="false" stored="false"/>

<!--
A Geohash is a compact representation of a latitude longitude pair in a single field.
See http://wiki.apache.org/solr/SpatialSearch
-->
<!--
<!--
<fieldtype name="geohash" class="solr.GeoHashField"/>
-->
-->

</types>


Expand Down Expand Up @@ -512,8 +512,8 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<!--hlavni nazev-->
<field name="title.search" type="text_fgs" indexed="true" stored="true" multiValued="false" docValues="false"/>

<!-- localized collection titles -->
<dynamicField name="title.search_*" type="text_fgs" indexed="true" stored="true" multiValued="true" docValues="false"/>
<!-- localized collection titles -->
<dynamicField name="title.search_*" type="text_fgs" indexed="true" stored="true" multiValued="true" docValues="false"/>


<!--hlavni nazev (bez hodnoty nonSort)-->
Expand Down Expand Up @@ -640,7 +640,7 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!-- geo coordinates -->
<!-- bounding box -->
<field name="coords.bbox" type="bbox"/>
<field name="coords.bbox" type="bbox" multiValued="false"/>
<!-- center of the bounding box -->
<field name="coords.bbox.center" type="location_rpt" indexed="true" stored="true" multiValued="false"/>
<!--south west corner of the bounding box-->
Expand Down Expand Up @@ -669,8 +669,8 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!--kratky popis sbirky-->
<field name="collection.desc" type="string" indexed="true" stored="true" multiValued="true"/>
<!-- localized collection desc -->
<dynamicField name="collection.desc_*" type="text_general_not_lemmatized" indexed="true" stored="true" multiValued="true" docValues="false"/>
<!-- localized collection desc -->
<dynamicField name="collection.desc_*" type="text_general_not_lemmatized" indexed="true" stored="true" multiValued="true" docValues="false"/>

<field name="collection.is_standalone" type="boolean" indexed="true" stored="true"/>

Expand All @@ -682,7 +682,6 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT

<!-- text ocr -->
<field name="text_ocr" type="text_general_not_lemmatized" indexed="true" stored="true" storeOffsetsWithPositions="true"/>



<!-- licenses (formerly dnnt labels)-->
Expand All @@ -694,12 +693,11 @@ see https://docs.google.com/spreadsheets/d/1DoDnSIGPqPnYbb0U2RSNLKm9eAY2FQNimJyT
<!-- licences belonging to (own) ancestors-->
<field name="licenses_of_ancestors" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>

<!-- licenses facet field; contains data from licenenses, contains_licenses, licenses_of_ancestors -->
<!-- licenses facet field; contains data from licenenses, contains_licenses, licenses_of_ancestors -->
<field name="licenses.facet" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>
<copyField source="licenses_of_ancestors" dest="licenses.facet"/>
<copyField source="contains_licenses" dest="licenses.facet"/>
<copyField source="licenses" dest="licenses.facet"/>



</fields>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class Indexer {
private static final Logger LOGGER = Logger.getLogger(Indexer.class.getName());

public static final int INDEXER_VERSION = 18; //this should be updated after every change in logic, that affects full indexation
public static final int INDEXER_VERSION = 19; //this should be updated after every change in logic, that affects full indexation

private final SolrConfig solrConfig;
//only state variable
Expand Down

0 comments on commit 744cd8a

Please sign in to comment.