[ 
https://issues.apache.org/jira/browse/LUCENE-5000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Wettin updated LUCENE-5000:
--------------------------------

    Attachment: TestLuceneQuerySerializer.java
                LuceneQuerySerializer.java

Code blessed with ASL2
                
> Query serialization using ObjectInput/OutputStream
> --------------------------------------------------
>
>                 Key: LUCENE-5000
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5000
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: core/search
>    Affects Versions: 4.3
>            Reporter: Karl Wettin
>            Priority: Trivial
>         Attachments: LuceneQuerySerializer.java, 
> TestLuceneQuerySerializer.java
>
>
> Reads and writes queries on ObjectInput/OutputStream.
> No support for ConstantScoreQuery (no serialization for Filter) nor 
> PayloadNearQuery and PayloadTermQuery (no serialization for PayloadFunction).
> I might have missed to implement support for some core Queries. Currently 
> supported are: TermQuery, BooleanQuery, WildcardQuery, PhraseQuery, 
> MultiPhraseQuery, FuzzyQuery, RegexpQuery, TermRangeQuery, NumericRangeQuery, 
> DisjunctionMaxQuery, MatchAllDocsQuery, SpanTermQuery, 
> SpanMultiTermQueryWrapper, SpanNearQuery, SpanNotQuery, SpanOrQuery, 
> FieldMaskingSpanQuery, SpanFirstQuery, SpanPositionRangeQuery, 
> SpanPayloadCheckQuery and SpanNearPayloadCheckQuery.
> Users are allowed to implement and register strategies for their own queries.
> This will not allow you to serialize any object graph with aggregated Query 
> instances e.g. Map<String, Query>, that would require a new implementation of 
> ObjectOutputStream (one could base that on the GPL2 code from OpenJDK) or 
> instrument the existing implementations to handle Query in private 
> writeObjectA and similar methods.
> There's a bit of reflection glue in this code in order to read private fields 
> in query implementation. Not too happy about that, but not much to do unless 
> one is to expose a bunch of new getters in all those classes.
> The class is places in o.a.l.search in order to access package visible fields 
> without getters. If moving to another package this would have to be handled 
> using reflection as with above mentioned private fields.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to