具有 azure 搜索功能的客户分析器可搜索字符串多个特殊字符
Customer analyzer with azure search to search strings multiple special characters
我还有一个关于 Azure 搜索的问题,我有一个名为“branchorders-index”的索引(附加架构)。我有一个名为“lowerCustomerPONbr”的字符串字段,带有自定义分析器,如下所示:
"analyzers": [
{
"@odata.type": "#Microsoft.Azure.Search.CustomAnalyzer",
"name": "SWMLuceneAlongWithCustomHyphenAnalyser",
"tokenizer": "keyword_v2",
"tokenFilters": [
"lowercase"
],
"charFilters": []
}
]
问题:搜索文本“engg - test - umesh”的正确查询是什么?我想要一个关于执行查询的文档。这是我正在尝试的查询:
$count=true&$select=lowerCustomerPONbr&search=lowerCustomerPONbr:/.*engg\ \-\ test\ \-\ umesh.*/
{
"@odata.context": "https://abcd/indexes('branchorders-index')/$metadata#docs(lowerCustomerPONbr)",
"@odata.count": 8,
"value": [
{
"@search.score": 0.22780417,
"lowerCustomerPONbr": "engg - test - umesh"
},
{
"@search.score": 0.027440047,
"lowerCustomerPONbr": "sam-clc-test-3"
},
{
"@search.score": 0.025132125,
"lowerCustomerPONbr": "sam-clc-test-4"
},
{
"@search.score": 0.019148104,
"lowerCustomerPONbr": "sam-clc-test-1"
},
{
"@search.score": 0.019148104,
"lowerCustomerPONbr": "030 test 17 april"
},
{
"@search.score": 0.018480092,
"lowerCustomerPONbr": "sam-clc-test-2"
},
{
"@search.score": 0.018480092,
"lowerCustomerPONbr": "dilip-qa-test"
},
{
"@search.score": 0.015009361,
"lowerCustomerPONbr": "030 eng-test"
}
]
}
Santosh,如果您添加 &queryType=full,是否可以解决问题?
我还有一个关于 Azure 搜索的问题,我有一个名为“branchorders-index”的索引(附加架构)。我有一个名为“lowerCustomerPONbr”的字符串字段,带有自定义分析器,如下所示:
"analyzers": [
{
"@odata.type": "#Microsoft.Azure.Search.CustomAnalyzer",
"name": "SWMLuceneAlongWithCustomHyphenAnalyser",
"tokenizer": "keyword_v2",
"tokenFilters": [
"lowercase"
],
"charFilters": []
}
]
问题:搜索文本“engg - test - umesh”的正确查询是什么?我想要一个关于执行查询的文档。这是我正在尝试的查询:
$count=true&$select=lowerCustomerPONbr&search=lowerCustomerPONbr:/.*engg\ \-\ test\ \-\ umesh.*/
{
"@odata.context": "https://abcd/indexes('branchorders-index')/$metadata#docs(lowerCustomerPONbr)",
"@odata.count": 8,
"value": [
{
"@search.score": 0.22780417,
"lowerCustomerPONbr": "engg - test - umesh"
},
{
"@search.score": 0.027440047,
"lowerCustomerPONbr": "sam-clc-test-3"
},
{
"@search.score": 0.025132125,
"lowerCustomerPONbr": "sam-clc-test-4"
},
{
"@search.score": 0.019148104,
"lowerCustomerPONbr": "sam-clc-test-1"
},
{
"@search.score": 0.019148104,
"lowerCustomerPONbr": "030 test 17 april"
},
{
"@search.score": 0.018480092,
"lowerCustomerPONbr": "sam-clc-test-2"
},
{
"@search.score": 0.018480092,
"lowerCustomerPONbr": "dilip-qa-test"
},
{
"@search.score": 0.015009361,
"lowerCustomerPONbr": "030 eng-test"
}
]
}
Santosh,如果您添加 &queryType=full,是否可以解决问题?