Questions tagged [search]

Looking for specific data to be found in a large data structure, a database, or a stream of data. For database queries with well identified search criteria, use the query tag.

A search retrieves specific data in a large data structure, a database or a stream of data.

This topic is about:

  • search algorithms and techniques,
  • data structures that are designed especially for search operations,
  • criteria to be used to find data

Disambiguation

Use for questions related to queries of databases, when the criteria to be used to find the data are well identified.

Use and for the graph exploration and graph traversal algorithms (e.g. breadth first, depth first, A*, ...).

171 questions
58
votes
2 answers

How would you implement Google Search?

Supposed you were asked in an interview "How would you implement Google Search?" How would you answer such a question? There might be resources out there that explain how some pieces in Google are implemented (BigTable, MapReduce, PageRank, ...),…
ripper234
  • 1,114
  • 1
  • 8
  • 13
49
votes
8 answers

How to Properly Google for C

The problem with trying to use Google to find tutorials or answers for the C programming language is that C is not an expressive enough name to narrow down the searches. Even coupled with keywords like "Programming" and/or "Language" yields results…
AndrewKS
  • 1,073
  • 9
  • 16
19
votes
1 answer

How should HTML data formats be applied in everyday situations?

Given Google's shift towards a stronger focus on page markup data, how do the data formats used in Schema.org work alongside those for Microformats? How do these (and other specs) compliment each other and which should be used in preference in…
Phil.Wheeler
  • 1,298
  • 3
  • 12
  • 20
17
votes
6 answers

Foreach-loop with break/return vs. while-loop with explicit invariant and post-condition

This is the most popular way (it seems to me) of checking if a value is in an array: for (int x : array) { if (x == value) return true; } return false; However, in a book I’ve read many years ago by, probably, Wirth or Dijkstra,…
17
votes
1 answer

Search across data cross several microservices

I have data for a certain domain distributed between a microservice and a legacy database. I have a search which spans fields on both legacy and microservice database. Previously (before microservice split), it was done with 1 sql query. Now I need…
senseiwu
  • 658
  • 6
  • 14
17
votes
9 answers

Find a "hole" in a list of numbers

What is the fastest way to find the first (smallest) integer that doesn't exist in a given list of unsorted integers (and that is greater than the list's smallest value)? My primitive approach is sorting them and stepping through the list, is there…
Fabian Zeindl
  • 318
  • 1
  • 2
  • 8
16
votes
1 answer

How is machine learning incorporated into search engine design?

I am currently building a small in-house search engine based on Apache Lucene. Its purpose is simple - based on some keywords, it will suggest some articles written internally within our company. I am using a fairly standard TF-IDF scoring as a base…
15
votes
6 answers

Importance of learning to google efficiently for a programmer?

This is not a debate on usage of Google being good or bad for programmers. Kindly refrain from doing so in your answers. Most people (a vast majority of who use the Internet) use Google these days. What I am talking about is this, 20 Tips for More…
Aditya P
  • 3,537
  • 2
  • 26
  • 42
14
votes
3 answers

What are the complexities of a binary search?

I recently asked a question on CodeReview SE where using a binary search was recommended, and the author of the answer proved that it was faster than my implementation. During my research on the topic, I came across a table that shows the…
Hazel へいぜる
  • 1,165
  • 1
  • 8
  • 19
13
votes
4 answers

Database fuzzy search concept

I thought about this, and have been trying to come up with solutions on how to fuzzy search a database, if for say example a user types a spelling mistake. Any glaring problems with the logic behind this? Will it work and has it been done before? …
Tom
  • 681
  • 6
  • 15
12
votes
5 answers

How come the computer doesn't have to read the entire table when the column is indexed?

Let's say a table with two columns has 100 quadrillion records. And I want to find a record that has column #2 equal something. If column #2 is indexed it returns the result immediately, but if it's not the computer has to read the entire table so…
user1806244
  • 167
  • 7
11
votes
11 answers

Does searching documentation and samples look bad?

I am starting a new job in a company with many developers and media people, the layout of the place is open with computers around a skinny oval, I have worked in small teams and programming embedded C, the jobis for objective C I'm still in a medium…
11
votes
1 answer

A filtering logic should be in a repository or in a service?

I'm wondering the following: suppose we are building a system where there needs to be some filtering functionality to search for some entity. For example, one might want to apply the filtering to a table listing the entities to find something, or…
user1620696
  • 4,817
  • 7
  • 31
  • 46
10
votes
8 answers

Why is it so hard to find anything on MS site?

I have always had this question in my mind and I would really be happy to get an explanation for this. Is it only me or do you also feel the same way that it's hard to find anything on MS site. For example, every time I need to download .NET…
Amir Rezaei
  • 10,938
  • 6
  • 61
  • 86
10
votes
1 answer

Partial name matching in millions of records

We have developed a web based application for name matching. It operates by breaking names into parts and the Soundex value of each part is stored in a database. The Levenshtein distance metric is used to apply percentage matching of sound as well…
bjan
  • 229
  • 1
  • 8
1
2 3
11 12