<< | Index | >>
Tried oddb_package_name_with_size_company_name_and_ean13
index for xhr match request.
But some Package does not have active_fachinfo connection.
Create index with package that it has only active
fachinfo.
def active_packages_has_fachinfo @registrations.inject([]) { |pacs, (iksnr,reg)| pacs.concat(reg.active_packages.select{|pac| pac.has_fachinfo?}) } end
ch.oddb> active_packages.length -> 18063 ch.oddb> active_packages_has_fachinfo.length -> 13124
terrible name...
But index name has length limit also. I used same format as another index.
INDEX definition.
--- !ruby/object:ODBA::IndexDefinition index_name: 'oddb_package_name_with_size_company_name_ean13_fi' origin_klass: 'ODDB::Package' target_klass: 'ODDB::Package' resolve_search_term: 'name_with_size_company_name_and_ean13' resolve_target: '' resolve_origin: '' init_source: 'self.active_packages_has_fachinfo' fulltext: false
build index.
dropping: oddb_package_name_with_size_company_name_ean13_fi ERROR: table "oddb_package_name_with_size_company_name_ean13_fi" does not exist ERROR: table "oddb_package_name_with_size_company_name_ean13_fi" does not exist creating: oddb_package_name_with_size_company_name_ean13_fi filling: oddb_package_name_with_size_company_name_ean13_fi self.active_packages_has_fachinfo source.size: 13124 finished in 0.14112660141666666 min all Indices Created in total: 0.11972234270388889 h