~juju-gui-bot/charmworld/trunk

Viewing all changes in revision 516.

  • Committer: Tarmac
  • Author(s): Brad Crittenden
  • Date: 2014-07-16 16:39:51 UTC
  • mfrom: (515.1.1 ngram-inquiry)
  • Revision ID: tarmac-20140716163951-hunwr56yizg012h5
Make ngram searches work.

After the ngram search was deployed it was discovered to only work if 1) using
the API and 2) had autocomplete=true.

Inspecting the code showed the intent for ngram to be used in other
situations, and there was not documented rationale for only using it when
doing autocomplete.

The problem was simply in the query for non-autocomplete the field for the
ngrams was prefixed with 'data.' when it should not have been.

The ngrams fields were moved out of the charm and bundle fields and passed as
separate fields, treated like 'provides' and 'requires', to avoid the
prefixing.

As a result of this change, the search on the manage.jujucharms.com page now
uses ngrams too.

https://codereview.appspot.com/117810044/

R=makyo. Fixes: https://bugs.launchpad.net/bugs/1220909.

Approved by Juju Gui Bot, Matthew Scott.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: