Filter on Collection(Edm.String) type fields in Azure Search

Refresh

March 2019

Views

6 time

0

I have an index that has an Collection(Edm.String) type field as below which is facetable and filterable.

Index definition

But when I do a query with the payload as below for filtering: {
"count": true,
"search": "Not able to connect to Azure SQL database",
"searchFields": "Content,keyphrases",
"select": "keyphrases", "facets": ["Source, sort:count", "SubSource, sort:count"], "filter": "keyphrases/any(t: search.in(t, 'sql server database'))", "top": 6 }

I see results like this, where keyphrases don’t even have the full value “'sql server database”. Why is this so? How does filter work on collection types in Azure Search? How do I do an exact filter?

"value": [
    {
        "@search.score": 0.9469998,
        "keyphrases": [
            "windows azure",
            "sql azure",
            "web application",
            "database",
            "desktop"
        ]
    },
    {
        "@search.score": 0.7976283,
        "keyphrases": [
            "Entity Framework Code",
            "modelBuilder",
            "base tables",
            "SQL Azure",
            "one-to-one mapping",
            "factory",
            "pre",
            "large numbers of tables",
            "partitioned view",
            "simple POCO",
            "typical partitioning",
            "horizontal partitioning strategy",
            "CHECK CONSTRAINTs",
            "gt",
            "EntityName",
            "lt",
            "ToTable",
            "DbContext class",
            "UNION",
            "project",
            "OnModelCreating event",
            "foo",
            "file groups",
            "bar",
            "instance",
            "peform",
            "runtime",
            "database",
            "Fluent API",
            "metadata"
        ]
    },

Thanks.

1 answers

0

Это сработало:

{
"Кол": правда,
"поиск": "Не может подключиться к базе данных Azure SQL",
"searchFields": "Содержание, фразы",
"выберите": "фразы", "фасеты": [ "Источник, сортировка: рассчитывать», "вспомогательный источник, сортировать: рассчитывать"], "фильтр": "фразы / любые (т: т э 'базы данных сервера SQL')", "верх": 6

}