Re: searching on nested docs - geting back the nested docs as a response

2014-06-20 Thread liorg
I am not sure highlight will work as i suspect it will encounter the same obstacle, see in: https://github.com/elasticsearch/elasticsearch/issues/5245 as for suggestion #2, this will break our current schema and will require a significant model change (we store the data in MongoDB as well) - so,

Re: searching on nested docs - geting back the nested docs as a response

2014-06-19 Thread Itamar Syn-Hershko
It is very hard to give you concrete advice without knowing more about your domain and usecases, but here are 2 points that came to mind: 1. You can make use of the highlighting features to show the content that matched. Highlighters can return whole blocks of text, and by using positionIncrements

Re: searching on nested docs - geting back the nested docs as a response

2014-06-19 Thread liorg
Well, assuming we have a book type. the book holds a lot of metadata, lets say something of the following: { "author": { "name": "Jose", "lastName": "Martin" }, "sections": [{ "chapters": [{ "pages": [{ "pageNum": 1, "numOfChars": 1000, "text": "let my people...", "numofWords": 125 }, { "pageNum":

Re: searching on nested docs - geting back the nested docs as a response

2014-06-19 Thread Itamar Syn-Hershko
This is usually something that's being solved using parent-child, but the question here really is what do you mean by needing to retrieve both books & pages. Can you describe the actual scenario and what you are trying to achieve? -- Itamar Syn-Hershko http://code972.com | @synhershko

searching on nested docs - geting back the nested docs as a response

2014-06-19 Thread liorg
Hi, we have somehow a complex type holding some nested docs with arrays (lets assume an hierarchy of books and for each book we have an array of pages containing its metadata). we want to search for the nested doc - search for all the books that have the term "XYZ" in one of their pages - but