alessandrobenedetti commented on code in PR #3316: URL: https://github.com/apache/solr/pull/3316#discussion_r2549191103
########## solr/solr-ref-guide/modules/query-guide/pages/searching-nested-documents.adoc: ########## @@ -184,6 +184,22 @@ $ curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' - ---- ==== +[#vector-search-child] +[CAUTION] +.Vector search - children are nested documents with a vector field +==== +It is quite common to encode the original text of a document into multiple nested vectors. + +This may happen, among other use cases, because you chunked the original text into paragraphs, each of them modeled as a nested document with the paragraph text and the vector representation. + +Solr doesn't need to have denormalised nested documents, you can still retrieve the children paragraphs by knn vector search and prefilter them using parent level metadata. + +[source,text] +---- +$ curl 'http://localhost:8983/solr/gettingstarted/select' -d 'omitHeader=true' --data-urlencode 'fq={!child of=$block_mask filters=$parentsFilter}&q={!knn f=childVectorField topK=5}[1.0,2.5,3.0...]' --data-urlencode 'block_mask=(*:* -{!prefix f="_nest_path_" v="/skus/" parentsFilter="name_s:pen"})' Review Comment: +1 I'll sort this out and update the PR soon -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
