Questions tagged [search]

Questions about search algorithm mechanics and implementation. *NOT* for questions about using search tools within an API (e.g. Google, Bing, Facebook).

Searching is one of the most common and important tasks in Computer Science.

The most basic search algorithm is a (also called "sequential search"). Each item in a collection of data is examined in sequence until the sought item is found.

If the collection in question has already been sorted, for instance, then a more efficient is possible.

Search can become more complex when, rather than finding one instance of a specific item, we want to find all items meeting a certain set of criteria. For instance a query can specify extremely complex search criteria, and much of relational database design involves the planning of an efficient way to perform those searches.

Another more complex search scenario is graph search, in which a series of nodes and edges must be traversed. Common algorithms for this domain include and . In many cases, a heuristic search algorithm such as can achieve more efficient results by making use of additional information about the problem.


Do not use this tag for questions about specific search tools within an API. Some more relevant tags for that would be the following:

37207 questions
8
votes
2 answers

plist or sqlite

I have to store a huge amount of data on IPhone then sort and search it as per requirement. Can anyone suggest to me which of SQLite or plist should I use? I was thinking of using SQLite. Which of plist and SQLite takes less processing time in…
Hab
8
votes
4 answers

google maps api v3 how to rank by closest distance

Does anyone know how to use the rank by distance search option that is mentioned here? https://developers.google.com/maps/documentation/javascript/places#place_search_requests Listing this in the request options doesn't seem to work. Here's my…
JFlo
  • 101
  • 1
  • 2
  • 6
8
votes
1 answer

Searching for filenames containing ! (an exclamation mark ) on Windows

On Windows 7, the following query used in folder search boxes fails to filter the files in a folder that have a "!" exclamation mark in them. filename:! Is there any way of doing this search please? Thanks.
AJP
  • 26,547
  • 23
  • 88
  • 127
8
votes
4 answers

How to show Google Search results embedded in my website?

I am using this code in my website to show Google search results for my website :
7
votes
3 answers

C++ set search for pair element?

So I have a set of pairs And I want to use find() to search for a single string which would be in the "first" of the pair, then if I find that string in first I want to return second from that function. My current attempt…
user1288735
  • 71
  • 1
  • 1
  • 2
7
votes
3 answers

How to search a big array for an object?

I had an interview today, I was asked how search for a number inside an array, I said binarysearch, he asked me how about a big array that has thousands of objects (for example Stocks) searching for example by price of the stocks, I said…
Majid Kamal
  • 363
  • 3
  • 7
  • 17
7
votes
1 answer

How to use Multi-Value Attributes (MVA) and facets together in Thinking Sphinx?

I've got rails 3 app with models: class Event < ActiveRecord::Base has_many :event_categories has_many :categories, through: :event_categories end class EventCategory < ActiveRecord::Base belongs_to :category belongs_to :event end class…
Nikolay Shebanov
  • 1,363
  • 19
  • 33
7
votes
2 answers

In vim, how do I make a custom word boundary motion?

As I understand, w recognizes word boundaries by splitting text into 3 groups: 1) characters that are specified in the iskeyword setting (alphabetic, digits, and underscore) 2) other non-printable characters (symbols) 3) whitespace characters Each…
Ein
  • 1,553
  • 3
  • 15
  • 22
7
votes
1 answer

Searching hard coded text in xcode

Hello I would like to localize my application, and the problem I have hard coded text all around the code also in the xib files. I would like quick way to externalize or better to get all hard coded text and put it in external file . if some one…
molwiko
  • 323
  • 1
  • 6
  • 14
7
votes
5 answers

Website Search Algorithm

How does the search algorithm on stackoverflow work? I need to implement a search functionality in one of my web sites.
Ramesh Soni
  • 15,867
  • 28
  • 93
  • 113
7
votes
3 answers

Unable to search effectively in Emacs

I want to have a similar tool in Emacs as the following in Vim :g/search/ to get a list of matches. How can you get a list of matches in Emacs?
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
7
votes
3 answers

How do I search for an executable file using python in linux?

How do I search for an executable file using python in linux? The executable files have no extensions and are in a folder together with files that have different extensions. Thanks EDIT: What I mean by search is to get the filenames of all the…
mikeP
  • 801
  • 2
  • 11
  • 20
7
votes
1 answer

Invoking a search or filter on an Android ListFragment?

I'm using the Android compatibility library, and I'm using a ListFragment. I have it set up to display the items in my list quite nicely. However, now I want to give the users the ability to filter/search the data. How do I set this up? Is it any…
s73v3r
  • 1,751
  • 2
  • 22
  • 48
7
votes
4 answers

PHP ldap_search size limit exceeded

I'm quite new to querying Microsoft's Active Directory and encountering some difficulties: The AD has a size limit of 1000 elements per request. I cannot change the size limit. PHP does not seem to support paging (I'm using version 5.2 and there's…
Envyrus
  • 315
  • 1
  • 3
  • 10
7
votes
3 answers

Search Dialog in Mono Android

I'm trying to implement a search dialog in a Mono Android app per the documentation here: http://developer.android.com/guide/topics/search/search-dialog.html I have an activity that the user should be able to search from: [Activity (Label =…
profexorgeek
  • 1,190
  • 11
  • 21