Rgbstock forum

forum > Technical questions > Search algorithm

Search algorithm

1. ColinBrough10 February 2012, 12:45 GMT +01:00

What algorithms are used by the search function?

Couple of reasons for asking: I uploaded an image yesterday of Kirkcaldy (Placid Harbour), and out of curiosity searched for other images of the town. One other image came up, n31ZW8O, which is of a ruined tower just along the coast in a place called Elie (my cousins grew up there) - Kirkcaldy is not in the keywords, so I was surprised & impressed that rgbstock's search function somehow "knew" that this tower was near Kirkcaldy!! Then I spotted the word Kirkcaldy in the description text - so I presume this is included in the search somehow?

Also, I find it harder to narrow down a search for images - when you specify two keywords in the search it appears you get images for either, rather than those that match both criteria (I know about "AND" - but its not obvious, and I don't see it documented (its certainly not in the FAQ) - and how is "relevance" defined? (results are by default presented sorted by relevance). Too many images are presented to be useful, in my experience...

Maybe something to get beyond the poverty of good keywords some submitters choose is helpful, but I'm a bit frustrated with the quality of the search - which is the main interface for users of the site, rather than submitters...


2. jazza11 February 2012, 21:58 GMT +01:00

Hi Colin, that is a good question and I am happy to tell you a little bit about it

So, how does the search engine works?
It searches through the keywords, description and title of the photo. It has some rudimentary knowledge of the English language. It will recognize plural words like 'airplane' and 'airplanes'

The keywords, title and description have a different weight: keywords have more weight than titles and titles have more weight than the description. So that influences the order of the result as well.

If you are searching for one single search work it will look how relevant this word is for the set of words that belongs to a photo.

For instance if a photo only have two keywords, like "bird, animal", the relevance for the search word "bird" is very high and the photo will end up very high in the search results.

But if you are searching for "feathers" you wont find the example photo with the two keywords at all .... So maybe is adding more keywords a good Idea after all.

If you are using more then one word in your search query the search engine will do the following: If you are searching for "black bird" the search engine will search for "black OR bird" . You can search for "black AND bird" just by typing it.

We did not write this search engine our self. It is a well known open source search solution, but I wont tell you which one because it is possible we'll change it for technical reasons. An other search engine would have similar characteristics though.

3. fishmonk24 February 2012, 20:51 GMT +01:00

'NOT' is useful - does this work?

OK - that was lazy of me! Just tested it & it does! Nice one!

Please sign in or sign up if you want to participate in the forum discussions.