view · edit · sidebar · attach · print · history

20120828-update-rezept-instant-search

<< | Index | >>


Summary

  • Update instant search in prescrpition view

Commits

Index


Update ODBA Inedx

Current index in name_with_size_and_ean.

Add company_name into this index.

name_with_size_company_namp_and_ean

ch.oddb> rebuild_indices 'oddb_package_name_with_size_company_name_and_ean13'
->

dropping: oddb_package_name_with_size_company_name_and_ean13
creating: oddb_package_name_with_size_company_name_and_ean13
filling: oddb_package_name_with_size_company_name_and_ean13
self.packages
source.size: 23285
finished in 9.592856333066667 min
all Indices Created in total: 0.1598815150511111 h

drop old index

ch.oddb> ODBA.cache.drop_index('oddb_package_name_with_size_and_ean13')

check index

$ sudo psql -U USER_NAME DB_NAME -c 'select count(*) from oddb_package_name_with_size_company_name_and_ean13;'
 count 
-------
 23285
(1 row)

$ sudo psql -U USER_NAME DB_NAME -c "select * from oddb_package_name_with_size_company_name_and_ean13 where search_term like '%inderal%' limit 1;"
 origin_id |                         search_term                          | target_id 
-----------+--------------------------------------------------------------+-----------
    252925 | inderal, 10 ampulle(n)  1 ml, astrazeneca ag, 7680317050108 |    252925
(1 row)

drug name, size, company_name, ean13


Update Ajax API

Updated api for Ajax.

/de/gcc/ajax_matches/index_name/oddb_package_name_with_size_company_name_and_ean13/?search_query=ind

response

[
  {
    "search_query":"7680584630058",
    "drug":"indamid sr, 28 tablette(n), sparmed ag"
  },
  {
    "search_query":"7680584630065",
    "drug":"indamid sr, 30 tablette(n), sparmed ag"
  },
  ...
]
commit

Debug MiGel search

There are some unexpected Ojbects in migel multilingual.

 error in SBSM::Session#to_html: /dt/generika/migel_search/migel_code/050204001
@40000000503c85fe24eb2624 NoMethodError
@40000000503c85fe24eb2a0c undefined method `force_encoding' for SPORLASTIC Arthrofix Sprunggel 37-39 recht weiss:Migel::Util::Multilingual
@40000000503c85fe24eb2a0c /var/www/oddb.org/src/remote/migel/util/multilingual.rb:28:in `method_missing'
@40000000503c85fe24eb2df4 /var/www/oddb.org/src/view/migel/items.rb:114:in `article_name'

error in SBSM::Session#to_html: /de/gcc/search/zone/migel/search_query/binden
@40000000503c988518ce940c NoMethodError
@40000000503c988518ce940c undefined method `de' for "Breite 4 cm, L\u00E4nge 5 m":String
@40000000503c988518ce9bdc /var/www/oddb.org/src/view/additional_information.rb:351:in `block in notify'

@40000000503c633e2c404904 error in SBSM::Session#http_headers: /de/gcc/migel_alphabetical/range/m
@40000000503c633e2c4050d4 NoMethodError
@40000000503c633e2c4054bc undefined method `de' for "Conditions: voir 23.01.01.00.1.\nRemboursement: voir pos. 23.":String
@40000000503c633e2c4054bc /var/www/oddb.org/src/view/additional_information.rb:351:in `block in notify'
NoMethodError
undefined method `de' for "Conditions: voir 23.01.01.00.1.\nRemboursement: voir pos. 23.":String
commit
view · edit · sidebar · attach · print · history
Page last modified on August 29, 2012, at 07:11 AM