quark icon indicating copy to clipboard operation
quark copied to clipboard

Improvement in search algorithm - fuzzy search implemented

Open Sakshi183 opened this issue 7 years ago • 5 comments

Fixes issue: [#99]

Changes: I have improved the search algorithm.Previously,it was not able to search queries like 'binary.search' ,'binaaary search' etc.But now it shows results for the above also. screen shot 2018-03-11 at 11 13 19 pm screen shot 2018-03-11 at 11 13 45 pm screen shot 2018-03-10 at 11 17 05 pm

Sakshi183 avatar Mar 11 '18 18:03 Sakshi183

@AdiChat Please review the above change in the searching algorithm.I have removed popup.js and included the entire javascript in popup.html because the javascript file fuse.js (required for the fuzzy search algorithm) could not be imported in another javascript file properly.

Sakshi183 avatar Mar 11 '18 18:03 Sakshi183

Nice work :+1:

You need to include fuse.js. You should not remove popup.js and the javascript code should be separate from the html code. You can call functions in a js file defined in another file.

Additionally, as you have changed the structure of the metadata obj, you should provide the script to generate it so, that changes are well supported.

Kindly take a look into this. :+1:

AdiChat avatar Mar 12 '18 16:03 AdiChat

@AdiChat could you please specify the exact script which is required to generate the metadata.Also I wanted to know that which script is being currently used to generate the obj.

Sakshi183 avatar Mar 15 '18 09:03 Sakshi183

The metadata (obj) is generated through this script.

You need to provide the script to generate the new format of the metadata (books) that you are using in this pull request. Also, you cannot include js code in html code in extensions.

Kindly take a look into this. :+1:

AdiChat avatar Mar 18 '18 14:03 AdiChat

@AdiChat The above script is in python . So , could you please specify how it is being used in offline chrome extension.

Sakshi183 avatar May 12 '18 12:05 Sakshi183