search

How to jump to an occurrence from Vim search list

In Vim editor I opted ]I on a function (in C++ code). This presented a list, which says 'Press ENTER or type command to continue'. Now to jump to an occurrence say 6, I type 6 - but this is not working. What commands can I type in such case, and how do I jump to N occurrence from this list? Update: Actually I tried :N (eg :6) - but ...

Reusable code / class Repositories

I've got several modules containing functions, classes and templates that I keep in a directory called (hah!) 'reuse'. I know the content reasonably well, so to find a particular class or bit of code doesn't take too long, but it is slowly growing in size and I need some sensible method to store them for easy search & retrieval. How sho...

PostgreSQL's and MySQL's full text search

How do the full text search systems of PostgreSQL and MySQL compare? Is any clearly better than the oder? In which way are they different? ...

What is search.twitter.com's "trending topics" algorithm?

What algorithm does twitter use to determine the 10 topics that you can see at search.twitter.com? I would like to implement that algorithm and I would also like to show the 50 most popular topics (instead of 10). Can you describe the most efficient algorithm? Thanks! (Twitters API can be found at- http://apiwiki.twitter.com/REST%20API...

Searching/reading another file from awk based on current file's contents, is it possible?

I'm processing a huge file with (GNU) awk, (other available tools are: Linux shell tools, some old (>5.0) version of Perl, but can't install modules). My problem: if some field1, field2, field3 contain X, Y, Z I must search for a file in another directory which contains field4, and field5 on one line, and insert some data from the found...

Best way to search in a table and get results and number of results (MySQL)

I have a table of "items", and a table of "itemkeywords". When a user searches for a keyword, I want to give him one page of results plus the total number of results. What I'm doing currently is (for a user that searches "a b c": SELECT DISTINCT {fields I want} FROM itemkeywords JOIN items WHERE (keyword = 'a' or keyword='b' o...

Dynamic search and display

I have a big load of documents, text-files, that I want to search for relevant content. I've seen a searching tool, can't remeber where, that implemented a nice method as I describe in my requirement below. My requirement is as follows: I need an optimised search function: I supply this search function with a list (one or more) partia...

Using Lucene to count results in categories

I am trying to use Lucene Java 2.3.2 to implement search on a catalog of products. Apart from the regular fields for a product, there is field called 'Category'. A product can fall in multiple categories. Currently, I use FilteredQuery to search for the same search term with every Category to get the number of results per category. This...

What's the best way to search a MySQL database with PHP?

Say if I had a table of books in a MySQL database and I wanted to search the 'title' field for keywords (input by the user in a search field); what's the best way of doing this in PHP? Is the MySQL LIKE command the most efficient way to search? ...

Fast way to search for particular string (or byte array) in another process memory in C#?

Please post a working source code example (or link) of how to search string in another process memory and getting offset of match if found. The similar way its done in game cheating utils which search for values in game memory using ReadProcessMemory. ...

Singular/plural searches and stemming

I'm discovering a simple solution for singular-plural keywords searches. I heard about stemming but I don't want to use all its features, only plural/singular transformation. The language is Dutch. Have looked at http://www.snowball.tartarus.org before. Does anyone know the simple solution for singular|plural relevant searches? Thanks in...

Search file in directory using complex pattern

I am looking for a C# library for getting files or directory from a directory using a complex pattern like the one used in Ant: dir1/dir2/**/SVN/* --> Matches all files in SVN directories that are located anywhere in the directory tree under dir1/dir2 **/test/** --> Matches all files that have a test element in their path, including t...

Fast Text Search Over Logs

Here's the problem I'm having, I've got a set of logs that can grow fairly quickly. They're split into individual files every day, and the files can easily grow up to a gig in size. To help keep the size down, entries older than 30 days or so are cleared out. The problem is when I want to search these files for a certain string. Right n...

Searching date meta tags in Sharepoint

I'm currently looking at indexing an ASP website from Sharepoint and I need to replicate the old "advanced search" schema that the users are familiar with. In order to do this I need to index a few meta tags from the web pages. This is easily done and for the text fields I can use them in the search as well. However for date meta tags, l...

.NET - Find all references of property assignment

Hello, I am using VB.NET. In Visual Studio, if I right-click a property name and click "Find All References", it searches for all instances of the property being used. However, a property is always used either for assignment (Set method) or retrieval (Get method). Is there any way of searching for only one of these uses? e.g. search fo...

Could you recommend an unstructured data indexing software?

I am collecting logs from several custom made applications. Each application has it's own log format. What I'm looking for is a central tool which would allow me to search through all of my logs. This means the tool would have to be able to define a different regex (or alike) for each log file (marking where a record begins, ends, and wh...

JavaScript: case-insensitive search

Hi everybody, I'm trying to get a case-insensitive Search with two String in JavaScript working. Normally it would be like this: var string="Stackoverflow is the BEST"; var result= string.search(/best/i); alert(result); The /i flag would be for case-insensitive. But I need to search for a second string, without the flag it works per...

Search Ranking/Relevance Algorithms

When developing a database of articles in a Knowledge Base (for example) - what are the best ways to sort and display the most relevant answers to a users' question? Would you use additional data such as keyword weighting based on whether previous users found the article of help, or do you find a simple keyword matching algorithm to be ...

What is the difference between Python's re.search and re.match?

What is the difference between the search() and match() functions in the Python re module? I've read the documentation, but I never seem to remember it. I keep having to look it up and re-learn it. I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head. Or at least I'll have a better p...

Best way to add full web search to my site?

I need to add full web search to my site. I need something like Google Custom Search but with no ads and it has to be free. Any recommendation of a web service or open source project that can index my site and allow me to search it will be helpful. My site is made in ruby on rails, if that helps. I'll make this question community-wiki ...