serialization - Serializing a lucene query into JSON? -



serialization - Serializing a lucene query into JSON? -

is there best practice serializing lucene queries json format? saw elastic search query dsl, looks strays lucene terminology. also, lucene appears moving away maintaining serialization code.

i looking have "standard" format in json. need able save query, when users saving queries on web ui, not entering title:matrix. have able search saved searches, edit saved searches. nice if there standard json format representing query. lucene query.

i know little of elasticsearch i'm guessing doing (also) because back upwards query functionality other lucene does.

if need marshall/unmarshall query, treat whole single unescaped string. if want break downwards key-value (field name/value) elements, don't forget can have conjuction/disjunction/etc. not trivial.

as comment on serialization code - don't think applies queries. query has abstract tostring(string field) method each query subclass should implement , provide parseable string. tostring() calls - , hasn't alter long while, nor see changing query not provide other way of getting string representation changing break lot of code.

json serialization lucene

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -