how to implement internal website search in asp.net - asp.net

I did lot of R & D to implement website internal search in asp.net.
I have found a good article in code project
http://www.codeproject.com/KB/applications/SearchDotnet.aspx
It has some limitations
Search with special characters is not working.
Pdf and word documents are not searching.
Not able to high light the searched text.
If I am implementing this in master page then child title is not displayed in result page.
Requirement:
I need to implement search result should be like this http://www.google.com/search?q=internal+search+in+asp.net&sourceid=ie7&rls=com.microsoft:en-US&ie=utf8&oe=utf8
In description the search text must be highlighted.
Note: I need to implement this with coding not any 3rd party tool (I know lots of 3rd party website which do free hosting but they will post there adds and logo). Moreover i dont want to use any database for this internal searching
Please suggested and provide me some good links.

You could look at using Lucene.Net (http://lucene.apache.org/lucene.net/) to index your site. This is a tool but it is open source and requires you to do some of the work so I'm not sure if this meets your criteria or not.
For an example of how it works you can try searching on their site:)

Given your requirements there aren't too many options.
The only one I can think of is using Microsoft Indexing Service. Here is an example for using that to search a website in .net
https://web.archive.org/web/20211020134956/https://www.4guysfromrolla.com/articles/033005-1.aspx
If you have content in a database you could use Microsoft Full Text Indexing to create a search table and go from there.

Related

WYSWYG web editor for Sharepoint

Is there any approach to have a simple WYSWYG free web editor (preferably drag'n'drop widgets -based) embedded or integrated into Sharepoint 2010?
I am shocked because this answer seems to not exist... So far I've found...
Plugins for integrating Sharepoint into Drupal, Joomla or Wordpress, but I want the opposite, using those interfaces to create content stored in Sharepoint, without having to export HTMLs and adapting them to SP arquitecture and metadata. If not, I cannot even find any way to export a Wordpress/Drupal site into Sharepoint.
Web content rich editor: Am I doing something wrong is this just an html loader that does not edit a thing?
Webparts: all seem to be costly, and I am not sure there even exists a nice one for that concrete task
Could somebody point me to the most optimal solution for non-tech users using this feature? Thank you
By the way, is there any public web part repository from microsoft. Even searching that in google does not throw any interesting info..
Most public, open source projects for Microsoft can be found at http://www.codeplex.com/.
Regarding your requirement, if I understand correctly, you want to have a way to store content in SharePoint for display in a drupal or other CMS. The content should be in HTML format. If I understand you correctly, the easiest way to do this is to create a basic SharePoint list, add a multiline column and set the type of text to Enhanced rich text (Rich text with pictures, tables, and hyperlinks). When you add an item to the list, the form will include a form element that has a WYSWYG editor.
I've integrated SharePoint with Linux before using Curl. It's not easy, but can be done.

Embed editable MS Word document on web page

I need to present Word and PDF documents in a read-only preview, via an ASPX/HTML page to my internal users. In a related requirement, I need to present editable Word documents, via ab ASPX/HTML page, to parties outside of our network - effectively the public.
We cannot rely upon Word or Adobe-type PDF plugins being available on the destination PC.
Can anyone suggest a way to do this?
Edit - For clarity, the document/data would ideally stay on our own servers.
What about using Google Docs API? You could use either their word-like doc or a form to get the data you need, and then present that internally.
Not sure if this meets all of your requirements, or is an available option.
For our company, we have a few tools that utilize Google Docs. We upload data dynamically to them for specific needs.
Based on your requirements, maybe it's best to just write your own. I haven't created a Rich Text Editor. But it looks like there are quite a few tutorials online. Here is a basic tutorial for a rich text editor. It's using javascript, HTML, & CSS. If you prefer to not use js, then you may need to look for other tutorials.
This isn't the most glamorous solution, as it looks like the users view would be HTML. I'd think you could have it updating dynamically off to the side with an actual rich text view (similar to how Stack Overflow has theirs below an answer or question being written).
Update
Over the weekend I was exploring HTML5's contenteditable attribute, I came across an editor that builds off of that called Aloha Editor. It's a WYSIWYG type editor. But if that's something that you desire for your clients, than this would probably be a pretty simple integration. I have yet to use it, but it seems like it would be a great fit - if you decide to go the route of building your own editor.
You could use the Zoho API or, if you need to keep all data on your own servers and validated clients at all times, you could try the Aspose components.
If you're interested to provide documents in a view-only way then you can try GroupDocs as well: http://groupdocs.com/. They offer viewers for different file types which you can add to your website very easily: http://groupdocs.com/apps/viewer.
Since you need to keep data on your own server, aceoffix can be one of your alternative. It is a plugin installed on your own server and save all data on your server too.

Can I extract google custom search results to determine output in a .NET site?

I'm working on have a property listing asp.NET website and the current search function is pretty crappy. I want to know if I can use the Google Custom Search API to extract the results but still present them in the same way there are now (comprehensive listing items with pricing, images, etc. Here's the current look: http://temporadaplus.com/Aluguel-Por-Temporada.aspx?pais=Brasil ). Each listing item is created via a .NET itemtype. SO basically all I need is to know how to go about using Google's much better results without altering anything visually.
I came across this question here but I am not sure its exactly what I;m looking for. Any ideas or comments are appreciated.

ASP.NET search website

I have a issue designing am asp.net site.
The problem is that I want to have a search component that searches article titles.
Also I want to catch closely words.
Since there are tens of thousands of articles I cannot run SQL directly.
Can you give me a hint... or some good articles how to design a search component?
Thanks.
Why not use MS Search Server Express Edition to index your contents and then use MS Search Server API to query and display results? This question has some information about it if you are interested.
Another alternative is to use Google to index and search your website for you using their custom search service:
http://www.google.com/cse/
The downside with this service is you get a bit less control over exactly what gets indexed on your pages, and can only search on terms directly visible on the pages, but the upside of course is you don't have to do much to get up and running.

What's the fastest way to get the info I need from MSDN?

In PHP, if I need info on a function I can just type http://php.net/function-name. If the function doesn't exist it performs a search of all functions. The documentation for every function is usually 1 page long and contains all relevant info needed (params, return types, sample code, comments, special cases).
When I search for something on MSDN it usually takes 2-3 clicks before I can even get to what I was looking for.
Since I spend a good amount of time trying to extract very basic information from MSDN, is there a website or service that condenses this information for quicker easier access?
For example, I know for Java there is http://javadocs.org/ which makes it easier to find documentation (http://javadocs.org/Color redirects to http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Color.html)
Does anything like this exist already? Thanks.
Use Google and specify site:msdn.microsoft.com
http://www.google.com/search?q=system.net.mail+site%3Amsdn.microsoft.com
Note: I also use this method to search SO -- Google using site:stackoverflow.com
I asumme you use Visual Studio. So if you want to find out something about ClassX for example, just place the cursor on it, and press F1.
If I do this on the FileInfo class in Visual Studio, I get http://msdn.microsoft.com/en-us/library/system.io.fileinfo.aspx.
I find it much easier to use google and just type in something like "msdn [what I am looking for]". It tends to come up with better results than trying to fiddle my way through MSDN's website.
google ==> site:msdn.microsoft.com + keyword :)
there even is a custom google search for that: MSDN Search
Ask StackOverflow
Use Google
Note that using the search box in MSDN isn't even in most people's answers.
Use an Open Search plug-in for your browser. Like these ones. IE7, Fire Fox (and I think) Chrome use these. Chrome's implementation integrates with the address box, whereas Fire Fox and IE have a specific search dialogue in the top corner.
As others have said, MSDN falls into the category of sites of which it can be said: "Google searches X better than X searches X". Notable peers include Wikipedia and StackOverflow.
To make using google easier, google will allow you create custom search engines that are not only limited to searching within a specific site, but also allow you set up other requirements. For example, if you click on my name to see my SO user profile, you'll see I have MSDN and StackOverflow search links in the box at top right. I don't have it working just yet, but eventually I'll have the StackOverflow search setup to only return questions pages and exclude the user pages or tag pages.
That said, one thing you're missing is that when you're using a Microsoft language, you're probably also using Visual Studio. And if that is the case, the intellisense hints have the information you need 90% of the time. So in that sense it's even better than php, because you don't even need to open a web browser.
MSDN uses the following URL format for the most recent version of the documentation:
http://msdn.microsoft.com/en-us/library/[Namespace.Class.Etc].aspx
In Firefox, you can create a bookmark of the form:
http://msdn.microsoft.com/en-us/library/%s.aspx
Give it a Keyword, i.e. "msdn" and then type in your location bar:
msdn system.web.ui.webcontrols
And FF will take you to:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.aspx
Chrome will also let you set up a search like this, and you can also create a custom search provider for Internet Explorer using the test url:
http://msdn.microsoft.com/en-us/library/TEST.aspx
MSDN Developer Library is vast; I agree that can be cumbersome to find things manually, so I don't bother.
In fact, usually if you just specify the function name, Google will list MSDN on the first two or three options.
There is also the little known ...
http://www.google.com/microsoft.html
... not MSDN specific, but it works. :)

Resources