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
3 answers

How to use Morton Order in range search?

If I have a dataset, where the keys are points in 3D, represented by 3 signed 64 bit integers. And I want to use a (sorted)key-value store to store them, where keys are just byte array (but I can specify a comparator). I think I can turn all those…
Sebastien Diot
  • 7,183
  • 6
  • 43
  • 85
8
votes
2 answers

How to obtain the path in the "uniform-cost search" algorithm?

I have been going through the algorithm of uniform-cost search and even though I am able to understand the whole priority queue procedure I am not able to understand the final stage of the algorithm. If we look at this graph, after applying the…
Max
  • 9,100
  • 25
  • 72
  • 109
8
votes
1 answer

Control order of token filters in ElasticSearch

Trying to control the order that token filters are applied in ElasticSearch. I know from the docs that the tokenizer is applied first, then the token filters, but they do not mention how the order of the token filters is determined. Here's a YAML…
Clay Wardell
  • 14,846
  • 13
  • 44
  • 65
8
votes
3 answers

Ruby on Rails Ransack Datetime to date search

Like carvil I have in my model a datetime for created_at although I wanted the "equals" predicate to compare the created_at and a date (like '2012-09-26'). So I added in my model (in order to add casted attributes and take off the old…
user1700764
  • 81
  • 1
  • 3
8
votes
1 answer

How does Eclipse execute such a fast search for hits to a phrase/regexp

Eclipse searches across a large project for all matches to a phrase (even a regexp phrase) surprisingly fast. Do they use java.util.regex internally? I assume that they do not index with a search engine, because their searches are too slow for that,…
Andy Nuss
  • 745
  • 1
  • 7
  • 20
8
votes
1 answer

Why Lucene doesn't support any type of update to an existing document

My use case involves index a Lucene document, then on multiple future occasions add terms that point to this existing doc, that's without deleting and re-adding the entire document for each new term (because of performance, and not keeping the…
Gili Nachum
  • 5,288
  • 4
  • 31
  • 33
8
votes
9 answers

Which search technology to use with ASP.NET?

What's your preferred method of providing a search facility on a website? Currently I prefer to use Lucene.net over Indexing Service / SQL Server full-text search (as there's nothing to set up server-side), but what other ways are being used out…
Nick
  • 5,616
  • 10
  • 52
  • 72
8
votes
4 answers

web scraping to fill out (and retrieve) search forms?

I was wondering if it is possible to "automate" the task of typing in entries to search forms and extracting matches from the results. For instance, I have a list of journal articles for which I would like to get DOI's (digital object identifier);…
hatmatrix
  • 42,883
  • 45
  • 137
  • 231
8
votes
2 answers

Wildcard search in cassandra database

I want to know if there is any way to perform wildcard searches in cassandra database. e.g. select KEY,username,password from User where username='\*hello*'; Or select KEY,username,password from User where username='%hello%'; something like this.
user1556622
8
votes
2 answers

Is there a way to dynamically update a synonym file without restarting Solr server?

As we know there is a synonym.txt file in conf directory, which I wanted to update whenever I found some new synonym words... So is there any way to update that file dynamically without restarting the Solr server and will my search result consider…
milind_db
  • 1,274
  • 5
  • 34
  • 56
8
votes
3 answers

TreeView search

This function find only first node in treeview, that contains SearchText. private TreeNode SearchNode(string SearchText,TreeNode StartNode) { TreeNode node=null; while (StartNode!= null) { if…
Romz
  • 1,437
  • 7
  • 36
  • 63
8
votes
3 answers

how to sort geographical data for quick search

I have some objects that are geo-localized (I have for each object the latitude + longitude). My App needs to display the objects that are 3 kilometers around the GPS position of the mobile device. I have several thousands of objects and they are…
sebastien
  • 2,489
  • 5
  • 26
  • 47
8
votes
2 answers

python search with image google images

i'm having a very tough time searching google image search with python. I need to do it using only standard python libraries (so urllib, urllib2, json, ..) Can somebody please help? Assume the image is jpeg.jpg and is in same folder I'm running…
user1488252
  • 117
  • 1
  • 2
  • 3
8
votes
3 answers

Datatables - how to pass search parameter in a url

I would like to be able to make a link to a page with a datatable which would pass a search parameter value in the url. The goal is to have the page with the datatable open pre-filtered with the search value parameter. I've set up a jsfiddle to…
lbriquet
  • 541
  • 3
  • 12
  • 27
8
votes
1 answer

Perform search query in Outlook

Hello I am wondering if it is possible to send a search query to Outlook 2010 from my WinForms app. That is, not search the .PST file as I've been searching around and finding, I'm trying to display a list of results in Outlook as if I typed in the…
ikathegreat
  • 2,311
  • 9
  • 49
  • 80