close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Having problem to match the search result with search query

Thread began 8/02/2020 10:00 pm by Rokon | Last modified 8/04/2020 10:41 am by Ray Borduin | 25 views | 5 replies |

Rokon

Having problem to match the search result with search query

Hello

I am having a big problem to match the search query with search result. It seems that the result showing is not in correct order. The example is as below;

My search query is "Juairiyah bint al-Harith" without the quote and when I get the result then the first result is coming with the word "al-Harith" while the full match should come at the first and then gradually the partial match result will come at the end. I could not figure it out what is the cause of this problem. When I make exact match then it works but in normal search the result mismatch. Pls help me to figure out the problem.

I am passing the ftp info in private.

Sign in to reply to this post

Ray BorduinWebAssist

Our search extension doesn't do a dynamic ORDER BY based on search results. You could add one manually to put an exact match first specifically, but qualifying and rating results to determine their priority would get complicated. If you give me FTP access and tell me the page in question then I'll add the ORDER BY statement to prioritize exact matches.

Sign in to reply to this post
Did this help? Tips are appreciated...

Rokon

This post has been deleted.

Rokon

Originally Said By: Ray Borduin
  Our search extension doesn't do a dynamic ORDER BY based on search results. You could add one manually to put an exact match first specifically, but qualifying and rating results to determine their priority would get complicated. If you give me FTP access and tell me the page in question then I'll add the ORDER BY statement to prioritize exact matches.  



Dear Ray

I am providing the ftp info and page url herewith in private.

Sign in to reply to this post

Ray BorduinWebAssist

When I edit that page with the FTP it doesn't seem to effect the page.

I think you can just add something like:

php:
if (isset($_GET["q"])) {

    $SearchPage->Statement .= " ORDER BY INSTR(BanglaHadith,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(EnglishHadith,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ChapterEN,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(HadithNote,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ChapterBG,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(explanation,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ArabicHadith,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ArabicHadithNew,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ChapterAR,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC";
}



on the line before:

php:
$SearchPage->execute();
Sign in to reply to this post
Did this help? Tips are appreciated...

Rokon

Originally Said By: Ray Borduin
  When I edit that page with the FTP it doesn't seem to effect the page.

I think you can just add something like:

php:
if (isset($_GET["q"])) {

    $SearchPage->Statement .= " ORDER BY INSTR(BanglaHadith,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(EnglishHadith,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ChapterEN,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(HadithNote,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ChapterBG,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(explanation,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ArabicHadith,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ArabicHadithNew,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC, INSTR(ChapterAR,".$SearchPage->getSQLValue($_GET["q"],"s") .")>0 DESC";
}


on the line before:
php:
$SearchPage->execute();
  



Dear Ray

Thanks for your great support!

Meanwhile I did a little change on the generated code to another page and it brings the result what I was looking for.

I just change "and"=>" ", "or"=>", " instate of "and"=>", ", "or"=>" " and the problem is solved and it is giving me perfect result every time.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...