smart database search

Spartaniz

Expert Member
Joined
Oct 7, 2008
Messages
1,215
Hi geniuses.

Firstly, i have no knowledge of coding or any form of software development- so i hope what I am going to ask will make sense.

I have someone working on a project for myself where a lot of data will be stored in a SQL database.

I want a search engine where someone can type a sentence and the database will be searched. I want the searches to be recorded and be able to be optimized.

say someone searches for an apple and banana pie, the search results will then display three things, apples, bananas and finally the apple and banana pie. The person will click the last result, as that was what the person was looking for. I want this to be recorded so the engine will know to display the option on top the next time.

Al the info should be stored on the server.

Basically, the search should learn with time- be smart.

I did google for a few things, but I don't actually know what to look for- can someone point me in the right direction?

Regards
 

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
36,741
What exactly are you looking for?

Its simple logic that needs to be coded, something like a hit count for each of the options, and then sort by hit count, then name. (hit being a click)

The first time a query returns, it'll be sorted by name because all the terms will have a hit count of 0, the second time one of the results will have a hit count of > 0, so it'll be first, then by name.
 

House

Banned
Joined
Aug 17, 2006
Messages
5,482
What exactly are you looking for?

Its simple logic that needs to be coded, something like a hit count for each of the options, and then sort by hit count, then name. (hit being a click)

The first time a query returns, it'll be sorted by name because all the terms will have a hit count of 0, the second time one of the results will have a hit count of > 0, so it'll be first, then by name.
Or, assigning a percentage model in terms of accuracy on a specific table / field entry, and displaying results according to averages. Will almost work the same than the hit count model.

Could also work based on a hit count on what results a visitor clicks on...
 

InvisibleJim

Expert Member
Joined
Mar 9, 2011
Messages
1,018
Sounds like you want a free text search facility. Some relational databases support this (such as MySQL if you use the MyISAM engine I think) or you could incorporate a search engine such as Sphinx or Lucene.
 

_kabal_

Expert Member
Joined
Oct 24, 2005
Messages
2,725
Elastic search. Simple to implement, way more so than solr or vanilla lucene.

Except it will work correctly first time. The first result will be the most "relevant", ie apple and banana pie
 
Last edited:

shauntir

Well-Known Member
Joined
Sep 11, 2013
Messages
457
It seems like you are looking for full text searching but with some key phrase ordering/ranking functionality.

Elastic search. Simple to implement, way more so than solr or vanilla lucene.

Except it will work correctly first time. The first result will be the most "relevant", ie apple and banana pie
^ this seems like a better long-term bet.

Kabal, I had a look (just a read) through solr quickly once before. Was really impressed. I assume you've implemented this before? If so, what type of application. Also, when you say "easy", care to share a quick overview of how easy? :)
 

_kabal_

Expert Member
Joined
Oct 24, 2005
Messages
2,725
the nice thing about elastic search, is that it is schemaless. you can basically start a node, and start sending it data, and it will automatically start indexing. due to it being schemaless, you can also easily contain different data "types" in the same index, eg in Index1, push products, articles, reviews, comments, in Index 2, only products. json based.
You can obviously tune your index, but you can get up and running very quickly

It also has a very nice and clear query DSL.

near realtime.

also very simple to cluster and replicate (apparently solr 4 makes this much easier than solr3)

the little solr I looked at, having more used hibernate search, which also uses lucene, elastic search has more high level abstractions that make it easier for anyone to work with, while still having the lower level API, like Solr, that allows you to extend later.
 

zippy

Executive Member
Joined
May 31, 2005
Messages
9,789
Hi geniuses.

Firstly, i have no knowledge of coding or any form of software development- so i hope what I am going to ask will make sense.

I have someone working on a project for myself where a lot of data will be stored in a SQL database.

I want a search engine where someone can type a sentence and the database will be searched. I want the searches to be recorded and be able to be optimized.

say someone searches for an apple and banana pie, the search results will then display three things, apples, bananas and finally the apple and banana pie. The person will click the last result, as that was what the person was looking for. I want this to be recorded so the engine will know to display the option on top the next time.

Al the info should be stored on the server.

Basically, the search should learn with time- be smart.

I did google for a few things, but I don't actually know what to look for- can someone point me in the right direction?

Regards
This looks like a spec from our marketing dept. the only missing is that it's needed tomorrow :)
 
Top