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
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
: 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
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
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
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
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