Hi,

It sounds like you are looking for the "Nested Child Documents"[1] and
"Block Join Query Parsers"[2] features in Solr.  The terminology is weird
(block join, child/of, parent/which) but it should do what you want.

Do take note of the warning in the docs:

One limitation of indexing nested documents is that the whole block of
> parent-children documents must be updated together whenever any changes are
> required. In other words, even if a single child document or the parent
> document is changed, the whole block of parent-child documents must be
> indexed together.


What this note does not include is that if you delete a parent document you
must also explicitly delete the child documents otherwise they end up being
attached to another parent document.  I forget if this applies when you
re-index a document or not but to be safe I always explicitly delete the
parent and child documents.  There are a number of JIRA tickets floating
around relating to cleaning up the user experience for this.

-Tim

[1]
https://lucene.apache.org/solr/guide/6_6/uploading-data-with-index-handlers.html#UploadingDatawithIndexHandlers-NestedChildDocuments
[2]
https://lucene.apache.org/solr/guide/6_6/other-parsers.html#OtherParsers-BlockJoinQueryParsers

On Tue, Nov 6, 2018 at 12:01 AM waseem-farooqui <waseem.farooqu...@gmail.com>
wrote:

> I am new with Solr and using Spring-data-solr to store my complete **pdf**
> files with its contents now there raise a situation in which I want to
> store
> the file rating, that can be rate by list of users means I would have
> object
> something like this in my **DataModel** `List<FileRating>` in which
> `FileRating` would have `user, comments, date, rating` the response json
> structure should be like this
>
>     {
>           "document": "Fuzzy based semantic search.pdf",
>           "md5Hash": "md5",
>           "rated": [
>             {
>               "user": "John",
>               "comments": "Not Very useful",
>               "rating": 2,
>               "date": "20/10/2018"
>             },
>             {
>               "user": "Terrion",
>               "comments": "Useful with context to semantic based fuzzy
> logics.",
>               "rating": 6,
>               "date": "20/10/2018"
>             }
>           ]
>         }
>   and I not getting any idea how is this possible in solr have looked
> `multivalued` type but I don't think it would work in my scenario because
> at
> the end of the day I want to search all documents with its rating and could
> be file rated by specific users.
>
> `Solr 6.6`
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Reply via email to