lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramzi Alqrainy <>
Subject Re: SolrJ and Lucene queries
Date Wed, 22 Oct 2014 04:30:09 GMT
Yeah, it's a shame such a ser/deser feature isn't available in Lucene. 

My idea is to have a separate module that the Query classes can delegate to 
for serialization and deserialization, handling recursion for nested query 
objects, and then have modules for XML, JSON, and a pseudo-Java functional 
notation (maybe closer to JavaScript) for the actual formatting and parser. 
And then developers can subclass the module to add any custom Query classes 
of their own. 

A full JSON query ser/deser would be an especially nice addition to Solr, 
allowing direct access to all Lucene Query features even if they haven't 
been integrated into the higher level query parsers. 

And maybe the format should have a flag for whether terms have been analyzed 
or not. Then, deserialization could optionally do analysis as well. 

The Solr QueryParsing.toString method shows a purely external approach to 
serialization (I've done something similar myself.) This is what is output 
in the "parsedquery" section of debugQuery output for a Solr query response. 

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message