prmr / Creco

Recommendation System for Consumer Products
Apache License 2.0
6 stars 2 forks source link

Auto-complete for the search #26

Closed nishanthtgwda closed 10 years ago

nishanthtgwda commented 10 years ago

Auto-complete for the search page with pre-populated values for the text field. Checks if the entered string is a substring of any of the category names present.

nishanthtgwda commented 10 years ago

Auto complete has been integrated to the master branch.

The probable set of keywords on which auto-complete can work on is the names of equivalence classes.

Please check out the '/experiment' page at localhost:8080/experiment. This page uses Levenshtein distance to calculate the four nearest category matches and returns them dynamically as each character is typed. Pro : Can take care of typos by user. Con : thymeleaf, caches out each variable at the loading of the page. So new stuff added to the backend using ajax will not get immediately reflected unless page is refreshed. The object passing to the next stage of feature extraction and display, cannot be done via the "eqc" object currently and should be changed to something as "string".

forgues commented 10 years ago

Have you looked at Lucene's auto-suggest API? I haven't looked into it in detail but it seems like it provides auto-complete functionality without needing to implement Levenshtein distance yourself.

http://lucene.apache.org/core/4_6_0/suggest/index.html

nishanthtgwda commented 10 years ago

Sure will check it out. Thank you.