From f3fe7f9de03b7882a2442618a6fbc4fc89562ce1 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 31 Mar 2026 11:17:42 -0700 Subject: [PATCH 01/17] Use logical search targets for term and property indexes --- lib/ontologies_linked_data/models/class.rb | 2 +- .../models/properties/annotation_property.rb | 2 +- .../models/properties/datatype_property.rb | 2 +- lib/ontologies_linked_data/models/properties/object_property.rb | 2 +- .../models/properties/ontology_property.rb | 2 +- lib/ontologies_linked_data/models/provisional_class.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ontologies_linked_data/models/class.rb b/lib/ontologies_linked_data/models/class.rb index 754b6cc6..f1fdbbb6 100644 --- a/lib/ontologies_linked_data/models/class.rb +++ b/lib/ontologies_linked_data/models/class.rb @@ -174,7 +174,7 @@ def self.index_schema(schema_generator) schema_generator.add_dynamic_field('definition_*', 'text_general', indexed: true, stored: true, multi_valued: true) end - enable_indexing(:term_search_core1) do |schema_generator| + enable_indexing(:term_search_active, :main, target_collection: :term_search_core1) do |schema_generator| index_schema(schema_generator) end diff --git a/lib/ontologies_linked_data/models/properties/annotation_property.rb b/lib/ontologies_linked_data/models/properties/annotation_property.rb index 7e216717..c7696d30 100644 --- a/lib/ontologies_linked_data/models/properties/annotation_property.rb +++ b/lib/ontologies_linked_data/models/properties/annotation_property.rb @@ -36,7 +36,7 @@ class AnnotationProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:prop_search_core1, :property) do |schema_generator| + enable_indexing(:property_search_active, :property, target_collection: :prop_search_core1) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/datatype_property.rb b/lib/ontologies_linked_data/models/properties/datatype_property.rb index 34789dc1..862dc951 100644 --- a/lib/ontologies_linked_data/models/properties/datatype_property.rb +++ b/lib/ontologies_linked_data/models/properties/datatype_property.rb @@ -36,7 +36,7 @@ class DatatypeProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:prop_search_core1, :property) do |schema_generator| + enable_indexing(:property_search_active, :property, target_collection: :prop_search_core1) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/object_property.rb b/lib/ontologies_linked_data/models/properties/object_property.rb index 3b96216d..693da8ad 100644 --- a/lib/ontologies_linked_data/models/properties/object_property.rb +++ b/lib/ontologies_linked_data/models/properties/object_property.rb @@ -36,7 +36,7 @@ class ObjectProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:prop_search_core1, :property) do |schema_generator| + enable_indexing(:property_search_active, :property, target_collection: :prop_search_core1) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/ontology_property.rb b/lib/ontologies_linked_data/models/properties/ontology_property.rb index 7aaa4f54..ec9f5f73 100644 --- a/lib/ontologies_linked_data/models/properties/ontology_property.rb +++ b/lib/ontologies_linked_data/models/properties/ontology_property.rb @@ -26,7 +26,7 @@ def self.index_schema(schema_generator) end end - enable_indexing(:prop_search_core1, :property) do |schema_generator| + enable_indexing(:property_search_active, :property, target_collection: :prop_search_core1) do |schema_generator| index_schema(schema_generator) end diff --git a/lib/ontologies_linked_data/models/provisional_class.rb b/lib/ontologies_linked_data/models/provisional_class.rb index a40b936b..0aa835ce 100644 --- a/lib/ontologies_linked_data/models/provisional_class.rb +++ b/lib/ontologies_linked_data/models/provisional_class.rb @@ -40,7 +40,7 @@ class ProvisionalClass < LinkedData::Models::Base end }, Goo.vocabulary["Ontology"]) - enable_indexing(:term_search_core1) do |schema_generator| + enable_indexing(:term_search_active, :main, target_collection: :term_search_core1) do |schema_generator| Class.index_schema(schema_generator) end From e3d953e75b90313d2e01443d6eec711f5f8cb693 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 31 Mar 2026 12:31:26 -0700 Subject: [PATCH 02/17] Gemfile.lock update --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 3408d605..5907ec47 100644 --- a/Gemfile +++ b/Gemfile @@ -39,7 +39,7 @@ group :development do gem 'rubocop', require: false end # NCBO gems (can be from a local dev path or from rubygems/git) -gem 'goo', github: 'ncbo/goo', branch: 'main' +gem 'goo', github: 'ncbo/goo', branch: 'feature/solrcloud-alias-indexing-codex' gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'main' diff --git a/Gemfile.lock b/Gemfile.lock index 338f4207..76385b41 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,8 +8,8 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: 2411deb0143c773b9e6d89b3232c9cca0d50e2bd - branch: main + revision: fa850f46c94e09b6368ed47728b9cce05b7e9d54 + branch: feature/solrcloud-alias-indexing-codex specs: goo (0.0.2) addressable (~> 2.8) From 07e5a8c80391adbc761998feca486ef68b703f50 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 31 Mar 2026 12:31:55 -0700 Subject: [PATCH 03/17] Use alias-backed bootstrap collections for ontology search bindings --- lib/ontologies_linked_data/models/class.rb | 2 +- .../models/properties/annotation_property.rb | 2 +- .../models/properties/datatype_property.rb | 2 +- lib/ontologies_linked_data/models/properties/object_property.rb | 2 +- .../models/properties/ontology_property.rb | 2 +- lib/ontologies_linked_data/models/provisional_class.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ontologies_linked_data/models/class.rb b/lib/ontologies_linked_data/models/class.rb index f1fdbbb6..31bfabfa 100644 --- a/lib/ontologies_linked_data/models/class.rb +++ b/lib/ontologies_linked_data/models/class.rb @@ -174,7 +174,7 @@ def self.index_schema(schema_generator) schema_generator.add_dynamic_field('definition_*', 'text_general', indexed: true, stored: true, multi_valued: true) end - enable_indexing(:term_search_active, :main, target_collection: :term_search_core1) do |schema_generator| + enable_indexing(:term_search_active, :main, bootstrap_collection: :term_search_core1) do |schema_generator| index_schema(schema_generator) end diff --git a/lib/ontologies_linked_data/models/properties/annotation_property.rb b/lib/ontologies_linked_data/models/properties/annotation_property.rb index c7696d30..a1c64e1a 100644 --- a/lib/ontologies_linked_data/models/properties/annotation_property.rb +++ b/lib/ontologies_linked_data/models/properties/annotation_property.rb @@ -36,7 +36,7 @@ class AnnotationProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, :property, target_collection: :prop_search_core1) do |schema_generator| + enable_indexing(:property_search_active, :property, bootstrap_collection: :prop_search_core1) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/datatype_property.rb b/lib/ontologies_linked_data/models/properties/datatype_property.rb index 862dc951..a9530563 100644 --- a/lib/ontologies_linked_data/models/properties/datatype_property.rb +++ b/lib/ontologies_linked_data/models/properties/datatype_property.rb @@ -36,7 +36,7 @@ class DatatypeProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, :property, target_collection: :prop_search_core1) do |schema_generator| + enable_indexing(:property_search_active, :property, bootstrap_collection: :prop_search_core1) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/object_property.rb b/lib/ontologies_linked_data/models/properties/object_property.rb index 693da8ad..d6d6658f 100644 --- a/lib/ontologies_linked_data/models/properties/object_property.rb +++ b/lib/ontologies_linked_data/models/properties/object_property.rb @@ -36,7 +36,7 @@ class ObjectProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, :property, target_collection: :prop_search_core1) do |schema_generator| + enable_indexing(:property_search_active, :property, bootstrap_collection: :prop_search_core1) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/ontology_property.rb b/lib/ontologies_linked_data/models/properties/ontology_property.rb index ec9f5f73..c5c97484 100644 --- a/lib/ontologies_linked_data/models/properties/ontology_property.rb +++ b/lib/ontologies_linked_data/models/properties/ontology_property.rb @@ -26,7 +26,7 @@ def self.index_schema(schema_generator) end end - enable_indexing(:property_search_active, :property, target_collection: :prop_search_core1) do |schema_generator| + enable_indexing(:property_search_active, :property, bootstrap_collection: :prop_search_core1) do |schema_generator| index_schema(schema_generator) end diff --git a/lib/ontologies_linked_data/models/provisional_class.rb b/lib/ontologies_linked_data/models/provisional_class.rb index 0aa835ce..b2c2392e 100644 --- a/lib/ontologies_linked_data/models/provisional_class.rb +++ b/lib/ontologies_linked_data/models/provisional_class.rb @@ -40,7 +40,7 @@ class ProvisionalClass < LinkedData::Models::Base end }, Goo.vocabulary["Ontology"]) - enable_indexing(:term_search_active, :main, target_collection: :term_search_core1) do |schema_generator| + enable_indexing(:term_search_active, :main, bootstrap_collection: :term_search_core1) do |schema_generator| Class.index_schema(schema_generator) end From 8bd3f2746dc4c28350fc04397eb06a2b2dd45095 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Wed, 1 Apr 2026 13:35:22 -0700 Subject: [PATCH 04/17] made num_shard and replication_factor configurable for Solr; removed legacy core names, ie :term_search_core1 --- config/config.rb.sample | 4 +++ config/config.test.rb | 32 +++++++++++-------- lib/ontologies_linked_data/config/config.rb | 4 +++ lib/ontologies_linked_data/models/class.rb | 6 +++- .../models/properties/annotation_property.rb | 6 +++- .../models/properties/datatype_property.rb | 6 +++- .../models/properties/object_property.rb | 6 +++- .../models/properties/ontology_property.rb | 6 +++- .../models/provisional_class.rb | 6 +++- 9 files changed, 56 insertions(+), 20 deletions(-) diff --git a/config/config.rb.sample b/config/config.rb.sample index 75a6d71d..eb0251c7 100644 --- a/config/config.rb.sample +++ b/config/config.rb.sample @@ -3,6 +3,10 @@ LinkedData.config do |config| config.goo_host = "localhost" config.search_server_url = "http://localhost:8983/solr" config.property_search_server_url = "http://localhost:8983/solr" + config.term_search_num_shards = 1 + config.term_search_replication_factor = 1 + config.property_search_num_shards = 1 + config.property_search_replication_factor = 1 config.repository_folder = "./test/data/ontology_files/repo" config.rest_url_prefix = "http://localhost:9393/" config.enable_security = false diff --git a/config/config.test.rb b/config/config.test.rb index ad52fbc4..50115e1d 100644 --- a/config/config.test.rb +++ b/config/config.test.rb @@ -17,20 +17,24 @@ SOLR_PROP_SEARCH_URL = ENV.include?("SOLR_PROP_SEARCH_URL") ? ENV["SOLR_PROP_SEARCH_URL"] : 'http://localhost:8983/solr' LinkedData.config do |config| - config.goo_backend_name = GOO_BACKEND_NAME.to_s - config.goo_host = GOO_HOST.to_s - config.goo_port = GOO_PORT.to_i - config.goo_path_query = GOO_PATH_QUERY.to_s - config.goo_path_data = GOO_PATH_DATA.to_s - config.goo_path_update = GOO_PATH_UPDATE.to_s - config.goo_redis_host = REDIS_HOST.to_s - config.goo_redis_port = REDIS_PORT.to_i - config.http_redis_host = REDIS_HOST.to_s - config.http_redis_port = REDIS_PORT.to_i - config.ontology_analytics_redis_host = REDIS_HOST.to_s - config.ontology_analytics_redis_port = REDIS_PORT.to_i - config.search_server_url = SOLR_TERM_SEARCH_URL.to_s - config.property_search_server_url = SOLR_PROP_SEARCH_URL.to_s + config.goo_backend_name = GOO_BACKEND_NAME.to_s + config.goo_host = GOO_HOST.to_s + config.goo_port = GOO_PORT.to_i + config.goo_path_query = GOO_PATH_QUERY.to_s + config.goo_path_data = GOO_PATH_DATA.to_s + config.goo_path_update = GOO_PATH_UPDATE.to_s + config.goo_redis_host = REDIS_HOST.to_s + config.goo_redis_port = REDIS_PORT.to_i + config.http_redis_host = REDIS_HOST.to_s + config.http_redis_port = REDIS_PORT.to_i + config.ontology_analytics_redis_host = REDIS_HOST.to_s + config.ontology_analytics_redis_port = REDIS_PORT.to_i + config.search_server_url = SOLR_TERM_SEARCH_URL.to_s + config.property_search_server_url = SOLR_PROP_SEARCH_URL.to_s + config.term_search_num_shards = 1 + config.term_search_replication_factor = 1 + config.property_search_num_shards = 1 + config.property_search_replication_factor = 1 # config.enable_notifications = false config.oauth_providers = { diff --git a/lib/ontologies_linked_data/config/config.rb b/lib/ontologies_linked_data/config/config.rb index 67b6e43d..6e31ff81 100644 --- a/lib/ontologies_linked_data/config/config.rb +++ b/lib/ontologies_linked_data/config/config.rb @@ -25,6 +25,10 @@ def config(&block) @settings.goo_path_update ||= '/update/' @settings.search_server_url ||= 'http://localhost:8983/solr' @settings.property_search_server_url ||= 'http://localhost:8983/solr' + @settings.term_search_num_shards ||= 1 + @settings.term_search_replication_factor ||= 1 + @settings.property_search_num_shards ||= 1 + @settings.property_search_replication_factor ||= 1 @settings.repository_folder ||= './test/data/ontology_files/repo' @settings.rest_url_prefix ||= DEFAULT_PREFIX @settings.enable_security ||= false diff --git a/lib/ontologies_linked_data/models/class.rb b/lib/ontologies_linked_data/models/class.rb index 31bfabfa..d9ab8871 100644 --- a/lib/ontologies_linked_data/models/class.rb +++ b/lib/ontologies_linked_data/models/class.rb @@ -174,7 +174,11 @@ def self.index_schema(schema_generator) schema_generator.add_dynamic_field('definition_*', 'text_general', indexed: true, stored: true, multi_valued: true) end - enable_indexing(:term_search_active, :main, bootstrap_collection: :term_search_core1) do |schema_generator| + enable_indexing(:term_search_active, + :main, + bootstrap_collection: :term_search, + num_shards: LinkedData.settings.term_search_num_shards, + replication_factor: LinkedData.settings.term_search_replication_factor) do |schema_generator| index_schema(schema_generator) end diff --git a/lib/ontologies_linked_data/models/properties/annotation_property.rb b/lib/ontologies_linked_data/models/properties/annotation_property.rb index a1c64e1a..699d5ab9 100644 --- a/lib/ontologies_linked_data/models/properties/annotation_property.rb +++ b/lib/ontologies_linked_data/models/properties/annotation_property.rb @@ -36,7 +36,11 @@ class AnnotationProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, :property, bootstrap_collection: :prop_search_core1) do |schema_generator| + enable_indexing(:property_search_active, + :property, + bootstrap_collection: :property_search, + num_shards: LinkedData.settings.property_search_num_shards, + replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/datatype_property.rb b/lib/ontologies_linked_data/models/properties/datatype_property.rb index a9530563..51db6231 100644 --- a/lib/ontologies_linked_data/models/properties/datatype_property.rb +++ b/lib/ontologies_linked_data/models/properties/datatype_property.rb @@ -36,7 +36,11 @@ class DatatypeProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, :property, bootstrap_collection: :prop_search_core1) do |schema_generator| + enable_indexing(:property_search_active, + :property, + bootstrap_collection: :property_search, + num_shards: LinkedData.settings.property_search_num_shards, + replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/object_property.rb b/lib/ontologies_linked_data/models/properties/object_property.rb index d6d6658f..cf0df967 100644 --- a/lib/ontologies_linked_data/models/properties/object_property.rb +++ b/lib/ontologies_linked_data/models/properties/object_property.rb @@ -36,7 +36,11 @@ class ObjectProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, :property, bootstrap_collection: :prop_search_core1) do |schema_generator| + enable_indexing(:property_search_active, + :property, + bootstrap_collection: :property_search, + num_shards: LinkedData.settings.property_search_num_shards, + replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) end end diff --git a/lib/ontologies_linked_data/models/properties/ontology_property.rb b/lib/ontologies_linked_data/models/properties/ontology_property.rb index c5c97484..c87525da 100644 --- a/lib/ontologies_linked_data/models/properties/ontology_property.rb +++ b/lib/ontologies_linked_data/models/properties/ontology_property.rb @@ -26,7 +26,11 @@ def self.index_schema(schema_generator) end end - enable_indexing(:property_search_active, :property, bootstrap_collection: :prop_search_core1) do |schema_generator| + enable_indexing(:property_search_active, + :property, + bootstrap_collection: :property_search, + num_shards: LinkedData.settings.property_search_num_shards, + replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) end diff --git a/lib/ontologies_linked_data/models/provisional_class.rb b/lib/ontologies_linked_data/models/provisional_class.rb index b2c2392e..c3711c5e 100644 --- a/lib/ontologies_linked_data/models/provisional_class.rb +++ b/lib/ontologies_linked_data/models/provisional_class.rb @@ -40,7 +40,11 @@ class ProvisionalClass < LinkedData::Models::Base end }, Goo.vocabulary["Ontology"]) - enable_indexing(:term_search_active, :main, bootstrap_collection: :term_search_core1) do |schema_generator| + enable_indexing(:term_search_active, + :main, + bootstrap_collection: :term_search, + num_shards: LinkedData.settings.term_search_num_shards, + replication_factor: LinkedData.settings.term_search_replication_factor) do |schema_generator| Class.index_schema(schema_generator) end From da61d89b4dea1c7f43dcbe4a63acfa59ab2d3255 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Wed, 1 Apr 2026 15:17:45 -0700 Subject: [PATCH 05/17] updated branch target in Gemfile --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 5907ec47..4bf6416e 100644 --- a/Gemfile +++ b/Gemfile @@ -40,7 +40,7 @@ group :development do end # NCBO gems (can be from a local dev path or from rubygems/git) gem 'goo', github: 'ncbo/goo', branch: 'feature/solrcloud-alias-indexing-codex' -gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'main' +gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'development' gem 'public_suffix', '~> 5.1.1' From 8d5090aeeb78d6cd2bf5133ff926d0c1bac44f94 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Wed, 1 Apr 2026 15:19:11 -0700 Subject: [PATCH 06/17] Gemfile.lock update --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 76385b41..cc2d1959 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: fa850f46c94e09b6368ed47728b9cce05b7e9d54 + revision: 604b7094404864b0e7c2dbcc0744545e0783300b branch: feature/solrcloud-alias-indexing-codex specs: goo (0.0.2) @@ -26,8 +26,8 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git - revision: fa69937120104bafb3d3b8350e4f2df2efb7c247 - branch: main + revision: 2ac20b217bb7ad2b11305befe0ee77d75e44eac5 + branch: development specs: sparql-client (3.2.2) net-http-persistent (~> 4.0, >= 4.0.2) From cdbf8f6990f10181f3efa11afada051a8283978e Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 28 Apr 2026 14:44:53 -0700 Subject: [PATCH 07/17] Gemfile & Gemfile.lock update --- Gemfile | 4 ++-- Gemfile.lock | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 3408d605..88d62baf 100644 --- a/Gemfile +++ b/Gemfile @@ -39,8 +39,8 @@ group :development do gem 'rubocop', require: false end # NCBO gems (can be from a local dev path or from rubygems/git) -gem 'goo', github: 'ncbo/goo', branch: 'main' -gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'main' +gem 'goo', github: 'ncbo/goo', branch: 'development' +gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'development' gem 'public_suffix', '~> 5.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index a59ba028..50355fae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,7 +27,7 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git revision: 2ac20b217bb7ad2b11305befe0ee77d75e44eac5 - branch: main + branch: development specs: sparql-client (3.2.2) net-http-persistent (~> 4.0, >= 4.0.2) From 6c8a8b5daec1077da06136b334b6db4b0425be89 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Thu, 14 May 2026 14:03:02 -0700 Subject: [PATCH 08/17] Use final Solr alias and bootstrap collection names Update term and property search indexing bindings to use stable SolrCloud aliases named term_search and property_search, with separate physical bootstrap collections named term_search_bootstrap and property_search_bootstrap. Keep the existing configurable shard and replication settings, and update the Solr test docker-compose collection names to match the new bootstrap collection convention. --- lib/ontologies_linked_data/models/class.rb | 4 ++-- .../models/properties/annotation_property.rb | 4 ++-- .../models/properties/datatype_property.rb | 4 ++-- .../models/properties/object_property.rb | 4 ++-- .../models/properties/ontology_property.rb | 4 ++-- lib/ontologies_linked_data/models/provisional_class.rb | 4 ++-- test/solr/docker-compose.yml | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/ontologies_linked_data/models/class.rb b/lib/ontologies_linked_data/models/class.rb index d9ab8871..e1926914 100644 --- a/lib/ontologies_linked_data/models/class.rb +++ b/lib/ontologies_linked_data/models/class.rb @@ -174,9 +174,9 @@ def self.index_schema(schema_generator) schema_generator.add_dynamic_field('definition_*', 'text_general', indexed: true, stored: true, multi_valued: true) end - enable_indexing(:term_search_active, + enable_indexing(:term_search, :main, - bootstrap_collection: :term_search, + bootstrap_collection: :term_search_bootstrap, num_shards: LinkedData.settings.term_search_num_shards, replication_factor: LinkedData.settings.term_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/properties/annotation_property.rb b/lib/ontologies_linked_data/models/properties/annotation_property.rb index 699d5ab9..22c4cf89 100644 --- a/lib/ontologies_linked_data/models/properties/annotation_property.rb +++ b/lib/ontologies_linked_data/models/properties/annotation_property.rb @@ -36,9 +36,9 @@ class AnnotationProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, + enable_indexing(:property_search, :property, - bootstrap_collection: :property_search, + bootstrap_collection: :property_search_bootstrap, num_shards: LinkedData.settings.property_search_num_shards, replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/properties/datatype_property.rb b/lib/ontologies_linked_data/models/properties/datatype_property.rb index 51db6231..c4944a4d 100644 --- a/lib/ontologies_linked_data/models/properties/datatype_property.rb +++ b/lib/ontologies_linked_data/models/properties/datatype_property.rb @@ -36,9 +36,9 @@ class DatatypeProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, + enable_indexing(:property_search, :property, - bootstrap_collection: :property_search, + bootstrap_collection: :property_search_bootstrap, num_shards: LinkedData.settings.property_search_num_shards, replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/properties/object_property.rb b/lib/ontologies_linked_data/models/properties/object_property.rb index cf0df967..559acc69 100644 --- a/lib/ontologies_linked_data/models/properties/object_property.rb +++ b/lib/ontologies_linked_data/models/properties/object_property.rb @@ -36,9 +36,9 @@ class ObjectProperty < LinkedData::Models::OntologyProperty LinkedData::Hypermedia::Link.new("descendants", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/descendants"}, self.uri_type), LinkedData::Hypermedia::Link.new("tree", lambda {|m| "#{self.ontology_link(m)}/properties/#{CGI.escape(m.id.to_s)}/tree"}, self.uri_type) - enable_indexing(:property_search_active, + enable_indexing(:property_search, :property, - bootstrap_collection: :property_search, + bootstrap_collection: :property_search_bootstrap, num_shards: LinkedData.settings.property_search_num_shards, replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/properties/ontology_property.rb b/lib/ontologies_linked_data/models/properties/ontology_property.rb index c87525da..9b5eb81a 100644 --- a/lib/ontologies_linked_data/models/properties/ontology_property.rb +++ b/lib/ontologies_linked_data/models/properties/ontology_property.rb @@ -26,9 +26,9 @@ def self.index_schema(schema_generator) end end - enable_indexing(:property_search_active, + enable_indexing(:property_search, :property, - bootstrap_collection: :property_search, + bootstrap_collection: :property_search_bootstrap, num_shards: LinkedData.settings.property_search_num_shards, replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/provisional_class.rb b/lib/ontologies_linked_data/models/provisional_class.rb index c3711c5e..78cdbb35 100644 --- a/lib/ontologies_linked_data/models/provisional_class.rb +++ b/lib/ontologies_linked_data/models/provisional_class.rb @@ -40,9 +40,9 @@ class ProvisionalClass < LinkedData::Models::Base end }, Goo.vocabulary["Ontology"]) - enable_indexing(:term_search_active, + enable_indexing(:term_search, :main, - bootstrap_collection: :term_search, + bootstrap_collection: :term_search_bootstrap, num_shards: LinkedData.settings.term_search_num_shards, replication_factor: LinkedData.settings.term_search_replication_factor) do |schema_generator| Class.index_schema(schema_generator) diff --git a/test/solr/docker-compose.yml b/test/solr/docker-compose.yml index 3ddae69c..28e2a592 100644 --- a/test/solr/docker-compose.yml +++ b/test/solr/docker-compose.yml @@ -8,6 +8,6 @@ services: ports: - "8983:8983" command: > - bash -c "precreate-core term_search_core1 /configsets/term_search - && precreate-core prop_search_core1 /configsets/property_search + bash -c "precreate-core term_search_bootstrap /configsets/term_search + && precreate-core property_search_bootstrap /configsets/property_search && solr-foreground" From e3d27a8dc195605318b624babceb7785bc19cbde Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Thu, 14 May 2026 14:03:56 -0700 Subject: [PATCH 09/17] Gemfile.lock update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index cc2d1959..5a67832e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: 604b7094404864b0e7c2dbcc0744545e0783300b + revision: 13f5497873bb9c3b98102977091be63191892de0 branch: feature/solrcloud-alias-indexing-codex specs: goo (0.0.2) From 7663aca2905c7318ae1d611fd3468205dc8a79f3 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Mon, 18 May 2026 15:55:57 -0700 Subject: [PATCH 10/17] Stabilize OLD test suite for Solr alias changes Point the goo dependency at the latest alias/schema test fixes and read gzipped CSV test output as UTF-8 before parsing. --- Gemfile.lock | 2 +- test/util/test_ontology_csv_writer.rb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b074320e..502b44ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: 13f5497873bb9c3b98102977091be63191892de0 + revision: 2031edd530afa7e5b3ca3646766c66784b04ff07 branch: feature/solrcloud-alias-indexing-codex specs: goo (0.0.2) diff --git a/test/util/test_ontology_csv_writer.rb b/test/util/test_ontology_csv_writer.rb index b7714883..1af088ae 100644 --- a/test/util/test_ontology_csv_writer.rb +++ b/test/util/test_ontology_csv_writer.rb @@ -57,8 +57,9 @@ def enclosed_in_square_brackets_with_quotes?(string) end def get_csv_string_from_path(csv_path) - gz = Zlib::GzipReader.open(csv_path) - gz.read + Zlib::GzipReader.open(csv_path) do |gz| + gz.read.force_encoding(Encoding::UTF_8) + end end def test_csv_writer_valid @@ -337,4 +338,4 @@ def test_for_non_array_values end end -end \ No newline at end of file +end From 6bc0969076e02ed416f87d3dadf1d6da0946fa78 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Mon, 18 May 2026 16:19:27 -0700 Subject: [PATCH 11/17] Reset Solr schemas before OLD test runs Force the OLD test suite to rebuild its managed Solr schemas at startup and point the goo dependency at the schema-reset fix. --- Gemfile.lock | 2 +- test/test_case.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 502b44ac..ca3edcba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: 2031edd530afa7e5b3ca3646766c66784b04ff07 + revision: 0ff716f45466ecef8cb298d742ca3e4810cbe066 branch: feature/solrcloud-alias-indexing-codex specs: goo (0.0.2) diff --git a/test/test_case.rb b/test/test_case.rb index a72400e5..a8e83a2b 100644 --- a/test/test_case.rb +++ b/test/test_case.rb @@ -52,6 +52,7 @@ module LinkedData module MinitestRunHooks def run(*args) LinkedData::TestCase.backend_4s_delete + Goo.init_search_connections(true) super ensure LinkedData::TestCase.backend_4s_delete From 7eac5fe1cfb76fce1cd3e581edd11f17a8c6773c Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 19 May 2026 13:35:18 -0700 Subject: [PATCH 12/17] Make search bootstrap collections configurable Allow deployments to attach Solr aliases to existing physical term/property search collections during migration, while keeping the default bootstrap collection names for new installs. --- Gemfile.lock | 2 +- lib/ontologies_linked_data/config/config.rb | 2 ++ lib/ontologies_linked_data/models/class.rb | 2 +- .../models/properties/annotation_property.rb | 2 +- .../models/properties/datatype_property.rb | 2 +- lib/ontologies_linked_data/models/properties/object_property.rb | 2 +- .../models/properties/ontology_property.rb | 2 +- lib/ontologies_linked_data/models/provisional_class.rb | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ca3edcba..03be92e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: 0ff716f45466ecef8cb298d742ca3e4810cbe066 + revision: 97d52e577c0886142be87fedc5a1c7c4e838fced branch: feature/solrcloud-alias-indexing-codex specs: goo (0.0.2) diff --git a/lib/ontologies_linked_data/config/config.rb b/lib/ontologies_linked_data/config/config.rb index 6e31ff81..b6e875c0 100644 --- a/lib/ontologies_linked_data/config/config.rb +++ b/lib/ontologies_linked_data/config/config.rb @@ -27,8 +27,10 @@ def config(&block) @settings.property_search_server_url ||= 'http://localhost:8983/solr' @settings.term_search_num_shards ||= 1 @settings.term_search_replication_factor ||= 1 + @settings.term_search_bootstrap_collection ||= :term_search_bootstrap @settings.property_search_num_shards ||= 1 @settings.property_search_replication_factor ||= 1 + @settings.property_search_bootstrap_collection ||= :property_search_bootstrap @settings.repository_folder ||= './test/data/ontology_files/repo' @settings.rest_url_prefix ||= DEFAULT_PREFIX @settings.enable_security ||= false diff --git a/lib/ontologies_linked_data/models/class.rb b/lib/ontologies_linked_data/models/class.rb index e1926914..65c2aa37 100644 --- a/lib/ontologies_linked_data/models/class.rb +++ b/lib/ontologies_linked_data/models/class.rb @@ -176,7 +176,7 @@ def self.index_schema(schema_generator) enable_indexing(:term_search, :main, - bootstrap_collection: :term_search_bootstrap, + bootstrap_collection: LinkedData.settings.term_search_bootstrap_collection, num_shards: LinkedData.settings.term_search_num_shards, replication_factor: LinkedData.settings.term_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/properties/annotation_property.rb b/lib/ontologies_linked_data/models/properties/annotation_property.rb index 22c4cf89..8e4a39d8 100644 --- a/lib/ontologies_linked_data/models/properties/annotation_property.rb +++ b/lib/ontologies_linked_data/models/properties/annotation_property.rb @@ -38,7 +38,7 @@ class AnnotationProperty < LinkedData::Models::OntologyProperty enable_indexing(:property_search, :property, - bootstrap_collection: :property_search_bootstrap, + bootstrap_collection: LinkedData.settings.property_search_bootstrap_collection, num_shards: LinkedData.settings.property_search_num_shards, replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/properties/datatype_property.rb b/lib/ontologies_linked_data/models/properties/datatype_property.rb index c4944a4d..325c0161 100644 --- a/lib/ontologies_linked_data/models/properties/datatype_property.rb +++ b/lib/ontologies_linked_data/models/properties/datatype_property.rb @@ -38,7 +38,7 @@ class DatatypeProperty < LinkedData::Models::OntologyProperty enable_indexing(:property_search, :property, - bootstrap_collection: :property_search_bootstrap, + bootstrap_collection: LinkedData.settings.property_search_bootstrap_collection, num_shards: LinkedData.settings.property_search_num_shards, replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/properties/object_property.rb b/lib/ontologies_linked_data/models/properties/object_property.rb index 559acc69..c2eeb4d0 100644 --- a/lib/ontologies_linked_data/models/properties/object_property.rb +++ b/lib/ontologies_linked_data/models/properties/object_property.rb @@ -38,7 +38,7 @@ class ObjectProperty < LinkedData::Models::OntologyProperty enable_indexing(:property_search, :property, - bootstrap_collection: :property_search_bootstrap, + bootstrap_collection: LinkedData.settings.property_search_bootstrap_collection, num_shards: LinkedData.settings.property_search_num_shards, replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/properties/ontology_property.rb b/lib/ontologies_linked_data/models/properties/ontology_property.rb index 9b5eb81a..7c23b712 100644 --- a/lib/ontologies_linked_data/models/properties/ontology_property.rb +++ b/lib/ontologies_linked_data/models/properties/ontology_property.rb @@ -28,7 +28,7 @@ def self.index_schema(schema_generator) enable_indexing(:property_search, :property, - bootstrap_collection: :property_search_bootstrap, + bootstrap_collection: LinkedData.settings.property_search_bootstrap_collection, num_shards: LinkedData.settings.property_search_num_shards, replication_factor: LinkedData.settings.property_search_replication_factor) do |schema_generator| index_schema(schema_generator) diff --git a/lib/ontologies_linked_data/models/provisional_class.rb b/lib/ontologies_linked_data/models/provisional_class.rb index 78cdbb35..c4b35fc2 100644 --- a/lib/ontologies_linked_data/models/provisional_class.rb +++ b/lib/ontologies_linked_data/models/provisional_class.rb @@ -42,7 +42,7 @@ class ProvisionalClass < LinkedData::Models::Base enable_indexing(:term_search, :main, - bootstrap_collection: :term_search_bootstrap, + bootstrap_collection: LinkedData.settings.term_search_bootstrap_collection, num_shards: LinkedData.settings.term_search_num_shards, replication_factor: LinkedData.settings.term_search_replication_factor) do |schema_generator| Class.index_schema(schema_generator) From 55c4603029aede943af7ada1806d76b621899dd4 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 19 May 2026 13:39:17 -0700 Subject: [PATCH 13/17] Apply configured Solr bootstrap targets after model registration Update the registered GOO search collection bootstrap targets after deployment settings are loaded, allowing existing physical Solr collections to be used for alias migration. --- Gemfile.lock | 2 +- lib/ontologies_linked_data/config/config.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 03be92e9..df74bbb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: 97d52e577c0886142be87fedc5a1c7c4e838fced + revision: ceb7598cca8e869b48611bb09b4fb28d21590ec9 branch: feature/solrcloud-alias-indexing-codex specs: goo (0.0.2) diff --git a/lib/ontologies_linked_data/config/config.rb b/lib/ontologies_linked_data/config/config.rb index b6e875c0..3f068693 100644 --- a/lib/ontologies_linked_data/config/config.rb +++ b/lib/ontologies_linked_data/config/config.rb @@ -101,6 +101,7 @@ def config(&block) # Override defaults yield @settings, overide_connect_goo if block_given? + configure_search_bootstrap_collections # Check to make sure url prefix has trailing slash @settings.rest_url_prefix = "#{@settings.rest_url_prefix}/" unless @settings.rest_url_prefix[-1].eql?('/') @@ -143,6 +144,11 @@ def connect_goo end end + def configure_search_bootstrap_collections + Goo.set_search_collection_bootstrap(:term_search, @settings.term_search_bootstrap_collection) + Goo.set_search_collection_bootstrap(:property_search, @settings.property_search_bootstrap_collection) + end + ## # Configure ontologies_linked_data namespaces # We do this at initial runtime because goo needs namespaces for its DSL From e152f6363587a579b2141484bf7d1053b1072642 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 19 May 2026 13:41:33 -0700 Subject: [PATCH 14/17] Allow config loading without Goo connection initialization Support read-only tools by allowing LinkedData configuration to skip Goo.configure and its search connection initialization via LINKEDDATA_SKIP_CONNECT_GOO. --- lib/ontologies_linked_data/config/config.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ontologies_linked_data/config/config.rb b/lib/ontologies_linked_data/config/config.rb index 3f068693..6a0fb444 100644 --- a/lib/ontologies_linked_data/config/config.rb +++ b/lib/ontologies_linked_data/config/config.rb @@ -35,6 +35,7 @@ def config(&block) @settings.rest_url_prefix ||= DEFAULT_PREFIX @settings.enable_security ||= false @settings.enable_slices ||= false + @settings.skip_connect_goo ||= ENV['LINKEDDATA_SKIP_CONNECT_GOO'] == 'true' # Java/JVM options @settings.java_max_heap_size ||= '10240M' @@ -112,7 +113,7 @@ def config(&block) puts "(LD) >> Using HTTP Redis instance at #{@settings.http_redis_host}:#{@settings.http_redis_port}" puts "(LD) >> Using Goo Redis instance at #{@settings.goo_redis_host}:#{@settings.goo_redis_port}" - connect_goo unless overide_connect_goo + connect_goo unless overide_connect_goo || @settings.skip_connect_goo end ## From 5d80bbbd505561f1889d1158da4d13f7f3d5c9da Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 19 May 2026 15:31:20 -0700 Subject: [PATCH 15/17] Refresh SolrCloud search topology config --- Gemfile.lock | 2 +- lib/ontologies_linked_data/config/config.rb | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index df74bbb7..02a78f45 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: ceb7598cca8e869b48611bb09b4fb28d21590ec9 + revision: 8816ce8f8f9b270b443495b2d6caf0e00730cbcb branch: feature/solrcloud-alias-indexing-codex specs: goo (0.0.2) diff --git a/lib/ontologies_linked_data/config/config.rb b/lib/ontologies_linked_data/config/config.rb index 6a0fb444..58a43faf 100644 --- a/lib/ontologies_linked_data/config/config.rb +++ b/lib/ontologies_linked_data/config/config.rb @@ -102,7 +102,7 @@ def config(&block) # Override defaults yield @settings, overide_connect_goo if block_given? - configure_search_bootstrap_collections + configure_search_collections # Check to make sure url prefix has trailing slash @settings.rest_url_prefix = "#{@settings.rest_url_prefix}/" unless @settings.rest_url_prefix[-1].eql?('/') @@ -145,9 +145,15 @@ def connect_goo end end - def configure_search_bootstrap_collections + def configure_search_collections Goo.set_search_collection_bootstrap(:term_search, @settings.term_search_bootstrap_collection) Goo.set_search_collection_bootstrap(:property_search, @settings.property_search_bootstrap_collection) + Goo.set_search_collection_topology(:term_search, + num_shards: @settings.term_search_num_shards, + replication_factor: @settings.term_search_replication_factor) + Goo.set_search_collection_topology(:property_search, + num_shards: @settings.property_search_num_shards, + replication_factor: @settings.property_search_replication_factor) end ## From bd01bf6002df9a9fd8070f0db4f3a833ac1b39ad Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Tue, 19 May 2026 16:13:21 -0700 Subject: [PATCH 16/17] Gemfile & Gemfile.lock update --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 4bf6416e..88d62baf 100644 --- a/Gemfile +++ b/Gemfile @@ -39,7 +39,7 @@ group :development do gem 'rubocop', require: false end # NCBO gems (can be from a local dev path or from rubygems/git) -gem 'goo', github: 'ncbo/goo', branch: 'feature/solrcloud-alias-indexing-codex' +gem 'goo', github: 'ncbo/goo', branch: 'development' gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'development' diff --git a/Gemfile.lock b/Gemfile.lock index 81f068ab..43d1c94d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,8 +8,8 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: 8816ce8f8f9b270b443495b2d6caf0e00730cbcb - branch: feature/solrcloud-alias-indexing-codex + revision: 0187c6c0ba3871fa8b67055c1a1adfdea38b2189 + branch: development specs: goo (0.0.2) addressable (~> 2.8) From d4492a5cf76d78e74b677cc3f05c97dcbd53ccb7 Mon Sep 17 00:00:00 2001 From: Michael Dorf Date: Fri, 22 May 2026 11:20:11 -0700 Subject: [PATCH 17/17] fixed a randomly failing unit test --- Gemfile.lock | 4 ++-- test/models/test_provisional_class.rb | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0d3f2f4d..4c2b3ae1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,8 +8,8 @@ GIT GIT remote: https://github.com/ncbo/goo.git - revision: ee72f43daa37f02362da1b747f037c442cfbf112 - branch: main + revision: 0187c6c0ba3871fa8b67055c1a1adfdea38b2189 + branch: development specs: goo (0.0.2) addressable (~> 2.8) diff --git a/test/models/test_provisional_class.rb b/test/models/test_provisional_class.rb index 72eea506..b8dd4a68 100644 --- a/test/models/test_provisional_class.rb +++ b/test/models/test_provisional_class.rb @@ -1,6 +1,8 @@ require_relative "./test_ontology_common" class TestProvisionalClass < LinkedData::TestOntologyCommon + TEST_ONTOLOGY_ACRONYM = "PROV-CLASS".freeze + TEST_ONTOLOGY_NAME = "#{TEST_ONTOLOGY_ACRONYM} Ontology".freeze def self.before_suite @@user = LinkedData::Models::User.new({username: "test_user_prov_class", @@ -8,7 +10,9 @@ def self.before_suite @@user.save ont_count, ont_names, ont_models = LinkedData::SampleData::Ontology.create_ontologies_and_submissions(ont_count: 1, - submission_count: 1) + submission_count: 1, + acronym: TEST_ONTOLOGY_ACRONYM, + acronym_suffix: "") @@ontology = ont_models.first @@ontology.bring(:name) @@ontology.bring(:acronym) @@ -275,8 +279,8 @@ def test_provisional_class_ontology pc = @@provisional_class pc.ontology = @@ontology assert pc.valid?, "#{pc.errors}" - assert_equal(true, pc.ontology.acronym == "TEST-ONT-0") - assert_equal(true, pc.ontology.name == "TEST-ONT-0 Ontology") + assert_equal(true, pc.ontology.acronym == TEST_ONTOLOGY_ACRONYM) + assert_equal(true, pc.ontology.name == TEST_ONTOLOGY_NAME) end def test_provisional_class_search_indexing