vecnet / dl-discovery

Map based discovery interface for digital library records
Other
4 stars 3 forks source link

Add SearchBuilder to catalog_controller and filter to catch extra commas in points_list_s #59

Closed stevenvandervalk closed 9 years ago

stevenvandervalk commented 9 years ago

Has been tested against vagrant for the comma filter. Not entirely sure how searchBuilder changes things just yet but solr is still giving a 400 error on my vagrant when submitting a bbox param to limit the spatial results. So not sure about which "GEOMETRY_FIELD" is applicable etc.

 INSERT INTO "searches" ("created_at", "query_params", "updated_at") VALUES ($1, $2, $3) RETURNING "id"  [["created_at", "2015-05-20 06:18:34.054109"], ["query_params", "--- !ruby/hash:ActionController::Parameters\nq: africa\nshowmap: 'on'\nbbox: -116.71874999999999 -88.63495099695557 150.46875 88.27655136092483\n_: '1432102680148'\ncontroller: catalog\naction: index\n"], ["updated_at", "2015-05-20 06:18:34.054109"]]
D, [2015-05-20T06:18:34.057187 #1712] DEBUG -- :    (0.7ms)  COMMIT
E, [2015-05-20T06:18:34.065199 #1712] ERROR -- : RSolr::Error::Http - 400 Bad Request
Error: {
  'responseHeader'=>{
    'status'=>400,
    'QTime'=>3,
    'params'=>{
      'mm'=>'6<-1 6<90%',
      'facet'=>'true',
      'sort'=>'score desc, dc_title_sort asc',
      'facet.mincount'=>'1',
      'indent'=>'2',
      'tie'=>'0.01',

URI: http://localhost:8081/solr/discovery/select?wt=ruby&qt=search&facet.field=dc_type_s&facet.field=dc_creator_sm&facet.field=vn_keyword_sm&facet.field=dct_spatial_sm&facet.field=dc_publisher_s&facet.field=dc_format_s&fq=%3A%22Intersects%28-116.71874999999999+-88.63495099695557+150.46875+88.27655136092483%29%22&start=0&rows=10&q.alt=*%3A*&q=africa&facet=true&f.dc_type_s.facet.limit=11&f.dc_creator_sm.facet.limit=7&f.vn_keyword_sm.facet.limit=11&f.dct_spatial_sm.facet.limit=11&f.dc_publisher_s.facet.limit=7&f.dc_format_s.facet.limit=4&sort=score+desc%2C+dc_title_sort+asc&bq=%3A%22IsWithin%28-116.71874999999999+-88.63495099695557+150.46875+88.27655136092483%29%22%5E10