Lucene - Core
  1. Lucene - Core
  2. LUCENE-4012

Make all query classes serializable with Jackson, and provide a trivial query parser to consume them


    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: None
    • Component/s: core/queryparser
    • Labels:
    • Lucene Fields:


      I started off on LUCENE-4004 wanting to use DisjunctionMaxQuery via a parser. However, this wasn't really because I thought that human beans should be improvisationally composing such thing. My real goal was to concoct a query tree over here, and then serialize it to send to Solr over there.

      It occurs to me that if the Xml parser is pretty good for this, JSON would be better. It further occurs to me that the query classes may already all work with Jackson, and, if they don't, the required tweaks will be quite small. By allowing Jackson to write out class names as needed, you get the ability to serialize any query, so long as the other side has the classes in class path. A trifle verbose, but not as verbose as XML, and furthermore squishable (though not in a URL) via SMILE or BSON.

      So, the goal of this JIRA is to accumulate tweaks to the query classes to make them more 'bean pattern'. An alternative would be Jackson annotations. However, I suspect that folks would be happier to minimize the level of coupling here; in the extreme, the trivial parser could live in contrib if no one wants a dependency, even optional, on Jackson itself.

      1. bq.patch
        0.6 kB
        Benson Margulies


        No work has yet been logged on this issue.


          • Assignee:
            Benson Margulies
          • Votes:
            1 Vote for this issue
            1 Start watching this issue


            • Created: