view · edit · sidebar · attach · print · history


<< | Index | >>


  • Create/Update instant search form for fachinfo chapters.


  • nothing yet


Create Fachinfo chapter instant search

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 Package index for active fachinfo

Create index with package that it has only active fachinfo.

in src/util/oddbapp.rb
  def active_packages_has_fachinfo
    @registrations.inject([]) { |pacs, (iksnr,reg)|
      pacs.concat({|pac| pac.has_fachinfo?})
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
source.size: 13124
finished in 0.14112660141666666 min
all Indices Created in total: 0.11972234270388889 h

view · edit · sidebar · attach · print · history
Page last modified on September 19, 2012, at 11:28 AM