[
https://issues.apache.org/jira/browse/OAK-11734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mohit Kataria updated OAK-11734:
--------------------------------
Description:
Buggy sample Elastic query with path filter, in this filter is defined a top
level.
||Buggy elastic query||Rectified elastic query||
|{
"_source": {
"includes": [
":path"
]
},
"query": {
"bool": {
"filter": [
{
"term": {
":ancestors": {
"value": "/content/filterPath"
}
}
}
],
"must": [
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"nested": {
"path": ":vectorSpaces.ada-test-model",
"query": {
"knn": {
"field": ":vectorSpaces.ada-test-model.vector",
"query_vector": [],
"num_candidates": 100
}
}
}
},
{
"query_string": {
"boost": 0.03999999910593033,
"default_operator": "and",
"fields": [
"title^1.0",
"description^1.0",
"updatedBy^1.0",
":fulltext"
],
"lenient": true,
"query": "technological advancements in electric
vehicles",
"tie_breaker": 0.5,
"type": "cross_fields"
}
}
]
}
}
]
}
}
]
}
},
"size": 10,
"sort": [
{
"_score": {
"order": "desc"
}
},
{
":path": {
"order": "asc"
}
}
],
"track_total_hits": 10000
}|{
"_source": {
"includes": [
":path"
]
},
"query": {
"bool": {
"filter": [
{
"term": {
":ancestors": {
"value": "/content/filterPath"
}
}
}
],
"must": [
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"nested": {
"path": ":vectorSpaces.ada-test-model",
"query": {
"knn": {
"field": ":vectorSpaces.ada-test-model.vector",
"query_vector": [],
"num_candidates": 100,
"filter": [
{
"term": {
":ancestors": {
"value": "/content/filterPath"
}
}
}
]
}
}
}
},
{
"query_string": {
"boost": 0.03999999910593033,
"default_operator": "and",
"fields": [
"title^1.0",
"description^1.0",
"updatedBy^1.0",
":fulltext"
],
"lenient": true,
"query": "technological advancements in electric
vehicles",
"tie_breaker": 0.5,
"type": "cross_fields"
}
}
]
}
}
]
}
}
]
}
},
"size": 10,
"sort": [
{
"_score": {
"order": "desc"
}
},
{
":path": {
"order": "asc"
}
}
],
"track_total_hits": 10000
}|
{code:java}
{
"_source": {
"includes": [
":path"
]
},
"query": {
"bool": {
"filter": [
{
"term": {
":ancestors": {
"value": "/content/filterPath"
}
}
}
],
"must": [
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"nested": {
"path": ":vectorSpaces.ada-test-model",
"query": {
"knn": {
"field": ":vectorSpaces.ada-test-model.vector",
"query_vector": [],
"num_candidates": 100
}
}
}
},
{
"query_string": {
"boost": 0.03999999910593033,
"default_operator": "and",
"fields": [
"title^1.0",
"description^1.0",
"updatedBy^1.0",
":fulltext"
],
"lenient": true,
"query": "technological advancements in electric
vehicles",
"tie_breaker": 0.5,
"type": "cross_fields"
}
}
]
}
}
]
}
}
]
}
},
"size": 10,
"sort": [
{
"_score": {
"order": "desc"
}
},
{
":path": {
"order": "asc"
}
}
],
"track_total_hits": 10000
}{code}
> Update inferenceConfigTest to check status is updated properly
> --------------------------------------------------------------
>
> Key: OAK-11734
> URL: https://issues.apache.org/jira/browse/OAK-11734
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Reporter: Mohit Kataria
> Assignee: Mohit Kataria
> Priority: Major
>
> Buggy sample Elastic query with path filter, in this filter is defined a top
> level.
> ||Buggy elastic query||Rectified elastic query||
> |{
> "_source": {
> "includes": [
> ":path"
> ]
> },
> "query": {
> "bool": {
> "filter": [
> {
> "term": {
> ":ancestors": {
> "value": "/content/filterPath"
> }
> }
> }
> ],
> "must": [
> {
> "bool": {
> "must": [
> {
> "bool": {
> "should": [
> {
> "nested": {
> "path": ":vectorSpaces.ada-test-model",
> "query": {
> "knn": {
> "field": ":vectorSpaces.ada-test-model.vector",
> "query_vector": [],
> "num_candidates": 100
> }
> }
> }
> },
> {
> "query_string": {
> "boost": 0.03999999910593033,
> "default_operator": "and",
> "fields": [
> "title^1.0",
> "description^1.0",
> "updatedBy^1.0",
> ":fulltext"
> ],
> "lenient": true,
> "query": "technological advancements in electric
> vehicles",
> "tie_breaker": 0.5,
> "type": "cross_fields"
> }
> }
> ]
> }
> }
> ]
> }
> }
> ]
> }
> },
> "size": 10,
> "sort": [
> {
> "_score": {
> "order": "desc"
> }
> },
> {
> ":path": {
> "order": "asc"
> }
> }
> ],
> "track_total_hits": 10000
> }|{
> "_source": {
> "includes": [
> ":path"
> ]
> },
> "query": {
> "bool": {
> "filter": [
> {
> "term": {
> ":ancestors": {
> "value": "/content/filterPath"
> }
> }
> }
> ],
> "must": [
> {
> "bool": {
> "must": [
> {
> "bool": {
> "should": [
> {
> "nested": {
> "path": ":vectorSpaces.ada-test-model",
> "query": {
> "knn": {
> "field": ":vectorSpaces.ada-test-model.vector",
> "query_vector": [],
> "num_candidates": 100,
> "filter": [
> {
> "term": {
> ":ancestors": {
> "value": "/content/filterPath"
> }
> }
> }
> ]
> }
> }
> }
> },
> {
> "query_string": {
> "boost": 0.03999999910593033,
> "default_operator": "and",
> "fields": [
> "title^1.0",
> "description^1.0",
> "updatedBy^1.0",
> ":fulltext"
> ],
> "lenient": true,
> "query": "technological advancements in electric
> vehicles",
> "tie_breaker": 0.5,
> "type": "cross_fields"
> }
> }
> ]
> }
> }
> ]
> }
> }
> ]
> }
> },
> "size": 10,
> "sort": [
> {
> "_score": {
> "order": "desc"
> }
> },
> {
> ":path": {
> "order": "asc"
> }
> }
> ],
> "track_total_hits": 10000
> }|
> {code:java}
> {
> "_source": {
> "includes": [
> ":path"
> ]
> },
> "query": {
> "bool": {
> "filter": [
> {
> "term": {
> ":ancestors": {
> "value": "/content/filterPath"
> }
> }
> }
> ],
> "must": [
> {
> "bool": {
> "must": [
> {
> "bool": {
> "should": [
> {
> "nested": {
> "path": ":vectorSpaces.ada-test-model",
> "query": {
> "knn": {
> "field": ":vectorSpaces.ada-test-model.vector",
> "query_vector": [],
> "num_candidates": 100
> }
> }
> }
> },
> {
> "query_string": {
> "boost": 0.03999999910593033,
> "default_operator": "and",
> "fields": [
> "title^1.0",
> "description^1.0",
> "updatedBy^1.0",
> ":fulltext"
> ],
> "lenient": true,
> "query": "technological advancements in electric
> vehicles",
> "tie_breaker": 0.5,
> "type": "cross_fields"
> }
> }
> ]
> }
> }
> ]
> }
> }
> ]
> }
> },
> "size": 10,
> "sort": [
> {
> "_score": {
> "order": "desc"
> }
> },
> {
> ":path": {
> "order": "asc"
> }
> }
> ],
> "track_total_hits": 10000
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
