: I am using this query only but I am getting the same results. : : : facet=true&facet.field=productPrice_product_str_s&fq=productPrice_product_str_s:[1%20TO%20100] ... : It still is not showing up the other values. Do I need to make any entry in : schema or solrConfig xml files. Do I need to convert the string into numeric : values etc etc. ... : >> It is only returning results, which are having values started with 2, 3, : >> 4 : >> or some other integer instead of only 1. It is not returning records in : >> which value is >10 and <100.
your "fq" param is saying you only want docs matching values between 1 and 100, you seem to be using a string type, so it's not going to match anything starting with a character other then a "1" ... if it doens't match any docs with values like "23" then the facet counts for "23" are going to be 0 as well. reading between the lines, i think you missunderstood Shalin about 10 messages ago ... "fq" is for providing a *filter* query, it restricts the results of your entire query. facet.query is for faceting on an arbitrary query (which can be a range query) if you search for 'ipod' and you want to get back *all* the documents that match, but you also want to know how many of those have a price between $10 and $100 use a facet.query. if you search for 'ipod' and you want to get back *only* the documents that have a price between $10 and $100 use an fq. ...but either way: yes, convert to a numeric field type so that your ranges will actually work properly. -Hoss