Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

Finding related items in OpenSearch between 2 datasets

I have a scenario where I have 2 sets of data: All possible products Products carried by a store Dataset 2 is a subset of dataset 1. If a user searches for a product that the store doesn't carry, I'...
Steven Evers's user avatar
  • 28.2k
0 votes
1 answer
75 views

How to architect an in-app search solution that accounts for access to data?

I have a lot of data that I would like to enable end-users to search on. I plan to use ElasticSearch (but am open to other technologies). This would also be an AWS native solution. For simplicity, let'...
alex's user avatar
  • 101
2 votes
2 answers
191 views

Best-first search on a graph

I am working through an example of best-first search on a graph, and I'm having some trouble understanding exactly what the process should be. This is the graph I have: The heuristic values are in ...
Gerhardus Carinus's user avatar
2 votes
1 answer
94 views

What are some architectures and designs I could use to optimize the performance of file text data lookups?

I would like to write a program that essentially handles text data and metadata of files locally on a machine's filesystem. There is no need for any network activity. I am working with large ...
the_endian's user avatar
  • 1,152
2 votes
1 answer
259 views

User (Actor) data shared across Domains / Microservices

I have read through a number of posts on Software Engineering but am unable to find a suitable solution for the problem my team and I are trying to solve. We are building a system where we have ...
Richard's user avatar
  • 73
3 votes
4 answers
2k views

HOWTO: Full-text search over an encrypted database?

I want to adhere to the best practices and obviously encrypt the data sent to me by user. And I also want to provide the full-text search feature to the user (user can only search their own data, if ...
miqem's user avatar
  • 105
-1 votes
1 answer
231 views

A data structure / algorithm to combine search tree and hash table?

I have a two dimensional data with one dimension is ordered and another one is categorical, for example, country and city_age: country age city Italy 2773 Rome Germany 784 Berlin USA 397 New York ...
Dims's user avatar
  • 157
14 votes
3 answers
5k views

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,...
Taco's user avatar
  • 1,165
1 vote
1 answer
340 views

How to search for Model Numbers that contain wildcards?

I have a database full of ModelNumbers that I want a user to be able to search for. The tricky part is that some of the model numbers have lots of funny characters including: * - Alphanumeric ...
Jess's user avatar
  • 137
0 votes
2 answers
93 views

Where to sync Database and Search-Database in MVC pattern

I have a website-sideproject (Application Server: Django, Database: sqlite) with "search" functionality and I've recently stumbled over this problem. When you have a full-text-search-...
Philipp Doerner's user avatar
0 votes
1 answer
79 views

Database schema for two different types of elements on map

I wrote a software for a customer that shows clients on a map (Google Maps). I store the clients on a table on the MySQL database (table clients) and show them on the map using markers. Each clients ...
Gianluca Ghettini's user avatar
0 votes
0 answers
109 views

Best choice for a holding large number of objects in java

I have a set of array, containing a large number of objects (products), which has lately grown so large, searching in it takes about a minute, which is considered too long, since one search is ...
kry's user avatar
  • 101
0 votes
1 answer
407 views

Websockets vs Ajax for live search

For building a simplistic live search system, I trying to decide whether to use Websockets or Ajax. Implementation wise, for every letter the user types (or maybe every 0.5 seconds), a database query ...
ahron's user avatar
  • 165
5 votes
2 answers
2k views

Finding closest point in N dimensions in reasonable time (O(log(n) ?)

Is it possible to find the closest point (or k closest points) to any arbitrary point in a set of n points (in dimension N)? When I write closest point, I mean smallest Euclidean distance. I'm looking ...
Fifi's user avatar
  • 159
0 votes
1 answer
330 views

AWS Architecture: How to search in Dynamodb?

Firstly, I want to state that this is my first time trying to build an app. I am doing this for fun, mostly as an exercise to learn system design/architecture. The goal is to build an app that would ...
fractalnature's user avatar
-4 votes
1 answer
511 views

Efficient database for multiple key searching?

I'm trying to implement a solution that stores every product from a shop, and then allows me to search them either by ID (an integer index), description (string) or barcode (string). The idea I came ...
lautar0's user avatar
0 votes
1 answer
78 views

Design Question: Compression with Fast Lookup

I have a multiple files (one per CountryCode) which all get ~5000 entries added to it per day. Each entry in the file looks like (256chars max): {countryCode_customerId:{"ownerId": "...
sync101's user avatar
-1 votes
1 answer
47 views

Equal transformations on both indexed content and query content before a search is attempted

In search engine indexing, a body of text is often processed before it is indexed. A common example is stemming, were words are reduced to their root form (plurals are dropped, tense is normalized). ...
Deane's user avatar
  • 171
0 votes
1 answer
221 views

Key-value database for dynamic/changing keys

I have the following dataset: [234,565,678,90,66,7,8,44,5] [275,23,54,34,5] [4745,23,54,4,556,65,89,5,4,569,87,412] [75,273,59,5,4,567,412] [44,34,556,69,5,4,569,812] Each array represents a web ...
AlphaNumerical's user avatar
0 votes
0 answers
316 views

Sorting and filtering: ElasticSearch vs MongoDB

This is a problem related to a typical e-commerce requirement. I am using ElasticSearch for all the below use cases. I am confused about whether or not to use MongoDB for the sorting part. I have the ...
rohanagarwal's user avatar
0 votes
0 answers
121 views

Searching/Hashing Wikipedia - at each position for keys 1..31 long, the fastest way?

A C coder here. My wish is to find the best way to search words and phrases within the ever-growing English Wikipedia XML dump. As a first layer/step, hashing is the answer, yes? The problem is that ...
Georgi's user avatar
  • 17
0 votes
1 answer
1k views

What is the correct architecture for 4 MVVM synchronized collections related to groups and filters inside a WPF application?

I have a small architectural problem with MVVM. In this question I will note Model through M and ViewModel through VM. I have 4 collections that must be synchronized, and the items in them must have ...
silviubogan's user avatar
-1 votes
1 answer
79 views

Which is better for my use case? A hybrid customer data model or a document store customer data model?

I am trying to get some preliminary insight into the pros and cons of using either a hybrid model (jsonb document-relational) or an all jsonb document store model for customer data in PostgreSQL. Both ...
TJP's user avatar
  • 7
0 votes
2 answers
233 views

Is all permutations of a string a good way to index full text search?

I am writing an application to be used as a local disc documents store similar functionality to Firebase or MongoDB. The gist of how it works is a column hash table. For example: Say I have a user ...
Sam Orozco's user avatar
0 votes
1 answer
265 views

Data backend for a 'Nearby' places application

Context I am building an application for searching places 'Nearby' akin to Yelp/Google. Objective for this question Recommend a strategy to do paginated searches based on location and ask for ...
p0lAris's user avatar
  • 109
0 votes
0 answers
58 views

How to combine multiple Tries for complex searching and filtering across tables?

Say I have a database with 100 tables. Scattered throughout the tables are some string columns for short things that could be considered usernames/tags/categories/hashtags/addresses/placenames/other ...
user10869858's user avatar
7 votes
1 answer
5k views

Does it make sense to use both Cosmos DB and Elasticsearch?

My app uses Cosmos DB to store data. I have a requirement to support full-text search, which Cosmos does not provide out of the box. One of the recommendations was to use Elasticsearch, and I have ...
me--'s user avatar
  • 213
5 votes
2 answers
508 views

Game Playing AI - Strategy to overcome the transposition table taking up too much memory?

I've made an engine that plays Connect Four using the standard search algorithms (minimax, alpha-beta pruning, iterative deepening, etc). I've implemented a transposition table so that the engine can ...
Inertial Ignorance's user avatar
2 votes
1 answer
521 views

Hashing tag list to perform faster search

I have a list of items. Each item have various properties. Each item can be tagged, like tagging a post here. Right now, tags are represented using a Tags property, that is a string and it looks like ...
BAD_SEED's user avatar
  • 267
1 vote
2 answers
2k views

How fuzzy search is implemented for file paths

Say I have file paths like this: my/long/directory/structure/index.js my/long/directory/structure2/index.js my/long/directory/structure3/index.js my/long/directory/structure.../index.js my/long/...
HareSurf's user avatar
  • 2,615
5 votes
1 answer
396 views

Design point for product search and auto-complete using Elastic search?

I need to implement product search using Elastic search similar to it is done on any scalable ecommerce site.I am planning below algorithm for this Whenever product is added to system, First add it ...
user3198603's user avatar
  • 1,896
1 vote
0 answers
60 views

Giving search on customizable fields

I have some user defined custom fields corresponding to a ticket (A ticket is an entity which has subject, status and custom fields). I need to search tickets based on its custom field values. A ...
Tuhin Dey's user avatar
17 votes
6 answers
8k views

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 ...
Danila Piatov's user avatar
2 votes
2 answers
431 views

Define a complex query in JSON sensibly

A bit of background. We are in the design phase of an HTTP API, and we are facing the question of how to define complex queries in JSON format. We have a items in our product that have A LOT of fields ...
GalacticDessert's user avatar
2 votes
1 answer
498 views

Data Structure for "Intuitive" Text Matching

I've noticed that text editors and such have a more-than-prefix/suffix-based pattern matching algorithm going on behind the scenes. And StackOverflow's tag matching algorithm does more than just ...
HareSurf's user avatar
  • 2,615
2 votes
1 answer
361 views

Algorithm: Binary Search / Tree / Partitioning on unsortable data?

First, this question is not really about binary search as I neither have sorted data, nor any sortable data at all. :-) W.r.t the "unsortable" claim see below; but I think the title term "unsortable"...
Martin Ba's user avatar
  • 7,647
-3 votes
1 answer
719 views

Design the cache and search feature like hotel booking?

I need to design the feature like in encommerce(consider hotel booking site) we can enter the keyword/partial-keyword and need to return the relevant results. For Example :- If site admin or hotel ...
user3222249's user avatar
4 votes
1 answer
291 views

What is the better search system, user defined tags or pre defined attribute fields?

I'm developing a marketplace application that will eventually list a large number of different types of items. Currently our search system (powered by Algolia) is built on pre defined attribute ...
rt_'s user avatar
  • 161
1 vote
1 answer
428 views

Data layer Abstraction from Business layer for search

This is regarding designing a search api. We have 3 tier architecture now using Spring MVC. All communications are via REST api. UI <-> Business <-> Data(sql). Now to implement faster ...
Renjith's user avatar
  • 123
2 votes
3 answers
712 views

Find the least words that will use all given letters

With a list of thousands of words and a small list of letters I am trying to find the least amount of words to make use of all given letters, assuming my dictionary of words covers all letters. The ...
kontur's user avatar
  • 131
0 votes
1 answer
1k views

An elegant way to detect the end of an asynchronous recursive file search?

Given a recursive subroutine in single threaded environment which starts numerous asynchronous I/O operations and registers callback functions for each of them. This callbacks will be called on the ...
atevm's user avatar
  • 111
3 votes
1 answer
5k views

Best method for Pattern Matching on Binary String?

I need to search a long string of binary string data (couple of megabytes worth of binary digits) for patterns of binary digits. There are about 100 000 different patterns to search for. Each is a ...
user289944's user avatar
5 votes
2 answers
1k views

Better to send all data to client or query server for every search?

I have a search function on my site that needs to search through ~2000 items (this table never changes, it will always have the same number of items) stored in MySQL. All it needs to do is search by ...
obl's user avatar
  • 159
1 vote
5 answers
346 views

Optimize non-trivial searches in vector of object pointers that share base class

I have an array that contains over 150,000+ object pointers of over 300+ different classes, but they all inherit from the same base class. Obviously that's very inefficient when we need to search for ...
Erunehtar's user avatar
  • 121
0 votes
3 answers
226 views

Strategy to update search index after fixing index generation

Describing the situation I'm working on an application (based on the Spring Framework) using a search index (lucene if that matters) to make content of that application searchable. Documents are ...
lucash's user avatar
  • 288
17 votes
1 answer
8k views

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 ...
senseiwu's user avatar
  • 668
1 vote
1 answer
250 views

binary search vs search with data samples

As long as I remember at least in older versions of Cassandra database, search was implemented in following way - During startup several samples are collected from sorted table and when data is ...
Nick's user avatar
  • 295
0 votes
1 answer
202 views

load more and Search Logic

Firstly i hope im in the right place to ask this question. I am building a web page that allows the user to select one image from a set of a 100+. i want to display them 6 at a time and the user ...
Lonergan6275's user avatar
1 vote
3 answers
3k views

Saving user searches to a database

My job is to come up with an implementation to save searches linked to an individual user, as well as the ability to analyze this data for business cases. The data will be used for users to see their ...
Soundwave's user avatar
  • 143
1 vote
3 answers
1k views

Which data structure is best for an auto complete drop down that learns?

I made an auto complete text box for an application I'm working on. The text box basically has an associated list that it searches each time you enter something in the box. If you enter something ...
namarino41's user avatar