Re: SolrIndexSearcher#getDocList() method returns zero results, if query includes tdate range query

2017-04-28 Thread Victor Solakhian
I used org.apache.solr.search.LuceneQParser instead of org.apache.lucene.queryparser.classic.QueryParser and now our code works. Here are some excerpts: ... QParser qParser = getParser(core, solrQueryString); Query query = qParser.parse(); ... private QParser getParser(final

Re: SolrIndexSearcher#getDocList() method returns zero results, if query includes tdate range query

2017-04-25 Thread Victor Solakhian
Hi Chris, I think you are leading me to the right direction. I'm not sure how that would have worked in Solr 4.5, ... unless > perhaps your definition of a "date" field was different in the schema's > you used in 4.5, and did not involve a Trie based date field (the very > old legacy date

Re: SolrIndexSearcher#getDocList() method returns zero results, if query includes tdate range query

2017-04-25 Thread Chris Hostetter
: The correct way for a plugin to do the sort of thing you are trying to do : would be to use an instance of SolrQueryParser -- see for example the code : in LuceneQParser and how it uses SolrQueryParser ... you'll most likeley : just want to use LuceneQParser directly in your plugin to

Re: SolrIndexSearcher#getDocList() method returns zero results, if query includes tdate range query

2017-04-25 Thread Chris Hostetter
Diff FieldType's encode diff values into terms in diff ways. at query time the FieldTypes need to be consulted to know how to build the resulting query object. Solr's query parsers are "schema aware" and delegate to the appropriate FieldType to handle any index term encoding needed -- but

Re: SolrIndexSearcher#getDocList() method returns zero results, if query includes tdate range query

2017-04-25 Thread Rick Leir
Victor, In SorAdmin, do a query then look at the top bar on the screen. Sorry, I cannot do a screenshot here. The actual query that SolrAdmin generated is in that top bar. It is difficult to cut and paste the query but possible. Or you can click on it and jump to a results page. SolrAdmin has

Re: SolrIndexSearcher#getDocList() method returns zero results, if query includes tdate range query

2017-04-25 Thread Victor Solakhian
Rick, Solr Admin does not generate a query. I use it just to confirm that the query generated by our code returns results. getDocList() method also does not generate a query, It returns a list of document IDs for the query created by the QueryParser.parse(query,...). method. Thanks, Victor On

Re: SolrIndexSearcher#getDocList() method returns zero results, if query includes tdate range query

2017-04-25 Thread Rick Leir
Victor, When you do a query in SolrAdmin, the generated query is shown in at the top of the page. Can you compare that with the query that getDocList generates? Or did I misunderstand your question. Cheers -- Rick On April 25, 2017 11:34:17 AM EDT, Victor Solakhian

SolrIndexSearcher#getDocList() method returns zero results, if query includes tdate range query

2017-04-25 Thread Victor Solakhian
We have code that uses *SolrIndexSearcher#getDocList()* method to get document IDs for the query. First a Solr query string is generated from UI, then the following code creates a Lucene Query org.apache.lucene.search.Query query = parser.parse(solrQueryString); where parser is