<< | Index | >>
/de/gcc/ajax_matches/index_name/oddb_package_name_with_size
In Rezept-Form reeds ean13 codes also.(like oddb_package_name_with_size_and_ean13
)
tried rebuild_index
in oddbapp.rb with /etc/index_definitions.yaml
ch.oddb> rebuild_indices 'atc_index' -> dropping: atc_index creating: atc_index filling: atc_index @atc_classes.values source.size: 7430 finished in 1.62489233965 min
created index_definition.
def name_with_size_and_ean13 [name_with_size, barcode].join(', ') end
--- !ruby/object:ODBA::IndexDefinition index_name: 'oddb_package_name_with_size_and_ean13' origin_klass: 'ODDB::Package' target_klass: 'ODDB::Package' resolve_search_term: 'name_with_size_and_ean13' resolve_target: '' resolve_origin: '' init_source: 'self.packages' fulltext: false
ch.oddb> rebuild_indices 'oddb_package_name_with_size_and_ean13' dropping: oddb_package_name_with_size_and_ean13 ERROR: table "oddb_package_name_with_size_and_ean13" does not exist creating: oddb_package_name_with_size_and_ean13 filling: oddb_package_name_with_size_and_ean13 self.packages source.size: 23768 finished in 10.894559743933334 min all Indices Created in total: 0.18157658948972225 h
odba/lib/odba/index.rb
def fill(targets) @proc_origin = nil rows = [] targets.flatten.each { |target| target_id = target.odba_id origins = proc_instance_origin.call(target) origins.each { |origin| search_terms(origin).each { |term| do_update_index( origin.odba_id, term, target_id) } } } end
/de/gcc/ajax_add_drug/state_id/51689280/ean13/7680586370044
Updated api response.
[ { "drug":"indamid sr, 28 tablette(n)", # => label "search_query":"7680584630058" # => name },{ "drug":"indamid sr, 30 tablette(n)", "search_query":"7680584630065" },{ ...
Stoped Random Updater in oddbapp.rb
moved text_info_news updater into import_daily
job.
RUN_UPDATER = false