Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,23 @@ public void parentRetrievalByte_knnChildrenWithParentFilter_shouldReturnKnnParen
"//result/doc[3]/str[@name='id'][.='2']");
}

@Test
public void parentRetrievalByte_knnChildrenWithMultipleParentFilters_shouldReturnKnnParents() {
assertQ(
req(
"q", "{!parent which=$allParents score=max v=$children.q}",
"fl", "id,score",
"children.q",
"{!knn f=vector_byte topK=3 parents.preFilter=$parentFilter1 parents.preFilter=$parentFilter2 childrenOf=$allParents}"
+ BYTE_QUERY_VECTOR,
"allParents", "parent_s:[* TO *]",
"parentFilter1", "parent_s:(a c)",
"parentFilter2", "parent_s:(c e)"),
"//*[@numFound='2']",
"//result/doc[1]/str[@name='id'][.='8']",
"//result/doc[2]/str[@name='id'][.='2']");
}

@Test
public void
parentRetrievalByte_knnChildrenWithParentFilterAndChildrenFilter_shouldReturnKnnParents() {
Expand All @@ -311,6 +328,24 @@ public void parentRetrievalByte_knnChildrenWithParentFilter_shouldReturnKnnParen
"//result/doc[2]/str[@name='id'][.='2']");
}

@Test
public void
parentRetrievalByte_knnChildrenWithMultipleParentFiltersAndChildrenFilter_shouldReturnKnnParents() {
assertQ(
req(
"q", "{!parent which=$allParents score=max v=$children.q}",
"fl", "id,score",
"children.q",
"{!knn f=vector_byte topK=3 preFilter=child_s:m parents.preFilter=$parentFilter1 parents.preFilter=$parentFilter2 childrenOf=$allParents}"
+ BYTE_QUERY_VECTOR,
"allParents", "parent_s:[* TO *]",
"parentFilter1", "parent_s:(a c)",
"parentFilter2", "parent_s:(c e)"),
"//*[@numFound='2']",
"//result/doc[1]/str[@name='id'][.='8']",
"//result/doc[2]/str[@name='id'][.='2']");
}

@Test
public void
parentRetrievalFloat_topKWithChildTransformerWithFilter_shouldUseOriginalChildTransformerFilter() {
Expand Down