mnish
mnish

Reputation: 3897

java complex search

I am trying to build a java based web application using Spring Boot and REST architecture using Spring MVC for the following purpose:

Search car parts through multiple set of criteria.

I try to explain it in different scenarios:

My primary concern at this moment are the following two questions:

  1. How should I model the data so that the search scenarios are achieved efficiently? What I mean is that how the relation between the entities in the Java and the persistence system should look like?
  2. What kind of database should I use? SQL or NoSQL?

All the REST end-points will return Json objects. I will be using Angular with Bootstrap for the front-end

Upvotes: 1

Views: 179

Answers (2)

Marco Altieri
Marco Altieri

Reputation: 3818

Isn't this scenario a typical "faceted search"? I think that any solution designed to implement faceted search should work fine. For example Solr or Elasticsearch.

The advantage of the "faceted search" for the end users is the option to refine the search. Users can start with a broad search and the system will provide refining filter criteria, based on the current search results.

Today, all the major e-commerce sites have a kind of faceted search and every search engine support this type of browsing.

It seems to me that engines like Solr and Elasticsearch are the more natural solution, but even a standard RDBMS like Oracle has support for faceted search.

Faceted search in Solr

Filters vs. Facets: Definitions

Upvotes: 2

Medu
Medu

Reputation: 133

I would put the focus on modelling it cleanly rather than efficiently - unless you already know that you will have a massive amount of data. Having it structured cleanly will make it easy to optimise if that is required later.

Normalise your data - there will be plenty of information out there on how to do this. The car industry is becoming more consolidated so many parts are now shared across different models and even different brands.

An ORM like hibernate can be used to map your entities to your tables. Spring provides extra support in this area which you might consider as you are already plan on using Spring MVC.

Upvotes: 1

Related Questions