"it would be nice to be able to emit classic Lucene query parser queries where possible"

Yeah, but then we hit the problem of the Query terms having been through analysis.

Maybe it would be nice if we had query syntax to indicate that terms had already been analyzed.

-- Jack Krupansky

-----Original Message----- From: Michael Sokolov
Sent: Sunday, August 04, 2013 4:55 PM
To: java-user@lucene.apache.org
Cc: Denis Bazhenov
Subject: Re: Query serialization/deserialization

On 07/28/2013 07:32 PM, Denis Bazhenov wrote:
A full JSON query ser/deser would be an especially nice additionto Solr, allowing direct access to all Lucene Query features even if they haven't been integrated into the higher level query parsers.
There is nothing we could do, so we wrote one, in fact :) I'll try to elaborate with the team on the question of contributing it to OSS.

On Jul 29, 2013, at 1:54 AM, Jack Krupansky <j...@basetechnology.com> wrote:

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.
I struggled with this as well, and ended up implementing a parallel
query class hierarchy for query classes I cared about; they support a
toXmlNode that generates an xml tree that can then be parsed by the
Lucene XML query parser.  You can see the code here
(https://github.com/msokolov/lux/blob/master/src/main/java/lux/query/ParseableQuery.java)
but it would be hard to use outside my project.  A more general solution
would definitely be welcome.

One challenge of course is the wealth of different query parsers: it
would be nice to be able to emit classic Lucene query parser queries
where possible, wouldn't it, in addition to structured output like XML
and JSON?

-Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to