Hey all,
I have only done Core searches and a bit more advanced in Umbraco 7 and with a new site build hit with a search challenge I hope you can help with.
I have tried to search here and follow some other threads but they not quite what I am after or old Umbraco 7 which do not work in 8.
I have the following search:
I pass to a search results page and pull URL Queries out.
Keywords - Will search various fields of the document type. I believe I have this sorted:
var textFields = new[] { "title", "description", "content", "projectContent", "projectSummary",};
With the results being:
var results = advancedSearcher.CreateQuery("content").NodeTypeAlias("Project").And().GroupedOr(textFields, searchKeyword)
But the other fields are where I am struggling.
Organisation is a multi node tree picker so it would need to search through names of those nodes.
Project staff is also a multi node tree picker so it would need to search through the names of those nodes as well.
I want to get it working with one word but ideally a number of words per field as well.
I was trying along the lines of the below code but it was not working or returning the results expected:
No one got back on this.
We ended up running a pass to get some results and then running another after that to filter down further, trying to combine multiple fields from objects was all in one request just did not return anything.
The multi node tree picker stores udi's not that actual text values. You are trying to search using text but the stored value is udi.
You can either use transforming node event and inject in text values by getting the udi and getting the node and its text value or at point of search from the text value get the node and its udi then search using udi.
Umbraco 8 multi field search with multi node tree pickers
Hey all, I have only done Core searches and a bit more advanced in Umbraco 7 and with a new site build hit with a search challenge I hope you can help with.
I have tried to search here and follow some other threads but they not quite what I am after or old Umbraco 7 which do not work in 8.
I have the following search:
I pass to a search results page and pull URL Queries out.
Keywords - Will search various fields of the document type. I believe I have this sorted:
With the results being:
But the other fields are where I am struggling.
Organisation is a multi node tree picker so it would need to search through names of those nodes.
Project staff is also a multi node tree picker so it would need to search through the names of those nodes as well.
I want to get it working with one word but ideally a number of words per field as well.
I was trying along the lines of the below code but it was not working or returning the results expected:
Can anyone help?
Thank You
No one got back on this. We ended up running a pass to get some results and then running another after that to filter down further, trying to combine multiple fields from objects was all in one request just did not return anything.
Liam,
The multi node tree picker stores udi's not that actual text values. You are trying to search using text but the stored value is udi.
You can either use transforming node event and inject in text values by getting the udi and getting the node and its text value or at point of search from the text value get the node and its udi then search using udi.
See
https://our.umbraco.com/documentation/reference/searching/examine/examine-events
Regards
Ismail
This is helpful Ismail, Thanks. I will go through it for the next project.
is working on a reply...