You can add a ~3 to the query to allow the order to be reversed, but you will get extra hits. Maybe it is a ~4, i can never remember on phrases and reversals. I usually just try it.
Alternatively, you can create a custom query field for what you need from dates. For example, if you want to search by queries like "fourth tuesday", you need to have 'tuesday" in a query and better to have " 4 tuesday " as part of the field. Instead of a phrase query, you do +2017 +(04 03) +(01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31), which does all the days in march and apr. A more complicated nested query would do more complicated date ranges. I don't know if there is a way to get repeating date range queries, like the fourth tuesday for all months in a year. The date support is usually about querying a specified range at a time. tim On Fri, Aug 18, 2017 at 11:19 AM, Webster Homer <webster.ho...@sial.com> wrote: > What field types are you using for your dates? > Have a look at: > https://cwiki.apache.org/confluence/display/solr/Working+with+Dates > > On Thu, Aug 17, 2017 at 10:08 AM, Nawab Zada Asad Iqbal <khi...@gmail.com> > wrote: > > > Hi Krishna > > > > I haven't used date range queries myself. But if Solr only supports a > > particular date format, you can write a thin client for queries, which > will > > convert the date to solr's format and query solr. > > > > Nawab > > > > On Thu, Aug 17, 2017 at 7:36 AM, chiru s <chiru1...@gmail.com> wrote: > > > > > Hello guys > > > > > > I am working on Apache solr and I am stuck with a use case. > > > > > > > > > The input data will be in the documents like 2017/03/15 in 1st > document, > > > > > > 2017/04/15 in 2nd doc, > > > > > > 2017/05/15 in 3rd doc, > > > > > > 2017/06/15 in 4th doc so on > > > > > > But while fetching the data it should fetch like 03/15/2017 for the > first > > > doc and so on. > > > > > > My requirement is like this .. > > > > > > > > > The data is like above and when I do an fq with name:[2017/03/15 TO > > > 2017/05/15] it fetches me the 1st three documents.. but the need the > data > > > as 03/15/2017 instead of 2017/03/15. > > > > > > > > > I tried solr.pattetnReplaceCharFilterFactory but it doesn't seem > > working.. > > > > > > Can you please help on the above. > > > > > > > > > Thanks in advance > > > > > > > > > Krishna... > > > > > > > -- > > > This message and any attachment are confidential and may be privileged or > otherwise protected from disclosure. If you are not the intended recipient, > you must not copy this message or attachment or disclose the contents to > any other person. If you have received this transmission in error, please > notify the sender immediately and delete the message and any attachment > from your system. Merck KGaA, Darmstadt, Germany and any of its > subsidiaries do not accept liability for any omissions or errors in this > message which may arise as a result of E-Mail-transmission or for damages > resulting from any unauthorized changes of the content of this message and > any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its > subsidiaries do not guarantee that this message is free of viruses and does > not accept liability for any damages caused by any virus transmitted > therewith. > > Click http://www.emdgroup.com/disclaimer to access the German, French, > Spanish and Portuguese versions of this disclaimer. >