Re: Solr Faceting doesn't return values.

2013-05-23 Thread Sandeep Mestry
*str name=msgorg.apache.solr.search.SyntaxError: Cannot parse '*mm_state_code:(**TX)*': Encountered : : at line 1, column 14. Was expecting one of:* This suggests to me that you kept the df parameter in the query hence it was forming mm_state_code:mm_state_code:(TX), can you try exactly they

Solr Faceting doesn't return values.

2013-05-22 Thread samabhiK
Hello, I have a field defined in my schema.xml like so: field name=sa_site_city type=string indexed=true stored=true/ string is a type : fieldType name=string class=solr.StrField sortMissingLast=true / When I run the query for faceting data by the city:

Re: Solr Faceting doesn't return values.

2013-05-22 Thread Erick Erickson
Probably you're not querying the field you think you are. Try adding debug=all to the URL and I think you'll see something like default_search_field:mm_state_code Which means you're searching for the literal phrase mm_state_code in your default search field (defined in solrconfig.xml for the

Re: Solr Faceting doesn't return values.

2013-05-22 Thread samabhiK
Ok after I added debug=all to the query, I get: { responseHeader:{ status:0, QTime:11, params:{ facet:true, indent:true, q:mm_state_code, debug:all, facet.field:sa_site_city, wt:json}}, response:{numFound:0,start:0,docs:[] }, facet_counts:{

Re: Solr Faceting doesn't return values.

2013-05-22 Thread samabhiK
Ok my bad. I do have a default field defined in the /select handler in the config file. lst name=defaults str name=echoParamsexplicit/str int name=rows10/int str name=dfsa_property_id/str /lst But then how do I change my query now? -- View this message in context:

Re: Solr Faceting doesn't return values.

2013-05-22 Thread Sandeep Mestry
Hi There, Not sure I understand your problem correctly, but is 'mm_state_code' a real value or is it field name? Also, as Erick pointed out above, the facets are not calculated if there are no results. Hence you get no facets. You have mentioned which facets you want but you haven't mentioned

Re: Solr Faceting doesn't return values.

2013-05-22 Thread samabhiK
Thanks for your reply. I have my request url modified like this: http://xx.xx.xx.xx/solr/collection1/select?q=TXdf=mm_state_codewt=xmlindent=truefacet=truefacet.field=sa_site_citydebug=all Facet Filed = sa_site_city ( city wise facet) Default Filed = mm_state_code Query= TX When I run this

Re: Solr Faceting doesn't return values.

2013-05-22 Thread Sandeep Mestry
From the response you've mentioned it appears to me that the query term TX is searched against sa_site_city instead of mm_state_code. Can you try your query like below: http://xx.xx.xx.xx/solr/collection1/select?q=*mm_state_code:(**TX)* wt=xmlindent=truefacet=truefacet.field=sa_site_citydebug=all

Re: Solr Faceting doesn't return values.

2013-05-22 Thread samabhiK
When I use your query, I get : ?xml version=1.0 encoding=UTF-8? response lst name=responseHeader int name=status400/int int name=QTime12/int lst name=params str name=facettrue/str str name=dfmm_state_code/str str name=indenttrue/str str name=q*mm_state_code:(**TX)*/str