relevance

How can I manipulate MySQL fulltext search relevance to make one field more 'valuable' than another?

Suppose I have two columns, keywords and content. I have a fulltext index across both. I want a row with foo in the keywords to have more relevance than a row with foo in the content. What do I need to do to cause MySQL to weight the matches in keywords higher than those in content? I'm using the "match against" syntax. SOLUTION: Wa...

Database searching and displaying results by relevance

Hello, Given the following tables, how can I search for a term in each of them and order results by relevance? Thank you. bands - band_id - band_name albums - album_id - album_name songs - song_id - song_name ...

Sort table by number of keywords found

Hi I have the following code for searching multiple keywords within a document title which works fine. I want now to have a column that shows the number of keywords that are found in each title row and order in a descendent way. For example if I'm searching for "Maternity leave" I should get something like this: Name -- Keywords found ...

MySQL - How to ORDER BY RELEVANCE? INNODB Table

I've got about 20,000 rows in an INNODB table called 'cards', so FULLTEXT is not an option. Please consider this table: id | name | description ---------------------------------------------------------- 1 John Smith Just some dude 2 Ted Johnson Another dude 3 Johnathan Todd This guy too...

How can you compare sets of numbers and get the most relevant results using MySQL and PHP?

Consider this: set A: 1 2 3 4 set B: 3 4 5 6 set C: 4 5 6 7 set D: 1 I want to compare D with the rest and get as a result a set of numbers as most relevant. The result should be in this order: 4 (as D has a common number with A and 4 is in A and also in B and C), 3 (as D has a common number with A and 3 is in A and B), 2 (...

php - display links to related content

I am looking to implement a 'youtube related videos' style related content system. I have 5 tags/keywords for each of my pages, a title and a description. I would like to display links to the two most similar pages. I am guessing a mysql query based around order by relevance. many thanks. ...

mysql - Order by relevance and views

I have seen there are a lot of 'order by relevance' posts on here... I have worked that part out... What I would like to achieve is search results that are first ordered by relevance and then by views. For example if I searched for 'dog' and my results both had the same level of relevance to 'dog' then I would like it to order them by ...

Solr Searching, Numeric Matching and Relevance

I'll just start with the use case. Say I'm searching for a product with a price of $500. I don't necessarily mind if it costs slightly more, or slightly less, but I want products in that price range to receive a higher overall relevance score. Is there any way to do this in Solr? The relevance/MoreLikeThis docs I've seen on the site don...

If anyone has used Sphinx Search engine before...do you know if it can join words?

When you search "Stack Overflow", Sphinx will not bring up results that match "Stackoverflow" That's because Sphinx indexes "Stackoverflow" as one word...whereas the query is two words. Does anyone know how to fix this? (like Google...they can join the query !) ...

Search relevance from XML docs (XQuery?) vs MySQL

Hello there, I have a website where documents are saved in xml documents, all with the same structure. I need a search engine where I am able to choose documents with the highest relevance according to the key words given by a searching user. I thought it could (?) be a good idea to have one using XQuery rather than having the informa...

Adaptive user interface/environment algorithm

Hi all, I'm working on an information system (in C#) that (while my users use it) gathers statistical data on what pieces of information (tables & records) each user is requesting the most, and what parts of the interface he/she uses most. I'm using this statistical data to make the application adaptive to the user's needs, both in the...

I need to sort the facets that come back from SOLR by relevancy

I have within my SOLR index song objects which belong to a higher level album object. An example is shown below: <song> <album title>Blood Sugar Sex Magic</album title> <song title>Under the Bridge</song title> <description>A sad song about junkies</description> </song> What I can do at the moment is create a facet on the album title ...

Per query relevance elevation for solr?

I want to tune the relevance of solr search results on a per user basis - based on the number of times the user has clicked through a result before. Frequently hit items FOR THAT USER should rise to the top of their search results. Is there a way to provide custom boost/elevation for particular document ids on the query? I'm thinking in...

Solr: fieldNorm different per document, with no document boost

I want my search results to order by score, which they are doing, but the score is being calculated improperly. This is to say, not necessarily improperly, but differently than expected and I'm not sure why. My goal is to remove whatever is changing the score. If I perform a search that matches on two objects (where ObjectA is expecte...

Relevance Flow Graph

What is Relevance Flow Graph, How Relevance Flow Graph is used in Information Retrieval? ...

mysql: Order By relevance when using prepared statements?

I am creating a site search feature for my e-shop and am using the following code to order my query: ORDER BY((case when name RLIKE $wholeword then 3 else 0 end) + (case when name RLIKE $partialword then 1 else 0)) DESC This selects both complete and partial matches from the database and orders them giving complete matches priority ove...

Staying on the cutting edge

Being a software developer in todays high paced, high tech environment means constantly learning, sharpening your tools so as not to be left behind. This means assimilating knowledge by all means, books, blogs, user groups... help files ;) This also presents the challenge of focusing on what is relevant for your current needs (project) ...

How do Search Engines find relevant content ?

How does Google find relevant content when its parsing the web? Lets say for instance, Google uses the PHP native DOM Library to parse content, What methods would they be for it to find the most relevant content on a web page. My thoughts would be that it would search for all paragraphs, order by the length of each paragraph and then f...

Can anyone point me toward a content relevance algorithm?

A new project with some interesting requirements has arrived on my desk. I need to develop a searchable directory of businesses, with a focus on delivering relevant results based on arbitrary search queries. The businesses can be of any niche; there's no one area that is more represented than another. When googling for things like "se...