Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
pmpailis committed Oct 17, 2024
1 parent c5cde8a commit e748e04
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,13 @@ setup:

- match: { hits.total.value : 5 }
- length: { hits.hits : 2 }
- match: { hits.hits.0._id: "5" }
- match: { hits.hits.1._id: "4" }

- contains: { hits.hits: { _id: "4" } }
- contains: { hits.hits: { _id: "5" } }

# both docs have the same score (1/11)
- close_to: {hits.hits.0._score: {value: 0.0909, error: 0.001}}
- close_to: {hits.hits.1._score: {value: 0.0909, error: 0.001}}

- do:
search:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@ setup:
rank_constant: 1
size: 1

- match: { hits.total.value: 6 }
- match: { hits.total.value: 5 }

- match: { hits.hits.0._id: "5" }

- close_to: { aggregations.sums.value.asc_total: { value: 33.0, error: 0.001 }}
- close_to: { aggregations.sums.value.desc_total: { value: 39.0, error: 0.001 }}
- close_to: { aggregations.sums.value.asc_total: { value: 25.0, error: 0.001 }}
- close_to: { aggregations.sums.value.desc_total: { value: 35.0, error: 0.001 }}


---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ setup:
- match: {hits.hits.0._explanation.details.0.details.0.description: "/weight\\(text:term.*/" }
- match: {hits.hits.0._explanation.details.1.value: 1}
- match: {hits.hits.0._explanation.details.1.description: "/rrf.score:.\\[0.5\\].*/" }
- match: {hits.hits.0._explanation.details.1.details.0.description: "/within.top.*/" }
- match: {hits.hits.0._explanation.details.1.details.0.details.0.description: "/found.vector.with.calculated.similarity.*/" }

- close_to: { hits.hits.1._explanation.value: { value: 0.5833334, error: 0.000001 } }
- match: {hits.hits.1._explanation.description: "/rrf.score:.\\[0.5833334\\].*/" }
Expand All @@ -115,7 +115,7 @@ setup:
- match: {hits.hits.1._explanation.details.0.details.0.description: "/weight\\(text:term.*/" }
- match: {hits.hits.1._explanation.details.1.value: 2}
- match: {hits.hits.1._explanation.details.1.description: "/rrf.score:.\\[0.33333334\\].*/" }
- match: {hits.hits.1._explanation.details.1.details.0.description: "/within.top.*/" }
- match: {hits.hits.1._explanation.details.1.details.0.details.0.description: "/found.vector.with.calculated.similarity.*/" }

- match: {hits.hits.2._explanation.value: 0.5}
- match: {hits.hits.2._explanation.description: "/rrf.score:.\\[0.5\\].*/" }
Expand Down Expand Up @@ -228,7 +228,7 @@ setup:
- match: {hits.hits.0._explanation.details.0.details.0.description: "/weight\\(text:term.*/" }
- match: {hits.hits.0._explanation.details.1.value: 1}
- match: {hits.hits.0._explanation.details.1.description: "/.*my_top_knn.*/" }
- match: {hits.hits.0._explanation.details.1.details.0.description: "/within.top.*/" }
- match: {hits.hits.0._explanation.details.1.details.0.details.0.description: "/found.vector.with.calculated.similarity.*/" }

- close_to: { hits.hits.1._explanation.value: { value: 0.5833334, error: 0.000001 } }
- match: {hits.hits.1._explanation.description: "/rrf.score:.\\[0.5833334\\].*/" }
Expand All @@ -237,7 +237,7 @@ setup:
- match: {hits.hits.1._explanation.details.0.details.0.description: "/weight\\(text:term.*/" }
- match: {hits.hits.1._explanation.details.1.value: 2}
- match: {hits.hits.1._explanation.details.1.description: "/.*my_top_knn.*/" }
- match: {hits.hits.1._explanation.details.1.details.0.description: "/within.top.*/" }
- match: {hits.hits.1._explanation.details.1.details.0.details.0.description: "/found.vector.with.calculated.similarity.*/" }

- match: {hits.hits.2._explanation.value: 0.5}
- match: {hits.hits.2._explanation.description: "/rrf.score:.\\[0.5\\].*/" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,12 @@ setup:
- match: { hits.hits.1._id: "2" }
- match: { hits.hits.2._id: "4" }

- exists: profile.shards.0.dfs
- length: { profile.shards.0.dfs.knn: 1 }
- length: { profile.shards.0.dfs.knn.0.query: 1 }
- match: { profile.shards.0.dfs.knn.0.query.0.type: DocAndScoreQuery }

- match: { profile.shards.0.searches.0.query.0.type: ConstantScoreQuery }
- length: { profile.shards.0.searches.0.query.0.children: 1 }
- match: { profile.shards.0.searches.0.query.0.children.0.type: BooleanQuery }
- length: { profile.shards.0.searches.0.query.0.children.0.children: 2 }
- match: { profile.shards.0.searches.0.query.0.children.0.children.0.type: TermQuery }
- match: { profile.shards.0.searches.0.query.0.children.0.children.1.type: KnnScoreDocQuery }
- not_exists: profile.shards.0.dfs

- match: { profile.shards.0.searches.0.query.0.type: RankDocsQuery }
- length: { profile.shards.0.searches.0.query.0.children: 2 }
- match: { profile.shards.0.searches.0.query.0.children.0.type: TopQuery }
- match: { profile.shards.0.searches.0.query.0.children.1.type: BooleanQuery }
- length: { profile.shards.0.searches.0.query.0.children.1.children: 2 }
- match: { profile.shards.0.searches.0.query.0.children.1.children.0.type: TermQuery }
- match: { profile.shards.0.searches.0.query.0.children.1.children.1.type: TopQuery }

0 comments on commit e748e04

Please sign in to comment.