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
7
votes
2 answers

not working on iPhone Mobile Safari

Supposedly in HTML5 in Safari, you can define your input type as "search" and when the user starts typing, an X button will show up to allow them to clear, much like the Google search bar in Safari. On my website, this works on desktop Safari but it…
sxflynn
  • 211
  • 1
  • 5
  • 17
7
votes
4 answers

updateSearchResults() not getting called

I have read similar problems and solutions on SO. But none seems to solve my problem. I am using Custom Search Controller and Custom Search Bar and func updateSearchResults(for searchController: UISearchController) is not getting called. var…
Molly
  • 247
  • 4
  • 15
7
votes
2 answers

How should I do full-text searching on App Engine?

What should I do for fast, full-text searching on App Engine with as little work as possible (and as little Java — I’m doing Python.)?
Alan H.
  • 16,219
  • 17
  • 80
  • 113
7
votes
3 answers

Duplicate substring searching

Is there any efficient way to find the duplicate substring? Here, duplicate means that two same substring close to each other have the same value without overlap. For example, the source string is: ABCDDEFGHFGH 'D' and 'FGH' is duplicated. 'F'…
maple
  • 1,828
  • 2
  • 19
  • 28
7
votes
10 answers

Optimal LIKE search in SQL

I have a parts database that I am going to be constantly querying for a quoting system. The parts database has 1,400,000+ records in it. The users are just going to start typing part numbers, which they expect the system to be able to find after…
Michael Bray
  • 14,998
  • 7
  • 42
  • 68
7
votes
2 answers

Flex Matching Many Database Records (Quicksilver-like or Launchy-like matching)

Assume I have a database table with many names. I'd like to "flex match" against these names. I'm not sure if "flex match" is the proper term to use, but let's go with that for now. There have been similar discussions on "fuzzy matching," but I'm…
Ryan McGeary
  • 235,892
  • 13
  • 95
  • 104
7
votes
1 answer

Search bar in Laravel 5.3 to filter the table

1) I added the search bar to the view : {!! Form::open(['method'=>'GET','url'=>'home','class'=>'navbar-form navbar-left','role'=>'search']) !!}
AlmoDev
  • 969
  • 2
  • 18
  • 46
7
votes
4 answers

Searching Techniques Recommendations

This is more of a theory question rather than practice. I'm working on a project which is quite a simple catalog of links. The whole model is similar to the Dmoz or Yahoo catalog, except that each entry has certain additional attributes. I have…
kovshenin
  • 31,813
  • 4
  • 35
  • 46
7
votes
4 answers

Blogger multiple label search

on any blogspot blog, if you click on a label, it will do a search for you on all the blog, showing stuff tagged with that label. is there a way to do that again? i mean to search for 2 labels. I want to see all the posts that have both labels. is…
Ash
  • 1,269
  • 3
  • 25
  • 49
7
votes
4 answers

Search array of object with filter and keyword

I have an array, filter and keyword. i want to search in that array using filter and keyword, with result array of object too. Just like first array. var data = [ {email: "usera@gmail.com",nama:"User A", Level:"Super Admin"}, {email:…
7
votes
3 answers

Double tap necessary to select TableView item with Search Bar

I have a UITableView with a search bar as header. I use this function to update my data when the user does a search in the search bar. func updateSearchResults(for searchController: UISearchController) { if let searchText =…
Melanie Journe
  • 1,249
  • 5
  • 16
  • 36
7
votes
5 answers

How to extract all possible matching arrays of objects from one array of objects?

I have an array of objects, e.g. var arr = [ {"a": "x"}, {"b": "0"}, {"c": "k"}, {"a": "nm"}, {"b": "765"}, {"ab": "i"}, {"bc": "x"}, {"ab": "4"}, {"abc": "L"} ]; Let's say I am only interested in objects whose…
lyrically wicked
  • 1,185
  • 12
  • 26
7
votes
1 answer

How do I hook the hardware search button on WP7

I have a WP7 app that has a search page. I would prefer to hook the hardware search button rather than having to add search icons to the menu bar. Has anyone figured out how to do this?
Steve Chadbourne
  • 6,873
  • 3
  • 54
  • 82
7
votes
3 answers

Software alternatives to Google Search Appliance (GSA)

I am interested in software alternatives to the Google Search Appliance (GSA) for use in a (large) university context. Has anyone experiences of migrating from GSA to an alternative solution? If so, what were the reasons for doing this (technical,…
Brian kelly
  • 79
  • 1
  • 2
7
votes
2 answers

Looking for a basic PHP / MySQL search class

Noob-ish question: I'm looking for a lightweight but decent php way to search all fields of a MySql table, regardless the structure. I first gave it a try on my own with the default mysql select but that's too basic. I'm looking for something that…
pax
  • 482
  • 8
  • 26
1 2 3
99
100