relevance

Adding Boost to Score According to Payload of Multivalued Field at Solr

北战南征 提交于 2019-12-01 17:56:21
Here is my case; I have a field at my schema named elmo_field . I want that elmo_field should have payloaded values. i.e. dorothy|0.46 sesame|0.37 big bird|0.19 bird|0.22 When a user searches for a keyword i.e. dorothy I want to add 0.46 to usual score. If user searches for big bird , 0.19 should be added and if user searches for bird , 0.22 should be added (payloads are added - or payloads * normalize coefficient will be added). I mean I will make a search on my index at my other fields of solr schema. And I will make another search (this one is an exact match search) at elmo_field at same

How can I multiply the score of two queries together in Elasticsearch?

情到浓时终转凉″ 提交于 2019-11-30 21:41:22
In Solr I can use the query function query to return a numerical score for a query and I can user that in the context of a bf parameter something like bf=product(query('cat'),query('dog')) to multiply two relevance scores together. Elasticsearch has search API that is generally more flexible to work with, but I can't figure out how I would accomplish the same feat. I can use _score in a script_function of a function_query but I can only user the _score of the main query. How can I incorporate the score of another query? How can I multiply the scores together? You could script a TF*IDF scoring

Function that returns affinity between texts?

随声附和 提交于 2019-11-30 12:15:58
问题 consider I have a string1 = "hello hi goodmorning evening [...]" and I have some minor keywords compare1 = "hello evening" compare2 = "hello hi" I need a function that returns the affinity between the text and keywords. Example: function(string1,compare1); // returns: 4 function(string1,compare2); // returns: 5 (more relevant) Please note 5 and 4 are just for example. You could say - write a function that counts occurrences - but for this example this would not work because both got 2

Search ranking/relevance algorithms

半腔热情 提交于 2019-11-30 11:04:50
When developing a database of articles in a Knowledge Base (for example) - what are the best ways to sort and display the most relevant answers to a users' question? Would you use additional data such as keyword weighting based on whether previous users found the article of help, or do you find a simple keyword matching algorithm to be sufficient? Perhaps the easiest and most naive approach that will give immediately useful results would be to implement *tf-idf : Variations of the tf–idf weighting scheme are often used by search engines as a central tool in scoring and ranking a document's

Full-text search relevance is measured in?

╄→尐↘猪︶ㄣ 提交于 2019-11-30 06:44:42
I am making a quiz system, and when quizmakers insert questions into the Question Bank, I am to check the DB for duplicate / very highly similar questions. Testing MySQL's MATCH() ... AGAINST() , the highest relevance I get is 30+, when I test against a 100% similar string. So what exactly is the relevance? To quote the manual : Relevance values are non-negative floating-point numbers. Zero relevance means no similarity. Relevance is computed based on the number of words in the row, the number of unique words in that row, the total number of words in the collection, and the number of documents

Mysql fulltext search relevance across multiple tables

折月煮酒 提交于 2019-11-30 06:18:54
问题 I have been tasked with creating a site wide search feature. The search needs to look at articles, events and page content I've used MATCH()/AGAINST() in MySQL before and know how to get the relevance of a result but as far as I know the relevance is unique to the search (contents, number of rows etc) the relevance of results from the articles table wont match the relevance of results from the events table. Is there anyway to unify the relevance so that results from all three tables have a

Function that returns affinity between texts?

旧巷老猫 提交于 2019-11-30 02:23:09
consider I have a string1 = "hello hi goodmorning evening [...]" and I have some minor keywords compare1 = "hello evening" compare2 = "hello hi" I need a function that returns the affinity between the text and keywords. Example: function(string1,compare1); // returns: 4 function(string1,compare2); // returns: 5 (more relevant) Please note 5 and 4 are just for example. You could say - write a function that counts occurrences - but for this example this would not work because both got 2 occurrences, but compare1 is less relevant because "hello evening" isn't exactly found in string1 (the 2 words

How to sort mysql search result by relevance?

无人久伴 提交于 2019-11-29 23:48:03
问题 I have a similar query as asked on this question MySQL - How to ORDER BY RELEVANCE? INNODB Table Difference is, here I want to search from 5 fields as add1, add2, add3, post_town, post_code And only records in post_code field will be NOT EMPTY, other fields records may be empty at some places. If I search for keyword kingston , it returns Acre Road, Kingston upon Thames, KT2 6EA Kingston Road, Epsom, KT19 0DG Kingston Road, Epsom, KT20 0DH and these results are combination of all fields add1,

Search ranking/relevance algorithms

女生的网名这么多〃 提交于 2019-11-29 16:28:41
问题 When developing a database of articles in a Knowledge Base (for example) - what are the best ways to sort and display the most relevant answers to a users' question? Would you use additional data such as keyword weighting based on whether previous users found the article of help, or do you find a simple keyword matching algorithm to be sufficient? 回答1: Perhaps the easiest and most naive approach that will give immediately useful results would be to implement *tf-idf: Variations of the tf–idf

Full-text search relevance is measured in?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 06:27:55
问题 I am making a quiz system, and when quizmakers insert questions into the Question Bank, I am to check the DB for duplicate / very highly similar questions. Testing MySQL's MATCH() ... AGAINST(), the highest relevance I get is 30+, when I test against a 100% similar string. So what exactly is the relevance? To quote the manual: Relevance values are non-negative floating-point numbers. Zero relevance means no similarity. Relevance is computed based on the number of words in the row, the number