Re: Negative Date Query for Local Params in Solr

2016-09-20 Thread Sandeep Khanzode
Thanks, David! Perhaps browsing the Solr sources may be a necessity at some point in time. :) SRK On Wednesday, September 21, 2016 9:08 AM, David Smiley wrote: So that page referenced describes local-params, and describes the special "v" local-param.  But first, see a list of all query

Re: Negative Date Query for Local Params in Solr

2016-09-20 Thread David Smiley
So that page referenced describes local-params, and describes the special "v" local-param. But first, see a list of all query parsers (which lists "field"): https://cwiki.apache.org/confluence/display/solr/Other+Parsers and https://cwiki.apache.org/confluence/display/solr/The+Standard+Query+Parser

Re: Negative Date Query for Local Params in Solr

2016-09-20 Thread David Smiley
Personally I learned this by pouring over Solr's source code some time ago. I suppose the only official reference to this stuff is: https://cwiki.apache.org/confluence/display/solr/Local+Parameters+in+Queries But that page doesn't address the implications for when the syntax is a clause of a large

Re: Negative Date Query for Local Params in Solr

2016-09-20 Thread Sandeep Khanzode
Wow. Simply awesome! Where can I read more about this? I am not sure whether I understand what is going on behind the scenes ... like which parser is invoked for !field, how can we know which all special local params exist, whether we should prefer edismax over others, when is the LuceneQParser

Re: Negative Date Query for Local Params in Solr

2016-09-20 Thread David Smiley
OH! Ok the moment the query no longer starts with "{!", the query is parsed by defType (for 'q') and will default to lucene QParser. So then it appears we have a clause with a NOT operator. In this parsing mode, embedded "{!" terminates at the "}". This means you can't put the sub-query text af

Re: Negative Date Query for Local Params in Solr

2016-09-20 Thread Sandeep Khanzode
This is what I get ...  { "responseHeader": { "status": 400, "QTime": 1, "params": { "q": "-{!field f=schedule op=Contains}[2016-08-26T12:00:12Z TO 2016-08-26T15:00:12Z]", "indent": "true", "wt": "json", "_": "1474373612202" } }, "error": { "msg": "Invalid Date in Date Math String:'[2016-08-26T1

Re: Negative Date Query for Local Params in Solr

2016-09-20 Thread David Smiley
It should, I think... what happens? Can you ascertain the nature of the results? ~ David On Tue, Sep 20, 2016 at 5:35 AM Sandeep Khanzode wrote: > For Solr 6.1.0 > This works .. -{!field f=schedule op=Intersects}2016-08-26T12:00:56Z > > This works .. {!field f=schedule op=Contains}[2016-08-26T12

Negative Date Query for Local Params in Solr

2016-09-20 Thread Sandeep Khanzode
For Solr 6.1.0 This works .. -{!field f=schedule op=Intersects}2016-08-26T12:00:56Z This works .. {!field f=schedule op=Contains}[2016-08-26T12:00:12Z TO 2016-08-26T15:00:12Z] Why does this not work?-{!field f=schedule op=Contains}[2016-08-26T12:00:12Z TO 2016-08-26T15:00:12Z]  SRK