Search code examples
azure-blob-storageazure-cognitive-search

how to pass the query to azure search from a bot


I am developing a chatbot:

  1. using Microsoft bot framework in node-js.
  2. using Azure blob to store lot many unstructured data in pdf, doc,exel, and image formats.
  3. using Azure search to search in the requested information in the blob.

Now, to make the search more accurate, how to send the user entered text to the azure search through the URL.

In the document, they talk about the Lucene and simple query. But how to convert user enter text to such query syntax. My blobs are totally unstructured.

Do I need extra text processing? right now, azure returns the results based on full text search. I am not sure how is it searching.

For example: if I type in bot : what is Aconext? it send me all the files where it finds the term Aconext. Does it automatically ignores the words "what" and "is" automatically ?

Please help me to understand this. Thanks.


Solution

  • I would recommend taking a look at the documentation for how full text search works in Azure Search. It has details on exactly how searching works and the different operators you can choose to use with your search to return specific results. Depending on what you are trying to accomplish with your search bot you may or may not need additional text processing, but the above documentation should give you a good idea of what options are available to you.

    To answer your specific question, if you just do a generic search by passing "what is Aconext?" to the "search" field, it will treat the spaces between the words as an OR operator, meaning you will get results that contain "what" OR "is" OR "Aconext?". However you are likely mostly seeing the documents that contain "Aconext" because those documents end up with a higher relevance score since "Aconext" is a rarer term then "what" or "is".