I see that we agree that a new RestResponseListener is the way to go.

I have not cloned your project yet, only looked at the code on github, but
I noticed that you provided your own parseSearchRequest, but still
call RestSearchAction.parseSearchRequest from inside handleRequest. Did I
misinterpret the code or is that a mistake?

-- 
Ivan


On Thu, Jun 5, 2014 at 2:37 PM, [email protected] <[email protected]
> wrote:

> OK, I think I made it. Good exercise to wrestle with Github before going
> to sleep...
>
> https://github.com/jprante/elasticsearch-arrayformat
>
> Best,
>
> Jörg
>
>
> On Thu, Jun 5, 2014 at 10:28 PM, Ivan Brusic <[email protected]> wrote:
>
>> I just looked it up and it should be as easy as creating your
>> own RestResponseListener that takes a SearchResponse and creates a
>> simplified version with no metadata.
>>
>> Should be an interesting quick plugin, but it looks like Jorg is going to
>> beat me to it (I'm still at work for several more hours).
>>
>> --
>> Ivan
>>
>>
>> On Thu, Jun 5, 2014 at 1:08 PM, [email protected] <
>> [email protected]> wrote:
>>
>>> Ah, now I get it. Source without metadata, listed in the order of hits.
>>>
>>> This should be easy to do in a plugin. REST filter is the way to go for
>>> PHP. Just a minute...
>>>
>>> Jörg
>>>
>>>
>>> On Thu, Jun 5, 2014 at 9:49 PM, Ivan Brusic <[email protected]> wrote:
>>>
>>>> There is no way to eliminate returning the search metadata. It has been
>>>> requested often.
>>>>
>>>> --
>>>> Ivan
>>>>
>>>>
>>>> On Thu, Jun 5, 2014 at 12:40 PM, Mario Mueller <[email protected]> wrote:
>>>>
>>>>> Hey Joerg,
>>>>>
>>>>> I just need the whole content of the _source field like so:
>>>>>
>>>>> [
>>>>>    {
>>>>>       "HotelName": "Plaka",
>>>>>       "ProductCode": "7050",
>>>>>       "objectId": "437-de",
>>>>>       "GroupId": 25223,
>>>>>       "readonly": false,
>>>>>       "lang": "de",
>>>>>       "City": "Athens"
>>>>>    },
>>>>>    {
>>>>>       "HotelName": "Hyatt at Fisherman's Wharf",
>>>>>       "ProductCode": "52397",
>>>>>       "objectId": "14479-de",
>>>>>       "GroupId": 25223,
>>>>>       "readonly": false,
>>>>>       "lang": "de",
>>>>>       "City": "San Francisco"
>>>>>    }
>>>>> ]
>>>>>
>>>>> Those fields are not stored, but indexed. As I mentioned before, this
>>>>> source matches exactly to an entity structure in our application and we
>>>>> need the structure of the source document 1:1. If this is achievable by 
>>>>> any
>>>>> other methods than a plugin, then I am totally fine with it.
>>>>>
>>>>> Am Donnerstag, 5. Juni 2014 21:36:31 UTC+2 schrieb Jörg Prante:
>>>>>>
>>>>>> Just a quick question, do you just want to extract a field from the
>>>>>> json source?
>>>>>>
>>>>>> There are field filters and parameters for shaping such a JSON
>>>>>> result, maybe they can already help?
>>>>>>
>>>>>> Or can you give an example of the problem?
>>>>>>
>>>>>> Jörg
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jun 5, 2014 at 7:45 PM, Mario Mueller <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hey folks,
>>>>>>>
>>>>>>> I kindly ask for a hint to achieve the following thing:
>>>>>>>
>>>>>>> The goal is to deliver only a json array of source objects to the
>>>>>>> client. The php app that sits on the other side uses JMS\Serializer to
>>>>>>> deserialize the response into entities. At the moment the app needs to 
>>>>>>> take
>>>>>>> an overhead to derserialize it, extract the source and serialize it 
>>>>>>> again.
>>>>>>> Then the serialized stuff is passed to the entity deserializer. That's
>>>>>>> really painful.
>>>>>>>
>>>>>>> I've found a thread that suggests a proxy in between to handle this
>>>>>>> type of problem, but this is not possible in our env.
>>>>>>>
>>>>>>> The real question is: Is this achievable by writing a plugin? And if
>>>>>>> so, what type of plugin? I've looked at the RestFilter, but I don't 
>>>>>>> know if
>>>>>>> this is the right way to go...
>>>>>>>
>>>>>>> Any hints are welcome!
>>>>>>>
>>>>>>> Regards,
>>>>>>> Mario
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "elasticsearch" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>>
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/elasticsearch/6844c290-
>>>>>>> e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/elasticsearch/6844c290-e7f8-46d7-b5b3-27cab18fb706%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "elasticsearch" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/elasticsearch/b9a6e43f-35ec-4275-9a29-417552e1d94f%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "elasticsearch" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>>  To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBa%2BzqQ5b3baLpnXxnwR%3DUm6ANn92_XOSTvDgqBPiJ5ng%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "elasticsearch" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>  To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFmeHnhhcgu-5nYDLKqsvVBujbhLxmoNfF3PoZGAzORPA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBZFwGD%3DwbHxx9aEUqcWTu-LoUu05ecj1jB3t0gZVrX4w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGUOa4uFzfQYB%2BMpDdeEP3FdYc0fRA4OW7mkXLdzvkOJg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC3osMZXmiOODFXk9cZP2XvE01F0WnBag%2B%3DHQNxzN6W%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to