Getting "'_FullTextWordCount' is not a recognized built-in function name" while attempting RRF ranking.

Vargas, Justin J 0 Reputation points
2024-12-03T23:06:09.5966667+00:00

I'm attempting to use a hybrid (FullText and Vector) query as prescribed in https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/rrf.

The query:

SELECT TOP 5 c.content
FROM c
WHERE c.context="[CONTEXT VALUE]"
ORDER BY RANK RRF(VectorDistance(c.searchVector,<VECTOR>), 
FullTextScore(c.content, ["<word 1>","<word 2>"]))

I have the "Full-Text Hybrid Search for NoSQL API (Preview)" enabled as well as the "Vector Search for NoSQL API".

I have a Vector Policy as well as a Full Text Policy established within this container.

The error is refers to '_FullTextWordCount', but my query does not use that function.

What am I missing?

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,710 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Sai Raghunadh M 1,605 Reputation points Microsoft Vendor
    2024-12-04T11:45:54.4266667+00:00

    Hi @Vargas, Justin J

    Thanks for the question and using MS Q&A platform.

    It appears you are experiencing an issue with your hybrid query that integrates Full-Text Search and Vector Search using the RRF (Ranked Retrieval Function) in Azure Cosmos DB. The error '_FullTextWordCount' is not a recognized built-in function name could be due to several reasons.

    Here are the steps to troubleshoot and resolve the problem:

    You mentioned enabling the Full-Text Hybrid Search for NoSQL API (Preview) and Vector Search for NoSQL API. Double-check these configurations in the Azure portal to confirm they are active for the container.

    Try breaking down your query into simpler parts to isolate where the error might be coming from. For example, first, test just the Full-Text Search portion:

    SELECT TOP 5 c.content
    FROM c
    WHERE c.context="[CONTEXT VALUE]"
    ORDER BY FullTextScore(c.content, ["<word 1>", "<word 2>"])
    

    If this works without issues, it suggests the problem might be with how the RRF function or Vector Search is integrated.

    Since both Full-Text Search and Vector Search are still in Preview, it’s possible that some features may not be fully stable or could have been updated. Review the latest Azure Cosmos DB documentation for any changes or limitations.

    Please go through these documentations that might help you:

    https://learn.microsoft.com/en-us/azure/cosmos-db/monitor-resource-logs?tabs=azure-portal#enable-full-text-query-for-logging-query-text

    https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/troubleshoot-query-performance#include-necessary-paths-in-the-indexing-policy

    If the issue continues, it would be advisable to open a support case with Azure. Preview features can occasionally lead to unexpected behavior.

    Hope this helps. Do let us know if you any further queries. If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


  2. Vargas, Justin J 0 Reputation points
    2024-12-17T21:21:23.9266667+00:00

    I was in contact with MS Support today. It appears that the region where I have Cosmos DB deployed does not currently support RRF ranking.

    FYI, according to the support team, the regions that currently DO NOT support RRF ranking are: West US 2, East US, East US 2, South Central.

    0 comments No comments

  3. Sai Raghunadh M 1,605 Reputation points Microsoft Vendor
    2024-12-17T22:17:23.31+00:00

    Hi @Vargas, Justin J

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.

    Issue:

    I'm attempting to use a hybrid (FullText and Vector) query as prescribed in https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/query/rrf.

    The query:

    SELECT
    

    I have the "Full-Text Hybrid Search for NoSQL API (Preview)" enabled as well as the "Vector Search for NoSQL API".

    I have a Vector Policy as well as a Full Text Policy established within this container.

    The error is refers to '_FullTextWordCount', but my query does not use that function.

    What am I missing?

    Solution:

    I was in contact with MS Support today. It appears that the region where I have Cosmos DB deployed does not currently support RRF ranking.

    FYI, according to the support team, the regions that currently DO NOT support RRF ranking are: West US 2, East US, East US 2, South Central.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.