Closed bjarnef closed 4 years ago
Good spot, however the purpose of searchPath
is that it should be space separated, rather than comma separated as this is what makes it searchable.
Any chance you could submit a PR for this?
Ahh okay, then it would need to be this instead:
e.ValueSet.Add("searchPath", string.Join(" ", e.ValueSet.Values["path"].Select(x => x)));
However when I change to this an rebuild the index it seems to show -1,1146,1161,1162,1163
as value for searchPath
field.
Okay apparently e.ValueSet.Values["path"] returns List<object>
and in this case only contains a single item with the path value -1,1146,1161,1162,1163
as an object,
So it seems this works instead:
e.ValueSet.Add("searchPath", e.ValueSet.Values["path"][0].ToString().Replace(',', ' '));
PR submitted: https://github.com/vendrhub/vendr-demo-store/pull/11
PR Merged 👍
It seems the logic indexing value of
searchPath
field in Examine isn't correct. https://github.com/vendrhub/vendr-demo-store/blob/main/src/Vendr.DemoStore/Composing/DemoStoreComponent.cs#L84e.ValueSet.Values["path"]
returnsList<object>
.When changing to this in seems to be correct.