Re: Solr partial date range search

2016-01-28 Thread vsriram30
Hi Jeyaprakash, Thanks for your suggestions. Are you referring to Dataimporthandler properties, to configure this in data-config.xml? Since I am currently referring to partial date search in my online queries, I am not sure whether this will help achieve that. Can you please explain bit more? Tha

Re: Solr partial date range search

2016-01-28 Thread vsriram30
Hi Benedetti Alessandro, Thanks for your comments. In our application, Solr search is used in multiple places. With respect to using a middle layer, our online requests go through the search API (Middle layer) which is built on top of solr, whereas the editorial tool, along with few other custom t

Re: Solr partial date range search

2016-01-28 Thread Alessandro Benedetti
I agree with Erick, converting dates into String is really a bad idea. This "custom component" makes me curious, I assume you have : Front End - Search-api -Solr or something similar. If you want the front end to send the partial date, then the search-api can handle the conversion. If you want the

Re: Solr partial date range search

2016-01-27 Thread Jeyaprakash Singarayar
Hi Sriram, Add the tag 'propertyWriter' directly under the 'dataConfig' tag. The property "last_index_time" is converted to text and stored in the properties file and is available for the next import as the variable '${dih.last_index_time}' . This tag gives control over how this properties file is

Re: Solr partial date range search

2016-01-27 Thread Jeyaprakash Singarayar
Hi Sriram, Add the tag 'propertyWriter' directly under the 'dataConfig' tag. The property "last_index_time" is converted to text and stored in the properties file and is available for the next import as the variable '${dih.last_index_time}' . This tag gives control over how this properties file is

Re: Solr partial date range search

2016-01-27 Thread vsriram30
I am actually using one such component to take in the partial dates like 2015-10 and create full UTC dates out of it and query using that. But since I was checking on that wiki about partial date search and since I couldn't find that it is available only from 5.x, I was curious to know if by some w

Re: Solr partial date range search

2016-01-26 Thread Erick Erickson
Still, I have to ask why bother? Presumably you have some kind of front-end that takes the dates. Simply have that form the proper full date specification. Or create a query component that intercepts the query on the Solr side and massages it enough to form the full date. Or Using strings and

Re: Solr partial date range search

2016-01-26 Thread vsriram30
Yes Eric. I am using that full date form based date range query till now and we have a requirement change to search based on partial date ranges. Hence was looking at these options. Kind Regards, -Sriram -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-partial-date-rang

Re: Solr partial date range search

2016-01-26 Thread Erick Erickson
You do not have to upgrade or use strings to support this use-case, just specify the full date format. i.e. instead of this: 2016-01-10 TO 2016-01-21 use this: 2016-01-10T00:00:00Z TO 2016-01-21T00:00:00Z Your performance will be much worse with string types and regexes than either tdate or dat

Re: Solr partial date range search

2016-01-26 Thread vsriram30
Probably, I should not have mentioned, it cannot be achieved, as still we can achieve that by using multiple OR queries with regex matching on that String field, though it doesn't look good :-) -Sriram -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-partial-date-range-

Re: Solr partial date range search

2016-01-26 Thread vsriram30
Thanks Shawn for providing more info. The looks like for supporting partial date range search, I would need to rely on String regex search like fieldName:2016-01* Though this can support part of the functionality, but if I would like to search between start and end date, this might not come good,

Re: Solr partial date range search

2016-01-25 Thread Shawn Heisey
On 1/25/2016 5:59 PM, vsriram30 wrote: > I am using solr 4.6.1. I have a date field (TrieDateField) in my schema and > I am trying to perform partial date range search as given in > https://cwiki.apache.org/confluence/display/solr/Working+with+Dates > Query = date_field:[2016-01-11 TO NOW] > But I