search

Wrap text - case insensitive with php

If I search for tOm ArNfElD and the $variable is "Tom Arnfeld", I get great results form LIKE in MySQL (which is case-insensitive). How could I wrap the matched text in the $variable with a <span></span> to highlight to what part of the search matched the query? I need to retain the original case of the $variable. ...

PhP/MySQL Storing User Searches between Pages so the User Can Go Back to Them

I'm writing a php-mysql application. The application allows the user to run a search against the database. When the search is run, if the user clicks on the back button to go back to it after examining an item brought up by it, they are asked if they would like to resend the query (it uses post). Which would rerun the search in the da...

Implementing refined search - ASP.NET MVC

In my ASP.NET MVC application I have a view that displays a list of Products in the system. I would like to implement an option for users to filter the list of Products by selecting parametes, similar to the way it's done on www.codeplex.com. I would like to know how you would go about doing this in the most efficient and simple way? Any...

Efficient search in a corpus

I am having a few million words which I want to search in a billion words corpus. What will be the efficient way to do this. I am thinking of a trie, but is there an open source implementation of trie available? Thank you -- Updated -- Let me add few more details about what exactly is required. We have a system where we crawled news...

Proper mysql datastructure for a fulltext search...

Hoping someone can provide some mysql advice... I have 2 tables that look like this: searchTagsTable ID tag dataTable ID title desc tagID So the column "tagID" in "dataTable" is a comma-delimmited string of ids pointing to searchTagsTable. I'd like to use mysql's built in fulltext search capabilities to sear...

Searching strategy in an infinte list

I am listening to a 3rd party web-service, when the services starts it generates a stream of objects which I am receiving. I have to search for a specific object within given amount of time and do some processing if the object is found or throw an error in any of the below condition: The web-service stops and I haven't found the object...

Best way to implement <next>, <prev> element links from search list

Hi, In my web application I got a search results list (SR). The search is heavily parametrized. Each element on the list can be clicked and then the element's own page (EP) is displayed. Now, the customer wants to have the ability to go to previous and next element from the search list that was used to enter the element page. How wou...

Will a REST interface slow down my search engine?

To get a search website built quickly I plan to split the work between two teams: One to build the search engine and one to build web UIs (mobile/desktop). My plan is to build the search engine as a set of REST services based on .NET 3.5. UIs may be built using some other technology. Questions: is the REST interface likely to be a perfo...

Tweaking my search functionality

I have tested search functionality i have implemented on a live website. I came across some small issues. I can't put special characters in the search box or my application will crash. I tried to solve this using some replaces on the characters it crashes on, but this won't cure the pain. When i entered this sign: * into the searchbox it...

Find minimal and maximun date in array using LINQ?

I have an array of classes with a property Date, i.e.: class Record { public DateTime Date { get; private set; } } void Summarize(Record[] arr) { foreach (var r in arr) { // do stuff } } I have to find the earliest (minimum) and the latest (maximum) dates in this array. How can I do that using LINQ? ...

Script/software to search text in lots of script files in a folder

Hi, I want to search a word in lots of script files It may linux software or script Thanks ...

Security problem with custom search provider for Windows 7

I built a search provider for Windows 7. (using .osdx file and RSS web site) the element in the returned RSS contains local file path. example: <link>c:\windows\win.ini</link> The problem is that the files shown in the search result window with the following message: This item was blocked because of your Internet security settings...

Determining if a specific url is present on an external website

How can I go about seeing if a particular website has a specific link in its content? We have a situation where someone is not necessarily stealing our copyrighted content, but they are posting parts of it and linking to another site as the author and we're wanting to track each time they do this. Basically what I need is something tha...

Web Search API for 25000-50000 Entries (Java)

I have 20000-50000 entries in an excel file. One column contains the name of that company. Ideally, I would like search the name of that company, and whatever is the first result, I would select the URL associated with it. I am aware that Google (which my ideal choice) provides a AJAX Search API. However, it also has a 1000 search limit ...

Algorithm for approximate search in sorted integer list

Hi All, Consider an array of integers (assumed to be sorted); I would like to find the array index of the integer that is closest to a given integer in the fastest possible way. And the case where there are multiple possibilities, the algorithm should identify all. Example: consider T=(3, 5, 24, 65, 67, 87, 129, 147, 166), and if the g...

Sort by date using acts_as_solr

I have gotten sorting working from my rails application using acts_as_solr for text fields, as seen below with Title. I am having problems getting it to work for date. My model has the following class Article < ActiveRecord::Base acts_as_solr :fields[:title, {:title_s=> :string}, {:created_at_d => :date}] def title_s self.title en...

Use PDFLib to search through PDF's with PHP

Hi all, I'm about to rent my own server and for one of my projects I need to be able to search through PDF files. I've asked the hosting provider to install xPDF but they replied they want to install PDFLib instead. My question, am I able to open and search through PDF files with PDFLib? I'm Googling as a madman but I can't seem to find...

search database table for value and put it in a datatable

I have a textbox and a search button i trying to search file names in a database table and display them in a datatable... private void GetSearchResults(string machineID, string searchFileName) { DataTable dt = new DataTable(); SqlConnection connection = new SqlConnection(); connection.ConnectionString = ConfigurationManager....

How to show the recent search history menu while entering the text intp NSSEarchField?

Hi All, I am developing an application where the requirement is, while entering the search string into the NSSearchField I should have to show the, recent search history menu(just like safari).Is it possible? ...

Lucene.NET MultiSearcher

Hi, My sample code is: Searchable[] remoteSearch = new Searchable[sindexes.Length]; for (int i = 0; i < sindexes.Length; i++) { if(sindexes[i].Trim().Length>0) remoteSearch[i] = new IndexSearcher(sindexes[i]); } searcherPM = new ParallelMul...