Re: Solr Faceting doesn't return values.

2013-05-23 Thread Sandeep Mestry
*org.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 way I gav

Re: Solr Faceting doesn't return values.

2013-05-22 Thread samabhiK
When I use your query, I get : 400 12 true mm_state_code true *mm_state_code:(**TX)* 1369244078714 all sa_site_city xml org.apache.solr.search.SyntaxError: Cannot parse '*mm_state_code:(**TX)*': Encountered " ":" ": "" at line 1, column 14. Was exp

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=xml&indent=true&facet=true&facet.field=sa_site_city&debu

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=TX&df=mm_state_code&wt=xml&indent=true&facet=true&facet.field=sa_site_city&debug=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
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 whi

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. explicit 10 sa_property_id But then how do I change my query now? -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-Faceting-doesn-t-return-values-tp4065276p

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,"st

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 h

Solr Faceting doesn't return values.

2013-05-22 Thread samabhiK
Hello, I have a field defined in my schema.xml like so: string is a type : When I run the query for faceting data by the city: http://XX.XX.XX.XX/solr/collection1/select?q=mm_state_code&wt=json&indent=true&facet=true&facet.field=sa_site_city I get empty result like so: { "responseHeade