客户分析器使用azure搜索来搜索多个特殊字符串

时间:2018-04-19 17:03:15

标签: azure-search

我在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"
        }
    ]
}

1 个答案:

答案 0 :(得分:2)

Santosh,如果添加&queryType=full,是否可以解决此问题?