Hello! I have a search setup and it works fine. I search a text field called "logtext" in a database table. My Java code is like this:
SolrQuery query - new SolrQuery(); query.setQuery(searchWord); query.setParam("df", "logtext"); Then I execute the search... and it works just great. But now I want to add a constraint to only search for the "searchWord" within a certain range of time -- given timestamps in the column called "posttime". So, I added the code in bold below: SolrQuery query - new SolrQuery(); query.setQuery(searchWord); *query.setFacet(true);* *query.addDateRangeFacet("posttime", new Date(System.currentTimeMillis() - 1000L * 86400L * 365L), new Date(System.currentTimeMillis()), "+1DAY"); /* from 1 year ago to present) */* query.setParam("df", "logtext"); But this gives me a complaint: *undefined field: "posttime"* so I clearly do not understand the arguments needed to addDateRangeFacet(). Can someone help me determine the proper code for doing what I want? Further, I am puzzled about the "gap" argument [last one in addDateRangeFacet()]. What does this do? I used +1DAY, but I really have no idea the purpose of this. I haven't found any documentation that explains this well. Mark