Using the indexing set up in [#7257], provide a site admin page to search for projects and list the results. Provide options for which field to search by. Must include at least project shortname, project full name, and custom fields that are indexed (i.e. sfx group_id for SourceForge - could be specified in .ini file). Simple text box and selector for field should be fine I think. Form should be a simple GET so that URL can be easily modified (browser custom searches etc).
Then list the results, including easy pagination. List columns should include shortname w/ link to project, full name, date registered, deleted flag, and any custom fields.
We'll do something similar for users later, so keep that in mind, developing generic re-usable functions and templates if appropriate.
The results should also include links directly to "members" /p/PROJECT/admin/groups/ and "audit trail" /p/PROJECT/admin/audit/
Closed #612.
je/42cc_7278
I was not able to find where sfx
group_id
is indexed (perhaps it's not yet, since SFProjectRegistrationProvider does not implementindex_project()
)I've tested with other fields. Look at commented example in the
development.ini
Updated branch with changes for [#7583]
Layout issue, see attached.
If mongo & solr aren't in sync, can get error:
I even tried re-running Allura/allura/scripts/reindex_projects.py but that didn't seem to help. Maybe we need a separate ticket to make reindex_projects clear out old entries? What do you think? (In other scenarios I've used a last-indexed field in each doc and then delete all old docs where the last-indexed value is older than the start time of the script).
On the result links, the main project link is incorrectly going to
http://localhost/p/testit/
for me instead of using the correct domain.Should partial matches on full name work? I would like them to. I have a project named "Test it..." and a search for "test" isn't matching. This might be an issue with the solr config/version I'm using though?
When EasyWidgets isn't so easy (often!) feel free to not use it. We have some forms that don't use it and I think that is fine if it makes things actually easier. Off the top of my head perhaps the project import forms are like that.
We can make reindex_projects clear out old entries, if we want to keep solr index clearer, but it's not essential, I think. The search code should be rewritten to handle that case gracefully, and we can adjust the command later.
About partial match on full name. I think it would work if we change the type of solr field from
type_s
totype_t
without any changes to solr configuration.Yeah, okay :) Don't like to write a lot of html manually though :)
Sounds good. Should be a corner case anyway to have a project in solr that doesn't exist in mongo at all any more.
Closed #638. Force-pushed
je/42cc_7278