Windows Desktop Search not returning QueryFocusedSummary - c#

When searching through files indexed using Windows Desktop Search,
it would be nice if I could see a snippet of the text within the
document that is related to the search text. However when I try to
retrieve "System.Search.QueryFocusedSummary" or
"System.Search.QueryFocusedSummaryWithFallback " I get a
"column name not found" error.
(The code that I am using to query this is shown in this question:
Microsoft Desktop Search - CONTAINS not returning results on windows server 2008 )
This is confusing because when you do a search within explorer,
you get the snippet of text in your results. So it's possible somehow.
According to this documentation http://msdn.microsoft.com/en-us/library/windows/desktop/bb760171%28v=vs.85%29.aspx
it should be retrievable, the same that AutoSummary is.
This question has already been asked on MSDN here:
http://social.msdn.microsoft.com/Forums/en-US/windowsdesktopsearchdevelopment/thread/dcfb40ea-b250-4294-80d0-727c7365745e/
but I'm hoping that the clever stackoverflow people can help me.
As a side note, I'm quite confused as to why this doesn't work, don't lots of
people need to index and search documents? Does everyone use Lucene and/or Solr
or Windows Search Server instead?

A colleague of mine ran into this problem recently. QueryFocusedSummary and QueryFocusedSummaryWithFallback are indeed not accessible via OLEDB. They are, however, accessible via Shell.
In the Windows SDK, there is a sample, $WIN_SDK/Samples/winui/shell/appplatform/ExplorerBrowserSearch, which will get you set up on using Shell functions to perform a search. From here, it should be trivial to add support for QueryFocusedSummary and QueryFocusedSummaryWithFallback via the Shell Property Keys PKEY_Search_QueryFocusedSummary and PKEY_Search_QueryFocusedSummaryWithFallback respectively.

Since you didn't post any code I have to speculate a bit...
I assume you are using OleDB/SQL to execute a query...
Neither QueryFocusedSummary nor QueryFocusedSummaryWithFallback are real columns and thus NOT available via OleDB/SQL !
The only columns available this way are AFAIK
AutoSummary
Contents
EntryID
GatherTime
Rank
Store
QueryFocusedSummary and QueryFocusedSummaryWithFallback are IIRC properties accessiable via COM or a Shell interface .

Related

How to get a JSON file (or something similar) with lightning data from http://en.blitzortung.org?

I am currently working on my school project - Android app that informs you about strong lightning strikes near your house in real time.
There are some websites like blitzortung.org or lightningmaps.org (or other), any ideas how can I get nice output file from one of these sites, so that I can obtain geographical data, determine whether it is near your house or not, and send a push notification for user? Displaying the strikes on the map are not needed.
I am using an Android Studio, Visual Studio 2015 as well as MS SQL database.
Thanks
You can get complete source code for this from following URL
https://github.com/wuan/bo-android
It's using data from lightningmaps.org
You can give a try to Open Weather or check this answer.
For Push you can use FCM. Just google "How to implement GCM in android?" you will whole lot of help.
According to blitzortung forum:
Please remember that Blitzortung data may not be used for commercial
purposes. General operator data access info: login to your main
Blitzortung Org account, and click the 'compendium' link under
'project area'. If you haven't already, you might also see
http://www.lightningmaps.org/doc/intro

Help with a dictionary+ application?

I am thinking of making a dictionary application with some changes to suit my needs.But the problem is that I can't figure out how to get the word-list with their meanings.Any idea what I can do?
I found a word-list but it just had words not their meanings.
Edit- I am unable to add a comment.
Though I found this:
http://wordnet.princeton.edu/wordnet/download/
I am trying to see if I can use it in my app.
it's a bit generic question. Are you thinking to store all words in a database with their meanings? For example I imagine you could have two tables ( at least ), word and meaning, meaning has a FK to word so you could have multiple meanings for the same word.
is this ok as starting point?
You basically should search for an open dictionary (check the license carefully!) you can access through an API or download a set of data to use it offline.
This sites should be helpful for a start:
Wiktionary
Open Source Dictionary Downloads

Implementing search in web application

I am implementing an eCommerce application using ASP.Net. I would like to know if custom Google search is sufficient enough or if we plan to go implement our search functionality.. how do we go about doing it?
Ideas and Suggestions and best practices are most welcome.
Regards,
Abdel Olakara
If you don't plan on using Google Search then you really have 2 options:
If you are using SQL Server you can put all of your site text into ntext or varbinary fields so that it is search-able. Then if you have files like PDFs etc you can put the files into a table as varbinary and create a Full Text Catalog to search them. For PDFs you will need to have iFilter installed, it is part of the free Adobe Reader package. There are other iFilters. Check out http://www.ifilter.org/ for more info on them.
If you are using asp.net hosted on a windows server you can use the Windows Indexing Service and put any of the data that you want into text file or any other file format. You might still need iFilters for those formats.
I would suggest option 1 if you don't go with Google. It can be a little more complex but option 2 can have the issue that everything starts to look like it is being saved in a giant heap. You can also do some combination of 1 and 2.
You might like to look at Lucene.NET http://lucene.apache.org/lucene.net/
I have spent many years implementing search engines and using an established 3rd Party tool like Lucene will save you a lot of heartache. There are many, many gotchas and edge cases with searching. These have been dealt with to a large degree in Lucene.
As I read it, Custom Google Search is about searching web pages in your site. Contrast this with searching database contents such as lists of products or reviews of items.
What are your requirements? My guess is that when I go to an eCommerce site (eg. Amazon or something such as Trip Advisor) I want to search content that is stored in databases. So I'm doubtful that this particular Google capability fits my expectations of eCommerce.

Windows App spellcheck

I was wondering if there is another way to spell check a Windows app instead what I've been of using: "Microsoft.Office.Interop.Word". I can't buy a spell checking add-on. I also cannot use open source and would like the spell check to be dynamic..any suggestions?
EDIT:
I have seen several similar questions, the problem is they all suggest using open source applications (which I would love) or Microsoft Word.
I am currently using Word to spell check and it slows my current application down and causes several glitches in my application. Word is not a clean solution so I'm really wanting to find some other way.. Is my only other option to recreate my app as a WPF app so I can take advantage of the SpellCheck Class?
If I were you I would download the data from the English Wiktionary and parse it to obtain a list of all English words (for instance). Then you could rather easily write at least a primitive spell-checker yourself. In fact, I use a parsed version of the English Wiktionary in my own mathematical application AlgoSim. If you'd like, I could send you the data file.
Update
I have now published a parsed word list at english.zip (942 kB, 383735 entries, zip). The data originates from the English Wiktionary, and as such, is licensed under the Creative Commons Attribution/Share-Alike License.
To obtain a list like this, you can either download all articles on Wiktionary as a huge XML file containing all Wiki- and HTML-formatted articles. This is then more or less trivial to parse. Alternatively, you can run a bot on the site. I got help to obtain a parsed file from a user at Wiktionary (I seem to have forgotten his name, though...), and this file (english.txt in english.zip) is a further processed version of the file I got.
http://msdn.microsoft.com/en-us/library/system.windows.controls.spellcheck.aspx
I use Aspell-win32, it's old but it's open source, and works as well or better than the Word spell check. Came here looking for a built in solution.

Searching the name of web pages according to the word entered in a textbox

I have a textbox and a button in one page.I want to enter a word in the textbox and click the button. After clicking the button I want to display the name of the web pages containing the word entered in the textbox. So please tell me how to do it? I am using C#.
So you want to create a search engine internal to your website. There are a couple of different options
You can use something like google custom search which requires no coding and uses the google technology which I think we all agree does a pretty good job compared to other search engines. More information at http://www.google.com/cse/
Or you can implement it in .net which I will try to give some pointers about below.
A search engine in general exists out of (some of) the following parts:
a index which is searched against
a query system which allows searches to be specified and results shown
a way to get documents into the index like a crawler or some event thats handled when the documents are created/published/updated.
These are non trivial things to create especially if you want a rich feature set like stemming (returning documents containing plural forms of search terms), highlighting results, indexing different document formats like pdf, rtf, html etc... so you want to use something already made for this purpose. This would only leave the task of connecting and orchestrating the different parts, writing the flow control logic.
You could use Lucene.net a opensource project with a lot of features. http://usoniandream.blogspot.com/2007/10/tutorial-implementing-lucenenet-search.html explains how to get started with it.
The other option is Microsoft indexing service which comes with windows but I would advice against it since it's difficult to tweak to work like you want and the results are sub-optimal in my opinion.
You are going to need some sort of backing store, and full text indexing. To the best of my knowledge, C# alone is not enough.

Categories