On Tue, Oct 21, 2008 at 06:57:03AM -0700, prerna07 wrote: > > Hi, > > On using Facet in solr query I am facing various issues. > > Scenario 1: > I have 11 Index with tag : <str name="Index_Type_s">productIndex</str> > > my search query is appended by facet parameters : > facet=true&facet.field=Index_Type_s&qt=dismaxrequest > > The facet node i am getting in solr result is : > > - <lst name="facet_fields"> > - <lst name="Index_Type_s"> > <int name="index">11</int> > <int name="product">11</int> > <int name="productindex">11</int> > </lst>
What does your schema look like? I am guessing you are using dynamic fields and have an analyzer on the type for fields that are '*_s' that uses WordDelimiterFilterFactory with generateWordParts="1". http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters Since facets use the indexed values not the stored values, the indexed value for "productIndex" would be 3 terms 'product', 'index' and 'productindex' > > According to my understanding I should get only one result, which should be > like the below mentioned node > <lst name="facet_fields"> > - <lst name="Index_Type_s"> > <int name="productindex">11</int> > </lst> > > Scenario 2: > > My index has following fields : > <str name="productDescription_s">In Search of the Shape of the Universe, > mathamatics</str> > > My search Query is : > facet=true&facet.field=productDescription_s&qt=dismaxrequest > > The result Solr is giving displaying : > > <lst name="facet_fields"> > - <lst name="productDescription_s"> > <int name="in">1</int> > <int name="search">1</int> > <int name="of">2</int> > <int name="shap">1</int> > <int name="mathamat">1</int> > </lst> > > I am not able to figure out the facet results. It does noyt contain any > result of Universe, It also removes characters from matahmatics and shape. > > Please help me understanding the issue and let me know if any change in > schema / solrConfig can solve the issue. I believe that both of these are a result of the Analyzer you are using on your '*_s' fields. > > Thanks, > Prerna enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner [EMAIL PROTECTED]