relevance

php search engine key words ranking

ⅰ亾dé卋堺 提交于 2019-12-23 06:08:19
问题 I am new to php and mysql. In my project I have to develop search engine for multiple keywords on multiple columns and also require the keyword ranking and relevency. For example if I have three words hi, hello, hey and want to search on fields like subject, message, reference, textbody. in this case the row who has more keywords ranking will come first and lowest ranker row goes last. will any one guide me how to implement such search engine. my database is about 4 million and is growing

Magento Search Engine Relevance Issues

為{幸葍}努か 提交于 2019-12-22 11:29:18
问题 We currently have a Magento website with a large inventory, we are having some issues with relevance of ON SITE search results. We are currently set to 'combine like and fulltext' but the results are aren't what we expected. For example searching for 'Lee Child' (the author), brings up three Lee Child books, then three books with author as 'Lauren Child' and then the rest of the Lee Child books. So essentially we want to give preference to the full text search and view those results BEFORE

MYSQL fulltext search order by relevance

拈花ヽ惹草 提交于 2019-12-21 11:01:36
问题 I am trying to get my Full text search to order by relevance. here is my code it works if remove the ORDER BY but doesn't sort by relevance. I have tried this and it actually makes it so it doesnt find any results at all... Any ideas? $query_for_result=mysql_query(" SELECT * FROM Assets WHERE MATCH (`Badge`,`First Name`,`Last Name`,`Service Tag`,`Asset Tag`) AGAINST ('".$query."*' IN BOOLEAN MODE) and `deleted` = '0' ORDER BY relevance DESC"); edit* <input type="text" name="query" /> <input

Order sql result by occurrence of a set of keywords in a string

半腔热情 提交于 2019-12-20 03:15:15
问题 For each rows, I want to get the relevance of each description compared to an undefined number of keywords. I know that "THEN +1" does not work, but I would like to come to this result (...to have a number (starting from 0 each rows) that is incremented for each keyword present) SELECT *, (CASE description LIKE '%keyword1%' THEN +1 description LIKE '%keyword2%' THEN +1 (...) ELSE 0 END) as relevance_description FROM (...) ORDER BY relevance_description DESC So, if a description contains

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

混江龙づ霸主 提交于 2019-12-19 19:53:17
问题 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

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

橙三吉。 提交于 2019-12-19 03:23:00
问题 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

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

五迷三道 提交于 2019-12-17 05:39:49
问题 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: Was able to make this work in the following manner: SELECT *, CASE when Keywords like '%watermelon%' then 1 else 0 END as keywordmatch, CASE when Content like '

freebase api for sorting by city relevance

北城余情 提交于 2019-12-14 02:10:56
问题 I have a query where I would like to return all the cities for a given country. That works fine except I would like to also tweak so to sort it by size or any order of significance to avoid the 100 limit. I would like the first 100 cities to have the most likely cities a person might choose listed first. (population, or?) [{ "/location/country/iso3166_1_alpha2": "US", "/location/location/contains":[ "id" : null, "name" : null, "/location/statistical_region/population" : { "number" : null,

Clasterized scoring in ElasticSearch

≡放荡痞女 提交于 2019-12-13 03:48:14
问题 Let's say I got some complex query in ElasticSearch 6.2 and it can return the next hits: "hits" : [ { ... "_score" : 100, "_source" : { ... } ... }, { ... "_score" : 99, "_source" : { ... } ... }, { ... "_score" : 50, "_source" : { ... } ... }, { ... "_score" : 49, "_source" : { ... } ... } ] Or the same query can return: "hits" : [ { ... "_score" : 10, "_source" : { ... } ... }, { ... "_score" : 9.9, "_source" : { ... } ... }, { ... "_score" : 2, "_source" : { ... } ... }, { ... "_score" : 1

Computing the Dot Product for calculating proximity

廉价感情. 提交于 2019-12-11 20:05:57
问题 I have already asked a similar question at Calculating Word Proximity in an inverted Index. However i felt that the question was too general and not refined enough. So here goes. I have a List which contains the location of tokens in a document. for each token it goes as public List<int> hitLocation; Lets say the the document is Java programming language has a name similar to java island in Indonesia however local language in java bears no resemblance to the programming language called java.