Make all query classes serializable, and provide a query parser to consume them [LUCENE-4012]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
I started off on #5077 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.
---
Migrated from [LUCENE-4012](https://issues.apache.org/jira/browse/LUCENE-4012) by Benson Margulies (@bimargulies-google), 1 vote, updated May 20 2019
Attachments: [bq.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-4012/bq.patch)
Contributor guide
Research direction
Start by reading the attached bq.patch and the existing XML parser and query-class implementations. Map the Jackson and dependency-coupling alternatives described in the issue before deciding scope. Done means the agreed query classes can be serialized and a parser can consume the resulting query tree, with coverage for the supported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100