I guess you did not ask for specific fields in your query so only _source is 
returned by default.

You can get the full Json document back. Have a look at 
https://github.com/elasticsearchfr/hands-on/blob/answers/src/test/java/org/elasticsearchfr/handson/ex2/SearchTest.java#L392


 

-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 janvier 2014 at 11:27:18, Martin Pape (pape.mar...@gmail.com) a écrit:

Hi,

the json (logged with SearchResponse.toString()) of my search result looks like 
this:
               ...
               "title": "abc, cdf Systemfunktionen",
               "type": [
                  "abc",
                  "cdf"
               ]
               ...
so field: type is an array of 2 values.
Then in 
      SearchHitField.getValues().size()
I get only 1.
How to get both values "abc" and "cdf" from the SearchHitField so
      SearchHitField.getValues().size() == 2
?

Please advice and many thanks in advance!

Martin

--
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/40bdfdac-2583-46cb-ac08-c792afd83d33%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/etPan.52ea8572.721da317.45fa%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to