azure-search

jQuery Ajax - POST from Localhost Generates No 'Access-Control-Allow-Origin' header

别说谁变了你拦得住时间么 提交于 2019-12-02 06:57:13
I thought I understood CORS, but there is something I do not understand apparently. I have an app that I am trying to run from localhost. This app needs to POST a request to Azure Search. I am trying to upload a search document. In an attempt to do this, I have the following: var url = 'https://my-app.search.windows.net/indexes/test/docs/index?api-version=2015-02-28'; $.ajax({ url: url, type: 'POST', contentType:'application/json', headers: { 'api-key':'XXXXXX', 'Content-Type':'application/json' }, beforeSend: function (req) { req.setRequestHeader('Access-Control-Allow-Origin', '*'); }, data:

Implications of using AzureSearch SDK with static Dictionary of 30-40 ISearchIndexClients

Deadly 提交于 2019-12-02 04:35:28
I have an ASP.NET Web Application that uses 30-40 different search indexes across 5-6 search services (various clients are in different pricing tiers). Currently I am marshaling a new instance of the ISearchServiceClient followed by the appropriate ISearchIndexClient for the specific index needed based on the client making the call. In an effort to increase performance I was thinking about marshaling up ALL of the ISearchIndexClients at application startup and placing them into a Dictionary object: public static Dictionary<String, SearchIndexClient> SearchIndexes; so that any specific index

Azure Search Analyzer

只谈情不闲聊 提交于 2019-12-02 03:10:11
We need to create a field for an Index that is not going to be tokenised but still be searchable. In Azure Search if you make a field searchable, then the contents of the field are tokenised. If you make it filterable (documentation says then it wont be tokenised) then you cannot search it. In Lucene a KeywordAnalyzer does this job. Since Azure Search is also using Lucene cant understand why we cannot store a field contents AS IS in the index for searching WITHOUT splitting all the words/removing stop words etc. etc. Would appreciate any assistance Using keyword and other Lucene analyzers is

azure search sort and filter by score

假如想象 提交于 2019-12-02 01:35:15
I want to know how to filter and order the results by score with azure search. I tried : https://domaine.net/indexes/indexName/docs?search=TEST$orderby=@search.score%20desc&$count=true Return : object(stdClass)#322 (1) { ["error"]=> object(stdClass)#323 (2) { ["code"]=> string(0) "" ["message"]=> string(96) "Invalid expression: Syntax error at position 8 in '@search.score asc'. Parameter name: $orderby" } } Pablo Castro Results are sorted by score (descending) by default. If you sort by other criteria, score is used to break ties. If you want to sort by score explicitly, you can use the search

How to practially use a keywordanalyzer in azure-search?

99封情书 提交于 2019-12-01 12:11:22
a little relating and continuing to this question: Azure Search Analyzer I want to use a keywordanalyzer for word collections. We have documents (products) with different fields like product_name, brand, categorie and so on. To implement a keyword based ranking (scoring) I would like to add a Collection(Edm.String) field which contains different (untokenized!!) keywords, like: "brown teddy" or "green bean". To achieve this I thought about using a keywordanalyzer with the following definition: // field definition: { "name": "keyWordList", "type": "Collection(Edm.String)", "analyzer":

How to decode metadata_storage_path produced by Azure Search indexer in .NET Core

不羁岁月 提交于 2019-12-01 06:44:19
Using .NetCore 1.1.2. After successfully getting results from a search via Azure Search SDK, I am trying to decode the metadata_storage_path value. I've seen people saying to use HttpServerUtility.UrlTokenDecode in .NET or an equivalent in other languages as seen here . Then the question becomes, what is the equivalent in .NetCore of HttpServerUtility.UrlTokenDecode? With: var pathEncoded = "aHR0cHM6Ly9mYWtlZC5ibG9iLmNvcmUud2luZG93cy5uZXQvcGRmYmxvYnMvYW5udWFsX3JlcG9ydF8yMDA5XzI0NTU20"; I have tried the following: var pathbytes = Convert.FromBase64String(pathEncoded); //Throws System

How to wait for Azure Search to finish indexing document? For integration testing purpose

ぐ巨炮叔叔 提交于 2019-11-30 23:48:36
Scenario I'm building a suite of automated integration tests. Each test push data into the Azure Search index before querying it and verifying the expected results. Problem The indexation happens asynchronously in the service and data aren't immediatly available after the indexing call returns successfully. The test execute of course too rapidly most of the time. What I've tried I've tried querying the document until it's found: // Wait for the indexed document to become available while (await _index.Documents.SearchAsync("DocumentId").Results.SingleOrDefault() == null) { } But oddly enough, a

Can Azure Search be used as a primary database for some data?

十年热恋 提交于 2019-11-30 17:37:39
Microsoft promotes Azure Search as "cloud search", but doesn't necessarily say it's a "database" or "data storage". It stops short of saying it's big data. Can/should azure search be used as the primary database for some data? Or should there always be some "primary" datastore that is "duplicated" in azure search for search purposes? If so, under what circumstances/what scenarios make sense to use Azure Search as a primary database? Although we generally don't recommend it, you might consider using Azure Search as a primary store if: Your app can tolerate some data inconsistency. Azure Search

Azure Search scoring

限于喜欢 提交于 2019-11-29 15:09:57
I have sets of 3 identical (in Text) items in Azure Search varying on Price and Points. Cheaper products with higher points are boosted higher. (Price is boosted more then Points, and is boosted inversely). However, I keep seeing search results similar to this. Search is on ‘john milton’. I get Product="Id = 2-462109171829-1, Price=116.57, Points= 7, Name=Life of Schamyl / John Milton Mackie, Description=.", Score=32.499783 Product="Id = 2-462109171829-2, Price=116.40, Points= 9, Name=Life of Schamyl / John Milton Mackie, Description=.", Score=32.454872 Product="Id = 2-462109171829-3, Price

Azure Search - Find matches within a word like “contains”

北城以北 提交于 2019-11-29 08:52:21
I use Azure Search which in turn uses Lucene. Is there any way to make search not that strict. What I need is when searching for " term " should match documents with terms that contain " term ". Serching fox term should match "Prefix Term ", " Term Suffix", "Prefix Term Suffix" Serching fox part2 should match "part1 part2 ", " part2 part3", "part1 part2 part3" I need to run search query which has several terms like "term part2" To match documents like: { someField:"... PrefixTermSuffix ... part1part2part3 ..." } { someField:"... PrefixTerm ... part2part3 ..." } etc You can use regex expression