opfo / app

An iOS app for the EDA397 course made at Chalmers in the spring of 2013.
7 stars 1 forks source link

Use query for token completion #32

Closed rastersize closed 11 years ago

rastersize commented 11 years ago

We should use a query for token completion instead of just loading all possible forms of tokens into memory at init (i.e. this is the branch which will help alleviate the crazy long startup time).

:notebook_with_decorative_cover: You must run pod update to use this branch as it includes pods not in the master branch.

To do

jesjos commented 11 years ago

I'm looking into the task. Give me a heads up if you're doing it too, so we can avoid duplicate work.

rastersize commented 11 years ago

We are currently suggesting tags which will result in zero results. For example by first selecting “java” and then “multithreading” suggestions such as “jsp” will be made, unfortunately there are no questions tagged with all three tags. In my tired state of mind I’m thinking a query which selects all posts by the inputted tag IDs and then returns all tags associated with those. (Not sure how to actually do that in SQL if possible at all? Join from hell :no_good:?)

Our current behavior of constructing a union of all tags related to each tag already inputted also results in the amount of tags growing each time the user decides to refine her search. Thus the suggestions bar has the opposite effect.

jesjos commented 11 years ago

Yeah, it's really a problem and it's mostly due to the fact that we only track frequencies for tag pairs. We can't say anything meaningful about groups of more than two tags. Doing the post selection thing would be very inefficient. Granted, we could easily get all tags with at least a given set of tags, but as far as I know counting them in one SQL query would be nearly impossible - meaning that we would have to get a potentially huge amount of data from the db and process it in the front end. Or a large amount of SQL per search string frankly don't know how to solve this best.

Den söndagen den 5:e maj 2013 skrev Aron Cedercrantz:

We are currently suggesting tags which will result in zero results. For example by first selecting “java” and then “multithreading” suggestions such as “jsp” will be made, unfortunately there are no questions tagged with all three tags. In my tired state of mind I’m thinking a query which selects all posts by the inputted tag IDs and then returns all tags associated with those. (Not sure how to actually do that in SQL if possible at all? Join from hell [image: :no_good:]?)

Our current behavior of constructing a union of all tags related to each tag already inputted also results in the amount of tags growing each time the user decides to refine her search. Thus the suggestions bar has the opposite effect.

— Reply to this email directly or view it on GitHubhttps://github.com/opfo/app/pull/32#issuecomment-17443598 .

rastersize commented 11 years ago

As per todays discussion, we will instead just show less tags :smile_cat:

rastersize commented 11 years ago

:notebook_with_decorative_cover: You must run pod update to use this branch as it includes pods not in the master branch.

jesjos commented 11 years ago

You're also required to do update_dbs force