3
Answers
Vote up!
0
Vote down!

Commerce Search API returning (almost) no results

I have a site with 50,000+ products (one display node per product created, as well). I've set up commerce search with solr as a backend and fully indexed the data. If I query directly to solr for a common term (such as "wheel"), I correctly get thousands of hits. However, if I go through Drupal and commerce search (through a search page I've set up), I get at most a handful of results.

Obviously drupal is adding in a bunch of extra filters (or something) to the query so that solr isn't returning to it the "right" (ie, "expected") result set.

Any suggestions of my next step in troubleshooting? Or, even better, does anyone have an idea of what's going on?

Thanks.

-Jonathan

Asked by: jipis
on October 6, 2013

3 Answers

Vote up!
1
Vote down!

When the Drupal Commerce submits a query it passes these arguments:
It seems the 'fq' and 'qf' params are throwing off the query, with them included it returns two records, without them it correctly returns 9,800 records.

fl=item_id%2Cscore
&qf=tm_field_product%3Asku%5E1.0
&qf=tm_field_product%3Atitle%5E1.0
&qf=tm_field_product%3Afield_mth_product_item_name%5E1.0
&qf=tm_field_product%3Afield_mth_product_model_number%5E1.0
&qf=tm_field_product%3Afield_mth_product_sound%5E1.0
&qf=tm_field_product%3Afield_mth_product_upgrade_sound%5E1.0
&qf=tm_field_product%3Afield_mth_product_ps2_sernum%5E1.0
&qf=tm_field_product%3Afield_product_mp3_file%5E1.0
&qf=tm_field_product%3Afield_mth_exploded_view%5E1.0
&qf=tm_field_product%3Afield_mth_prod_manual%5E1.0
&qf=tm_field_product%3Afield_mth_product_copy%3Avalue%5E1.0
&qf=tm_field_product%3Afield_mth_product_features%3Avalue%5E1.0
&qf=tm_field_product%3Afield_mth_product_description%3Avalue%5E1.0
&fq=index_id%3Aproduct_display
&start=0
&rows=10
&facet=true
&facet.sort=count
&facet.limit=10
&facet.mincount=1
&facet.missing=false
&facet.field=sm_field_product%3Afield_mth_product_line
&facet.field=sm_field_product%3Afield_mth_product_type
&facet.field=fm_field_product%3Acommerce_price%3Aamount_decimal
&facet.field=im_field_product%3Afield_road_name_ref
&facet.field=im_field_product%3Afield_catalog_ref
&facet.field=is_field_mth_wr_warr_dealer_name
&facet.field=sm_field_product%3Atype
&f.sm_field_product%3Afield_mth_product_line.facet.limit=50
&f.sm_field_product%3Afield_mth_product_type.facet.limit=50
&f.fm_field_product%3Acommerce_price%3Aamount_decimal.facet.limit=50
&f.im_field_product%3Afield_road_name_ref.facet.limit=50
&f.im_field_product%3Afield_catalog_ref.facet.limit=50
&f.is_field_mth_wr_warr_dealer_name.facet.limit=50
&f.sm_field_product%3Atype.facet.limit=50
&wt=json
&json.nl=map
&q=%22gauge%22

This will help track down the problem.

Answer by: Weavingmedia
Posted: Oct 8, 2013

Comments

Note: This is not an answer. This is further clarification of the issue.

- jipis on October 18, 2013
Vote up!
0
Vote down!

When the Drupal Commerce submits a query it passes these arguments:
It seems the 'fq' and 'qf' params are throwing off the query, with them included it returns two records, without them it correctly returns 9,800 records.

fl=item_id%2Cscore
&qf=tm_field_product%3Asku%5E1.0
&qf=tm_field_product%3Atitle%5E1.0
&qf=tm_field_product%3Afield_mth_product_item_name%5E1.0
&qf=tm_field_product%3Afield_mth_product_model_number%5E1.0
&qf=tm_field_product%3Afield_mth_product_sound%5E1.0
&qf=tm_field_product%3Afield_mth_product_upgrade_sound%5E1.0
&qf=tm_field_product%3Afield_mth_product_ps2_sernum%5E1.0
&qf=tm_field_product%3Afield_product_mp3_file%5E1.0
&qf=tm_field_product%3Afield_mth_exploded_view%5E1.0
&qf=tm_field_product%3Afield_mth_prod_manual%5E1.0
&qf=tm_field_product%3Afield_mth_product_copy%3Avalue%5E1.0
&qf=tm_field_product%3Afield_mth_product_features%3Avalue%5E1.0
&qf=tm_field_product%3Afield_mth_product_description%3Avalue%5E1.0
&fq=index_id%3Aproduct_display
&start=0
&rows=10
&facet=true
&facet.sort=count
&facet.limit=10
&facet.mincount=1
&facet.missing=false
&facet.field=sm_field_product%3Afield_mth_product_line
&facet.field=sm_field_product%3Afield_mth_product_type
&facet.field=fm_field_product%3Acommerce_price%3Aamount_decimal
&facet.field=im_field_product%3Afield_road_name_ref
&facet.field=im_field_product%3Afield_catalog_ref
&facet.field=is_field_mth_wr_warr_dealer_name
&facet.field=sm_field_product%3Atype
&f.sm_field_product%3Afield_mth_product_line.facet.limit=50
&f.sm_field_product%3Afield_mth_product_type.facet.limit=50
&f.fm_field_product%3Acommerce_price%3Aamount_decimal.facet.limit=50
&f.im_field_product%3Afield_road_name_ref.facet.limit=50
&f.im_field_product%3Afield_catalog_ref.facet.limit=50
&f.is_field_mth_wr_warr_dealer_name.facet.limit=50
&f.sm_field_product%3Atype.facet.limit=50
&wt=json
&json.nl=map
&q=%22gauge%22

This will help track down the problem.

Answer by: Weavingmedia
Posted: Oct 8, 2013