Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ResourceInformationV2.Function/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public async Task<HttpResponseData> GetById([HttpTrigger(AuthorizationLevel.Anon
[OpenApiParameter(name: "source", In = ParameterLocation.Query, Required = false, Type = typeof(string), Description = "The source for the tags.")]
[OpenApiParameter(name: "location", In = ParameterLocation.Query, Required = false, Type = typeof(string), Description = "The location for the event.")]
[OpenApiParameter(name: "date", In = ParameterLocation.Query, Required = false, Type = typeof(string), Description = "The start date for the event.")]
[OpenApiParameter(name: "q", In = ParameterLocation.Query, Required = false, Type = typeof(string), Description = "A full text search string -- it will search the title and description for the search querystring.")]
[OpenApiParameter(name: "take", In = ParameterLocation.Query, Required = false, Type = typeof(int), Description = "How many items do you want? Defaults to 1000.")]
[OpenApiParameter(name: "skip", In = ParameterLocation.Query, Required = false, Type = typeof(int), Description = "A skip value to help with pagination. Defaults to 0.")]
[OpenApiParameter(name: "sort", In = ParameterLocation.Query, Required = false, Type = typeof(int), Description = "Sort value - either title or date")]
Expand Down
2 changes: 1 addition & 1 deletion ResourceInformationV2.Search/Getters/EventGetter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public async Task<SearchObject<Event>> SearchEvents(string source, string search
f => speakers.Any() ? f.Terms(m => m.Field(fld => fld.Speakers).Terms(speakers)) : f.MatchAll(),
f => location != "" ? f.Term(m => m.Field(fld => fld.Location).Value(location)) : f.MatchAll(),
f => date != "" ? f.Term(m => m.Field(fld => fld.StartDate).Value(date)) : f.MatchAll())
.Must(m => !string.IsNullOrWhiteSpace(search) ? m.MultiMatch(m => m.Fields(fld => fld.Field("title^10").Field("speakers^5").Field("description^5").Field("notes")).Query(search)) : m.MatchAll())))
.Must(m => !string.IsNullOrWhiteSpace(search) ? m.MultiMatch(m => m.Fields(fld => fld.Field("title^10").Field("speakerList^5").Field("description^5").Field("notes")).Query(search)) : m.MatchAll())))
.Sort(srt => sort == "date" ? srt.Ascending(f => f.StartDate) : srt.Ascending(f => f.TitleSortKeyword))
.Suggest(a => a.Phrase("didyoumean", p => p.Text(search).Field(fld => fld.Title))));
LogDebug(response);
Expand Down
6 changes: 6 additions & 0 deletions ResourceInformationV2.Search/Models/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ public class Event : BaseObject {
public bool IsAllDay { get; set; } = false;
[Keyword] public string Location { get; set; } = "";
public override string NameType => "Event";
[Keyword] public string SpeakerList { get; set; } = "";
[Keyword] public IEnumerable<string> Speakers { get; set; } = [];
[Keyword] public string Sponsor { get; set; } = "";
public DateTime StartDate { get; set; } = DateTime.Now;

internal override string[] Headings => ["Id", "Title", "Description", "Start Date", "End Date", "Is All Day", "Location", "Speaker", "Sponsor", "Fragment", "Url", "Image", "Image Alt Text", "Image Source", "Video Url", "Notes", "Created Date", "Is Active", "Audience List", "Department List", "Topic List", "Tag 1 List", "Tag 2 List", "Tag 3 List", "Tag 4 List", "Related Links", "Order", "Review Email", "Last Updated Date"];

public override void Prepare() {
base.Prepare();
SpeakerList = string.Join(" ", Speakers);
}

internal override bool LoadFromStringPrivate(string[] lineArray) {
Id = lineArray[0];
Title = PrepareForTextUpload(lineArray[1]);
Expand Down
1 change: 1 addition & 0 deletions ResourceInformationV2/Components/Pages/Home.razor
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ else if (Sources != null)
{
<ilw-content width="page">
<h2>Active Source: <em>@SelectedSourceTitle</em></h2>
<p>To use this source, please use the source code <code style="font-weight: bold;">@SelectedSource</code> in the API.</p>
<ilw-grid innerwidth="300px" padding="35px 0">
@if (UseResources) {
<ilw-card align="center" style="--ilw-heading--color: var(--il-altgeld);">
Expand Down
Loading