Closed (fixed)
Project:
Fuzzy Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Jun 2013 at 15:16 UTC
Updated:
15 Oct 2015 at 01:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
anrikun commentedQuick fix attached.
Comment #2
neograph734Just tested this, and works perfectly :)
Comment #3
neograph734Well, I need to correct my previous comment. It indeed supresses the error. But the percentage column remains empty, and no search results are generated. So it's not a fix for the problem.
Comment #4
neograph734After a quick scan of the module and the database I found the column name is not 'percentage', but it's 'completeness'. I've fixed that in the attached patch.
It still threw an error on en empty search-string, but anrikun's patch solved that issue.
Comment #5
dolcaer commentedSeems to be working great over here! Thanks!
Comment #6
dolcaer commentedForgot to change status to reviewed&tested, and couldn't edit my previous post.
Comment #7
anrikun commentedHi Neo,
As for me, column name is 'percent'.
See this example of query generated by the module:
Available columns are: item_id, score, percent
Comment #8
neograph734Ah, my bad... I looked into the database and found completeness. It did remove the errors and provided sorted results... Well, adding the score as a filter works too. Forget my patch.
Comment #8.0
neograph734Added a better description
Comment #9
firesidelibrarian commentedI ran patch #1 but not #4, as the comments above indicate to do, but am still getting the error message.
Update: I used incorrect syntax for installing the patch. Reinstalled module, applied patch, now not getting SQL error. Thanks for making it available!
Comment #10
gChen07 commentedsorry but I cannot not help in testing the patch, I'm still studying how to apply them. Is it possible to include the patch on the next release of this module, even in dev version?
Comment #11
firesidelibrarian commentedHey gChen07,
I was uncertain how to apply patches as well, but found it not as hard as expected.
There are some clear online instructions here that explain how to do it. Here's how I did it:
patch -p1 < fuzzysearch_unknown_column_percent_quick_fix-2011768-1.patchYou should get a message that reads 'patching file includes/service.inc'.
Patch applied!
Comment #12
Paul B commentedI get this error (Unknown column 'percent') on the fuzzysearch index admin page after upgrading search api from 7.x-1.8 to 7.x-1.10. The patch in #1 seems to fix it.
Comment #13
Anonymous (not verified) commentedWorks for me.
Comment #14
anrikun commentedComment #15
lisagodareI've also been getting this error, whether or not sorting by score was selected. I expanded on the patch in #1 to add the percent expression, if possible, and verifying it's presence before attempting to sort by it.
Comment #16
ken hawkins commentedJust a quick chime in that the latest patch by @faerysteel is treating us well.
Comment #17
dlx commentedApplied #15 - works well so far.
Comment #18
hmartens commentedThanks for #15 ...the patch worked beautifully!
Comment #19
dshields commentedThis works perfectly for me, too - RTBC
Comment #20
nevergonewhitespace errors fixed:
fuzzysearch-unknown_column_percent_add_expression_before_sort-2011768-15.patch:12: trailing whitespace.
fuzzysearch-unknown_column_percent_add_expression_before_sort-2011768-15.patch:18: trailing whitespace.
}
fuzzysearch-unknown_column_percent_add_expression_before_sort-2011768-15.patch:41: trailing whitespace.
warning: 3 lines add whitespace errors.
Comment #21
nevergoneComment #22
nevergoneComment #23
mandreato commentedEncountered the error after activation of bundle filter on the index.
Patch #20 resolved it !
Comment #24
dooug commentedWas able to replicate the issue on a fresh D7 site. Had to create some dummy content to index. This is an export of my view.
I got the error
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'percent' in 'order clause'as described.As well as the following error when I was re-indexing the content:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'percent' in 'order clause': SELECT t.item_id AS item_id, :score AS score FROM {fuzzysearch_default_fuzzysearch_index_search_api_language} t ORDER BY percent DESC, score DESC LIMIT 0 OFFSET 0; Array ( [:score] => 1 ) in FuzzySearchService->search() (line 716 of /var/www/sites/default-d7.dev/www/sites/all/modules/contrib/fuzzysearch/includes/service.inc).Applying the patch resolved the errors. I re-rolled the patch and modified the comments a bit for readability. See this interdiff for changes.
Comment #25
nicholasruunu commentedIs this project abandoned or something?
This bug was reported over a year ago and solutions have been offered.
Does nobody want to maintain this project any more?
Comment #26
lisagodarenicholasruunu:
Maintenance status: Seeking new maintainer
Comment #27
jagadeeshramuj commentedI am very much interested to maintain this project, kindly let me know your opinion.
Comment #28
neograph734@jagadeeshramuj, please contact the current maintainer(s) directly via the contact link on their profiles.
Comment #29
awolfey commentedPlease see this #2572045: Seeking new maintainer for Fuzzysearch for discussing new maintainers. Thanks.
Comment #31
jagadeeshramuj commentedComment #32
jagadeeshramuj commented