Enable indexed search on Review Board

NEW
Unassigned

Status

MozReview
General
P4
normal
3 years ago
2 years ago

People

(Reporter: smacleod, Unassigned)

Tracking

Development/Staging

Details

(Reporter)

Description

3 years ago
Review Board comes with indexed search functionality for searching through review requests etc. This functionality is currently disabled.

Enabling the indexed search would provide a much better searching experience, we should do it. We need to have a recurring job running the indexing and then turn on the setting in the admin panel. Information about this can be found at https://www.reviewboard.org/docs/manual/2.0/admin/sites/search-indexing/#search-indexing

Comment 1

3 years ago
# venv/bin/python venv/bin/rb-site manage /data/www/reviewboard.mozilla.org/reviewboard rebuild_index

WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.
Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.
Are you sure you wish to continue? [y/N] y
Removing all documents from your index because you said so.
All documents removed.
Indexing 338084 users
ERROR:root:Error updating auth using default
Traceback (most recent call last):
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 189, in handle_label
    self.update_backend(label, using)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 234, in update_backend
    do_update(backend, index, qs, start, end, total, self.verbosity)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 89, in do_update
    backend.update(index, current_qs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/backends/whoosh_backend.py", line 191, in update
    doc = index.full_prepare(obj)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/indexes.py", line 207, in full_prepare
    self.prepared_data = self.prepare(obj)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/indexes.py", line 198, in prepare
    self.prepared_data[field.index_fieldname] = field.prepare(obj)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/fields.py", line 159, in prepare
    return self.convert(super(CharField, self).prepare(obj))
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/fields.py", line 106, in prepare
    return current_object()
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/utils/functional.py", line 15, in _curried
    return _curried_func(*(args + moreargs), **dict(kwargs, **morekwargs))
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/db/models/base.py", line 1009, in get_absolute_url
    return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.model_name), func)(self, *args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/ReviewBoard-2.0.15-py2.6.egg/reviewboard/settings.py", line 392, in <lambda>
    'auth.user': lambda u: reverse('user', kwargs={'username': u.username})
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/urlresolvers.py", line 536, in reverse
    return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/urlresolvers.py", line 456, in _reverse_with_prefix
    (lookup_view_s, args, kwargs, len(patterns), patterns))
NoReverseMatch: Reverse for 'user' with arguments '()' and keyword arguments '{u'username': u'bugzilla.*.bjstone+100148'}' not found. 2 pattern(s) tried: [u"users/(?P<username>[A-Za-z0-9@_\\-\\.'\\+]+)/$", u"s/(?P<local_site_name>[A-Za-z0-9\\-_.]+)/users/(?P<username>[A-Za-z0-9@_\\-\\.'\\+]+)/$"]
Traceback (most recent call last):
  File "venv/bin/rb-site", line 9, in <module>
    load_entry_point('ReviewBoard==2.0.15', 'console_scripts', 'rb-site')()
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/ReviewBoard-2.0.15-py2.6.egg/reviewboard/cmdline/rbsite.py", line 1885, in main
    command.run()
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/ReviewBoard-2.0.15-py2.6.egg/reviewboard/cmdline/rbsite.py", line 1814, in run
    site.run_manage_command(args[0], args[1:])
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/ReviewBoard-2.0.15-py2.6.egg/reviewboard/cmdline/rbsite.py", line 662, in run_manage_command
    execute_from_command_line([__file__, cmd] + params)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/management/commands/rebuild_index.py", line 16, in handle
    call_command('update_index', **options)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/management/__init__.py", line 159, in call_command
    return klass.execute(*args, **defaults)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 184, in handle
    return super(Command, self).handle(*items, **options)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/management/base.py", line 385, in handle
    label_output = self.handle_label(label, **options)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 189, in handle_label
    self.update_backend(label, using)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 234, in update_backend
    do_update(backend, index, qs, start, end, total, self.verbosity)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/management/commands/update_index.py", line 89, in do_update
    backend.update(index, current_qs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/backends/whoosh_backend.py", line 191, in update
    doc = index.full_prepare(obj)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/indexes.py", line 207, in full_prepare
    self.prepared_data = self.prepare(obj)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/indexes.py", line 198, in prepare
    self.prepared_data[field.index_fieldname] = field.prepare(obj)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/fields.py", line 159, in prepare
    return self.convert(super(CharField, self).prepare(obj))
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/haystack/fields.py", line 106, in prepare
    return current_object()
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/utils/functional.py", line 15, in _curried
    return _curried_func(*(args + moreargs), **dict(kwargs, **morekwargs))
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/db/models/base.py", line 1009, in get_absolute_url
    return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.model_name), func)(self, *args, **kwargs)
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/ReviewBoard-2.0.15-py2.6.egg/reviewboard/settings.py", line 392, in <lambda>
    'auth.user': lambda u: reverse('user', kwargs={'username': u.username})
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/urlresolvers.py", line 536, in reverse
    return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
  File "/data/www/reviewboard.mozilla.org/venv/lib/python2.6/site-packages/django/core/urlresolvers.py", line 456, in _reverse_with_prefix
    (lookup_view_s, args, kwargs, len(patterns), patterns))
django.core.urlresolvers.NoReverseMatch: Reverse for 'user' with arguments '()' and keyword arguments '{u'username': u'bugzilla.*.bjstone+100148'}' not found. 2 pattern(s) tried: [u"users/(?P<username>[A-Za-z0-9@_\\-\\.'\\+]+)/$", u"s/(?P<local_site_name>[A-Za-z0-9\\-_.]+)/users/(?P<username>[A-Za-z0-9@_\\-\\.'\\+]+)/$"]
Exception TypeError: 'isinstance() arg 2 must be a class, type, or tuple of classes and types' in <bound method Signal._remove_receiver of <django.dispatch.dispatcher.Signal object at 0x2ee4b50>> ignored

Updated

3 years ago
Priority: -- → P2

Comment 2

3 years ago
The value of searching Review Board is questionable at the moment, but the exception above is somewhat troubling, so I filed a P2 bug to investigate that (bug 1173877) and am lowering the priority of this bug.
Priority: P2 → P4
(Assignee)

Updated

2 years ago
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.