Re: SolrJ and Range Faceting

2011-06-20 Thread Jamie Johnson
Martin, I believe this does work. http://wiki.apache.org/solr/SolrQuerySyntax shows an example ( createdate:[1976-03-06T23:59:59.999Z TO 1976-03-06T23:59:59.999Z+1YEAR) and it worked on my dataset as well. So it looks like it should be as easy as appending the gap to the value. On Mon, Jun 13,

Re: SolrJ and Range Faceting

2011-06-13 Thread Martijn v Groningen
No, that doesn't work yet. I think we'll need to enhance the Solr query parser in order to support this. If that is supported we don't need to use the DataMathParser and this a more general solution also for other client libraries. Martijn On 12 June 2011 20:58, Jamie Johnson wrote: > Martjin,

Re: SolrJ and Range Faceting

2011-06-12 Thread Jamie Johnson
Martjin, I had not considered doing something like manufacturedate_dt:[2007-02-13T15:26:37Z TO 2007-02-13T15:26:37Z+1YEAR] does this work? If so that completely eliminates the need to use the date math parsers right? On Sun, Jun 12, 2011 at 9:10 AM, Martijn v Groningen < martijn.is.h...@gmail

Re: SolrJ and Range Faceting

2011-06-12 Thread Martijn v Groningen
Hi Jamie, Just letting you know that I've added a comment to SOLR-2523. I ran into a class dependency issue regarding MathDateParser. Martijn On 11 June 2011 16:04, Jamie Johnson wrote: > Awesome Martjin, let me know when you have it comitted and I'll check out > the latest version. Again than

Re: SolrJ and Range Faceting

2011-06-11 Thread Jamie Johnson
Awesome Martjin, let me know when you have it comitted and I'll check out the latest version. Again thanks! On Sat, Jun 11, 2011 at 8:15 AM, Martijn v Groningen < martijn.is.h...@gmail.com> wrote: > Hi James, > > Good idea! I'll add a getAsFilterQuery method to the patch. > > Martijn > > On 6 Ju

Re: SolrJ and Range Faceting

2011-06-11 Thread Martijn v Groningen
Hi James, Good idea! I'll add a getAsFilterQuery method to the patch. Martijn On 6 June 2011 19:32, Jamie Johnson wrote: > Small error, shouldn't be using this.start but should instead be using > Double.parseDouble(this.getValue()); > and > sdf.parse(count.getValue()); > respectfully. > > On M

Re: SolrJ and Range Faceting

2011-06-06 Thread Jamie Johnson
Small error, shouldn't be using this.start but should instead be using Double.parseDouble(this.getValue()); and sdf.parse(count.getValue()); respectfully. On Mon, Jun 6, 2011 at 1:16 PM, Jamie Johnson wrote: > Thanks Martijn. I pulled your patch and it looks like what I was looking > for. The

Re: SolrJ and Range Faceting

2011-06-06 Thread Jamie Johnson
Thanks Martijn. I pulled your patch and it looks like what I was looking for. The original FacetField class has a getAsFilterQuery method which returns the criteria to use as an fq parameter, I have logic which does this in my class which works, any chance of getting something like this added to

Re: SolrJ and Range Faceting

2011-06-03 Thread Martijn v Groningen
Hi Jamie, I don't know why range facets didn't make it into SolrJ. But I've recently opened an issue for this: https://issues.apache.org/jira/browse/SOLR-2523 I hope this will be committed soon. Check the patch out and see if you like it. Martijn On 2 June 2011 18:22, Jamie Johnson wrote: > C

SolrJ and Range Faceting

2011-06-02 Thread Jamie Johnson
Currently the range and date faceting in SolrJ acts a bit differently than I would expect. Specifically, range facets aren't parsed at all and date facets end up generating filterQueries which don't have the range, just the lower bound. Is there a reason why SolrJ doesn't support these? I have w