Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting Hybrid Search #363

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
327 changes: 326 additions & 1 deletion noaa_semantic_search/operations/hybrid_search.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,47 @@
}
}
},
{
"name": "bool-only-term-range-date-sort",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need this operation as part of the workload? same is for all others with bool query.
If you want to have some baseline you can add bool with sorting for only medium subset. That should be enough to see if some deviation is there. Others will just increase running time without adding a value

"operation-type": "search",
"body": {
"size": 100,
"query": {
"bool": {
"should": [
{
"term": {
"station.country_code": "JA"
}
},
{
"range": {
"TRANGE": {
"gte": 0,
"lte": 30
}
}
},
{
"range": {
"date": {
"gte": "2016-06-04",
"format":"yyyy-MM-dd"
}
}
}
]
}
},
"sort":[
{
"AWND":{
"order":"desc"
}
}
]
}
},
{
"name": "hybrid-query-only-term-range-date",
"operation-type": "search",
Expand Down Expand Up @@ -89,6 +130,50 @@
}
}
},
{
"name": "hybrid-query-only-term-range-date-sort",
"operation-type": "search",
"request-params": {
"search_pipeline": "nlp-min-max-arithmetic-search-pipeline"
},
"body": {
"size": 100,
"query": {
"hybrid": {
"queries": [
{
"term": {
"station.country_code": "JA"
}
},
{
"range": {
"TRANGE": {
"gte": 0,
"lte": 30
}
}
},
{
"range": {
"date": {
"gte": "2016-06-04",
"format":"yyyy-MM-dd"
}
}
}
]
}
},
"sort":[
{
"AWND":{
"order":"desc"
}
}
]
}
},
{
"name": "aggs-query-term-min-hybrid",
"operation-type": "search",
Expand Down Expand Up @@ -307,6 +392,27 @@
}
}
},
{
"name": "bool-query-only-range",
"operation-type": "search",
"body": {
"size": 100,
"query": {
"bool": {
"should": [
{
"range": {
"TRANGE": {
"gte": -100,
"lte": -50
}
}
}
]
}
}
}
},
{
"name": "hybrid-query-only-range",
"operation-type": "search",
Expand All @@ -331,6 +437,65 @@
}
}
},
{
"name": "bool-query-only-range-sort",
"operation-type": "search",
"body": {
"size": 100,
"query": {
"bool": {
"should": [
{
"range": {
"TRANGE": {
"gte": -100,
"lte": -50
}
}
}
]
}
},
"sort":[
{
"AWND":{
"order":"desc"
}
}
]
}
},
{
"name": "hybrid-query-only-range-sort",
"operation-type": "search",
"request-params": {
"search_pipeline": "nlp-min-max-arithmetic-search-pipeline"
},
"body": {
"size": 100,
"query": {
"hybrid": {
"queries": [
{
"range": {
"TRANGE": {
"gte": -100,
"lte": -50
}
}
}
]
}
},
"sort":[
{
"AWND":{
"order":"desc"
}
}
]
}
},
{
"name": "aggs-query-term-min-hybrid-one-subquery",
"operation-type": "search",
Expand Down Expand Up @@ -497,6 +662,55 @@
}
}
},
{
"name": "bool-query-only-range-medium-subset",
"operation-type": "search",
"body": {
"size": 100,
"query": {
"bool": {
"should": [
{
"range": {
"TRANGE": {
"gte": -90,
"lte": -7
}
}
}
]
}
}
}
},
{
"name": "bool-query-only-range-medium-subset-sort",
"operation-type": "search",
"body": {
"size": 100,
"query": {
"bool":{
"should": [
{
"range": {
"TRANGE": {
"gte": -90,
"lte": -7
}
}
}
]
}
},
"sort":[
{
"AWND":{
"order":"desc"
}
}
]
}
},
{
"name": "hybrid-query-only-range-medium-subset",
"operation-type": "search",
Expand All @@ -520,6 +734,37 @@
}
}
}
},
{
"name": "hybrid-query-only-range-medium-subset-sort",
"operation-type": "search",
"request-params": {
"search_pipeline": "nlp-min-max-arithmetic-search-pipeline"
},
"body": {
"size": 100,
"query": {
"hybrid": {
"queries": [
{
"range": {
"TRANGE": {
"gte": -90,
"lte": -7
}
}
}
]
}
},
"sort":[
{
"AWND":{
"order":"desc"
}
}
]
}
},
{
"name": "aggs-query-term-min-hybrid-one-subquery-medium-subset",
Expand Down Expand Up @@ -687,6 +932,55 @@
}
}
},
{
"name": "bool-query-only-range-large-subset",
"operation-type": "search",
"body": {
"size": 100,
"query": {
"bool": {
"should": [
{
"range": {
"TRANGE": {
"gte": 1,
"lte": 35
}
}
}
]
}
}
}
},
{
"name": "bool-query-only-range-large-subset-sort",
"operation-type": "search",
"body": {
"size": 100,
"query": {
"bool": {
"should": [
{
"range": {
"TRANGE": {
"gte": 1,
"lte": 35
}
}
}
]
}
},
"sort":[
{
"AWND":{
"order":"desc"
}
}
]
}
},
{
"name": "hybrid-query-only-range-large-subset",
"operation-type": "search",
Expand All @@ -711,6 +1005,37 @@
}
}
},
{
"name": "hybrid-query-only-range-large-subset-sort",
"operation-type": "search",
"request-params": {
"search_pipeline": "nlp-min-max-arithmetic-search-pipeline"
},
"body": {
"size": 100,
"query": {
"hybrid": {
"queries": [
{
"range": {
"TRANGE": {
"gte": 1,
"lte": 35
}
}
}
]
}
},
"sort":[
{
"AWND":{
"order":"desc"
}
}
]
}
},
{
"name": "aggs-query-term-min-hybrid-one-subquery-large-subset",
"operation-type": "search",
Expand Down Expand Up @@ -876,4 +1201,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion noaa_semantic_search/test_procedures/hybrid_search.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
{
"name": "hybrid-query-aggs-full",
"name": "bool-vs-hybrid",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this name changed? We're not comparing two query types, initial meaning is - run full search load for hybrid query.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the name's semantic such change isn't backward compatible, this workload has been released and may be in use. If you're in strong need of procedure with new name better to create new one.

"description": "Indexes the whole document corpus using OpenSearch default settings. After that several query groups are run.",
"default": false,
"schedule": [
Expand Down
Loading