de/serializing queries

2019-05-16 Thread Michael Sokolov
We have lots of nice QueryParsers, but do we have any Query serializers that produce strings that can then be reliably parsed back to the original query? I thought maybe XML parser would do this since it seems to aim to be all things, but I couldn't find a Query->XML method in a cursory glance. If

Re: Serializing Queries

2016-03-22 Thread Bauer, Herbert S. (Scott)
ut = new Input(bais); >kryo = pool.borrowObject(); >deserializedQueryObject = (Query) kryo.readClassAndObject(input); >pool.returnObject(kryo); >input.close(); > >Hope that might help. > >Jim > > >From: Bauer, Herbert S. (Scot

Re: Serializing Queries

2016-03-19 Thread Bauer, Herbert S. (Scott)
wObject(); >deserializedQueryObject = (Query) kryo.readClassAndObject(input); >pool.returnObject(kryo); >input.close(); > >Hope that might help. > >Jim > > >From: Bauer, Herbert S. (Scott) >Sent: 18 March 2016 10:02 >To: java

Re: Serializing Queries

2016-03-19 Thread Bauer, Herbert S. (Scott)
Thanks Ahmet: I¹ve seen these, but I don¹t find any mechanism here helping to get me from the query object to the xml or a DOM object. -scott On 3/18/16, 11:35 AM, "Ahmet Arslan" wrote: >Hi, > >I think, xml query parser examples [1] are the safest way to persist >Lucene queries. > > >[1]https:

Re: Serializing Queries

2016-03-18 Thread McKinley, James T
serializedQueryObject = (Query) kryo.readClassAndObject(input); pool.returnObject(kryo); input.close(); Hope that might help. Jim From: Bauer, Herbert S. (Scott) Sent: 18 March 2016 10:02 To: java-user@lucene.apache.org Subject: Serializing Queries Has a

Serializing Queries

2016-03-18 Thread Bauer, Herbert S. (Scott)
Has anyone in this group solved the problem of serializing complex boolean queries (Some of our clauses have span and other query types)? Our Java RMI depends upon being able to do so. I have seen posts that say you can just parse the string representation but apparently that only works on si

Re: Serializing Queries

2016-03-18 Thread Ahmet Arslan
Hi, I think, xml query parser examples [1] are the safest way to persist Lucene queries. [1]https://github.com/apache/lucene-solr/tree/master/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml Ahmet On Friday, March 18, 2016 4:02 PM, "Bauer, Herbert S. (Scott)" wrote: Has anyone