| Term | Match Queries |
|---|---|
| Looks for the exact term in the inverted index. | Queries are analyzed before looking up the inverted index. |
| Does not know of the presence of the analyzer. | Understands how the fields have ben analyzed. |
| Great for keywords, numbers, dates where exact matches are important. | Useful when searching full text fields with a large body of text. |
| Less likely to match irrelevant documents. | More likely to match irrelevant documents. |
| --- | Does not go through a query parsing process, does not support wildcards, prefixes etc. |
Tuesday, 2 June 2020
How to extract any properties from Json using online tool/website
How do I get ids from json array using online tool/website.
Steps as below
- Online Tool: json query tool
- Query: input.customer.map(({Id}) => Id)
- Query type: JavaScript
{
"customer": [
{
"Id": "173C0C69-C467-AC1D-E1EC-09329D5A55F3",
"Name": "Harshal",
"Mobile": "16531015 0130",
"City": "Pune"
},
{
"Id": "A0250FDE-A421-FEC9-E67A-346A2630D48B",
"Name": "Indigo",
"Mobile": "16251026 8085",
"City": "Pietracatella"
},
{
"Id": "6DF038AD-690F-1F66-7BBA-0317095F2C16",
"Name": "Craig",
"Mobile": "16761004 2272",
"City": "Sawahlunto"
},
{
"Id": "E1896D0D-B52A-811E-98FF-54ED33B62A62",
"Name": "Kuame",
"Mobile": "16880609 0653",
"City": "Villeneuve-d'Ascq"
},
{
"Id": "D0E623AB-9D12-6879-E5C2-E9DEF3806F1F",
"Name": "Kelsie",
"Mobile": "16600216 8448",
"City": "Onoz"
},
{
"Id": "7CE3E05B-B9F1-14F1-5CD7-F0E097B7C34B",
"Name": "Glenna",
"Mobile": "16470806 0563",
"City": "The Hague"
},
{
"Id": "3304E741-A5D3-9DFD-9775-3241B6B268C9",
"Name": "Nicole",
"Mobile": "16381107 1830",
"City": "Budaun"
},
{
"Id": "11AFE4F1-BBB9-E71F-9B04-98C8886C4685",
"Name": "Eleanor",
"Mobile": "16220806 0521",
"City": "McCallum"
},
{
"Id": "D29A626D-BA9C-9A60-89FE-82CA62CA2113",
"Name": "Sara",
"Mobile": "16860606 9261",
"City": "Bevilacqua"
}
]
}
Result (Ids json array) as below
[
"173C0C69-C467-AC1D-E1EC-09329D5A55F3",
"A0250FDE-A421-FEC9-E67A-346A2630D48B",
"6DF038AD-690F-1F66-7BBA-0317095F2C16",
"E1896D0D-B52A-811E-98FF-54ED33B62A62",
"D0E623AB-9D12-6879-E5C2-E9DEF3806F1F",
"7CE3E05B-B9F1-14F1-5CD7-F0E097B7C34B",
"3304E741-A5D3-9DFD-9775-3241B6B268C9",
"11AFE4F1-BBB9-E71F-9B04-98C8886C4685",
"D29A626D-BA9C-9A60-89FE-82CA62CA2113"
]
Screenshot as below
Reference Material
Best way to compare json files online
Compare json files online.
Problem statement:
How can I compare whether two JSON objects are equal using online
tool/website, disregarding the order of lists?
first_sample.json document:
{
"errors": [
{"error": "invalid", "field": "email"},
{"error": "required", "field": "name"}
],
"success": false
}
second_sample.json document:
{
"success": false,
"errors": [
{"error": "required", "field": "name"},
{"error": "invalid", "field": "email"}
]
}
'first_sample.json' and 'second_sample.json' should compare equal, even
though the order of the "errors" lists are different.
Solution
- Sort both ('first_sample.json' and 'second_sample.json') file using Json sort online tool/website. ( json-sorter)
- Comapre json file using online compare tool/website. (diffnow)
Sort JSON screenshot as below
Compare JSON screenshot as below
Monday, 1 June 2020
Test Explorer (Visual Studio) shows 'Unknown Project'
Problem: Test Explorer (Visual Studio) shows '<Unknown project>'
Details: I created an class library project with Unit Tests project, and added a few unit tests. However, I have removed the failing test case from file but test explorer shows that Test Explore.
Solution
Steps as below
- Close Visual Sudio
- Go to project folder
- Find ".vs" folder. (Make sure your are also checking hidden item)
- Delete ".vs" folder.
- Good to go, Open visual studio, build and run project.
Saturday, 30 May 2020
Debugging Managed Async Code in Visual Studio 2019
Video - Load your gun in short time.
Reference Material
Wednesday, 15 April 2020
ASP.NET Core web API
Introduction to ASP.NET Core
ASP.NET Core :supports creating RESTful services, also known as web APIs, using C#. To handle requests, a web API uses controllers. Controllers in a web API are classes that derive from ControllerBase. This article shows how to use controllers for handling web API requests.
Saturday, 11 January 2020
Savvy SQL CHART (Book)
| Savvy SQL CHART (Book) |
|---|
|
Who is this book For?
if you can answer "YES" to all of these
Sample sql queries. Download Code
|
|
|






