{"issue":{"state":"closed","created_at":"2011-01-08T00:14:45Z","updated_at":"2011-12-13T23:37:28Z","comments":2,"user":{"gravatar_id":"206690a26526f07467ecfd6662f8b152","id":129644,"url":"https://api.github.com/users/karussell","login":"karussell","avatar_url":"https://secure.gravatar.com/avatar/206690a26526f07467ecfd6662f8b152?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"To ease the migration from solr it would be a great benefit for ES if there would be the ability of solr compatible query and response formats. Implemented as plugin or java api?\r\n\r\nAs in (indexing) and output (querying) format xml should be the first try, because the java binary could be too complicated and json isn't supported for indexing yet.\r\n\r\nFor solr I'm expecting the single index queries (no shards) because I have it that way and its easier ;-)\r\n\r\none 'complicate' query with facets (without highlighting) can look like:\r\n\r\nq=&facet=true&facet.date=%7B%21ex%3Ddt%7Ddt&facet.date.start=NOW%2FDAY-6DAYS&facet.date.end=NOW%2FDAY%2B1DAY&facet.date.gap=%2B1DAY&facet.sort=count&facet.limit=10&facet.field=dest_title_1_s&f.dest_title_1_s.facet.mincount=1&f.dest_title_1_s.facet.limit=12&f.tag.facet.mincount=2&f.tag.facet.limit=20&facet.query=dt%3A%5BNOW%2FHOURS-8HOURS+TO+*%5D&facet.query=retw_i%3A%5B5+TO+*%5D&facet.query=retw_i%3A%5B20+TO+*%5D&facet.query=retw_i%3A%5B50+TO+*%5D&fq=user%3Ameysrh&start=0&rows=15\r\n\r\nthere can be also update, deleteByQuery, commit and optimize. All except the update query should be simple.\r\n\r\nThe update xml looks like:\r\n\r\n   <add>\r\n    <doc>\r\n    <field name=\"id\">9885A004</field>\r\n    <field name=\"name\">Canon PowerShot SD500</field>\r\n    <field name=\"category\">camera</field>\r\n    <field name=\"features\">3x optical zoom</field>\r\n    <field name=\"features\">aluminum case</field>\r\n    <field name=\"weight\">6.4</field>\r\n    <field name=\"price\">329.95</field>\r\n    </doc>\r\n   </add>\r\n\r\nresponse xml looks like\r\n\r\n  <response>\r\n  <responseHeader>\r\n    <status>0</status><QTime>1</QTime>\r\n  </responseHeader>\r\n  <result numFound=\"2\" start=\"0\">\r\n   <doc>\r\n    <str name=\"id\">MA147LL/A</str>\r\n    <str name=\"name\">Apple 60 GB iPod Black</str>\r\n   </doc>\r\n   <doc>\r\n    <str name=\"id\">EN7800GTX/2DHTV/256M</str>\r\n    <str name=\"name\">ASUS Extreme N7800GTX</str>\r\n   </doc>\r\n  </result>\r\n  </response>\r\n\r\ntaken from here: http://www.xml.com/pub/a/2006/08/09/solr-indexing-xml-with-lucene-andrest.html\r\n\r\nfacets are added either before or after the results:\r\n\r\n    <lst name=\"facet_counts\">\r\n    <lst name=\"facet_queries\">\r\n    <int name=\"dt:[NOW/HOURS-8HOURS TO *]\">15</int>\r\n    <int name=\"dt:[* TO NOW/DAY-6DAYS]\">40</int>\r\n    <int name=\"retw_i:[5 TO *]\">0</int>\r\n    <int name=\"retw_i:[20 TO *]\">0</int>\r\n    <int name=\"retw_i:[50 TO *]\">0</int>\r\n    </lst>\r\n    <lst name=\"facet_fields\">\r\n    <lst name=\"tag\">\r\n    <int name=\"meysrh\">13</int>\r\n    <int name=\"lg\">11</int>\r\n    ...\r\n    </lst>\r\n    </lst>\r\n    <lst name=\"dest_title_1_s\">\r\n    <int name=\"_1241812383_ÜberTwitter -..\">1</int>\r\n    <int name=\"_1404625014_TwitLonger: ☺ ..\"\">1</int>\r\n    <int name=\"_1404721733_TwitLonger: ..\">1</int>\r\n    <int name=\"ÜberTwitter - romynandariz..\">1</int>\r\n    </lst>\r\n    </lst>\r\n    <lst name=\"facet_dates\">\r\n    <lst name=\"dt\">\r\n    <int name=\"2011-01-02T00:00:00Z\">0</int>\r\n    <int name=\"2011-01-03T00:00:00Z\">0</int>\r\n    <int name=\"2011-01-04T00:00:00Z\">0</int>\r\n    <int name=\"2011-01-05T00:00:00Z\">0</int>\r\n    <int name=\"2011-01-06T00:00:00Z\">0</int>\r\n    <int name=\"2011-01-07T00:00:00Z\">30</int>\r\n    <int name=\"2011-01-08T00:00:00Z\">0</int>\r\n    <str name=\"gap\">+1DAY</str>\r\n    <date name=\"end\">2011-01-09T00:00:00Z</date>\r\n    </lst>\r\n    </lst>\r\n    </lst>","assignee":null,"id":513620,"number":612,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Solr Compatible Query and Response Format","html_url":"https://github.com/elasticsearch/elasticsearch/issues/612","closed_at":"2011-05-21T22:24:11Z","url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/612","milestone":null},"action":"created","comment":{"created_at":"2011-12-13T23:37:28Z","updated_at":"2011-12-13T23:37:28Z","user":{"gravatar_id":"8ec03234adcd70bae24e9999260774e4","id":173955,"url":"https://api.github.com/users/mattweber","login":"mattweber","avatar_url":"https://secure.gravatar.com/avatar/8ec03234adcd70bae24e9999260774e4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Also take a look at the Mock Solr Plugin:\r\nhttps://github.com/mattweber/elasticsearch-mocksolrplugin\r\n","id":3132761,"url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/comments/3132761"}}