Search specifically by Document Type / s and other keywords
Hi Guys,
Hope you well guys.
I am facing a problem how I am going to implement a search functionality which is quite not the general one, with just keywords only, but only searching for specific nodes. To understand me well, I am attaching a screenshot of what I am trying to achive, through ez-Search.
I know that I have to edit ezSearch.cshtml macro partial view; I am thinking that I need to change the value for * RootContentNodeId* but since I have two filtering... the supplier and the country. Basically, Each country will have different supplies underneath. So I think that the RootContentNodeId will be the node Id of the country that the user select from the dropdown, but I don't how I can also restrict to antother supplier node to search into only.
Can you give a bit more information about your backend setup. What exactly are you searching for products? Also whatever it is you are searching for how do they belong to a supplier and country you using multi node tree picker to tag items?
Basically, there will be countries. Underneath, admin can add suppliers underneatch a country node, which will means that a country will have a list of suppliers associated with.
Each supplier then, will have a relationship with a product. So I am searching for products which related to a supplier, and I want that the user will have the option to filter by supplier, country and even keywords.
So you could tag up products with suppliers using multi node tree picker, you will then need to use gatheringnode data event and inject in supplier name or replace the , in ids then search on ids.
If I remember rightly ezsearch injects in searchable path property. So in Umbraco and in the index we have path property looks like 0,1,1234,12345 in the index ezsearch should have a property which will have path but where the , has been replaced with a space. This means you can do path based searches.
So in your 2 dropdowns for supplier and country the actual values will be node ids. In your search you will do where path contains supplier id and path contains country id and contains your keywords. Have a look in ezsearch source and also open the index using luke you should see it.
Supplier (this supplier is in a relationship with a category, using nuPickers)
Now, as shows in my very first post of this issue, I am trying to search through these three criteria: Category, Country and Text.
So if user select to show catering category in Italy with restaurants keyword, How can I restrict this pls to show only by restaurants keyword but which are under Italy country and only related to catering?
I have succeeded with country only where I set the rootContentNodeID as the country ID.
Search specifically by Document Type / s and other keywords
Hi Guys,
Hope you well guys.
I am facing a problem how I am going to implement a search functionality which is quite not the general one, with just keywords only, but only searching for specific nodes. To understand me well, I am attaching a screenshot of what I am trying to achive, through ez-Search.
I know that I have to edit ezSearch.cshtml macro partial view; I am thinking that I need to change the value for * RootContentNodeId* but since I have two filtering... the supplier and the country. Basically, Each country will have different supplies underneath. So I think that the RootContentNodeId will be the node Id of the country that the user select from the dropdown, but I don't how I can also restrict to antother supplier node to search into only.
Appreciate any help and thank you in advance.
Cheers.
Kind Regards.
Simon,
Can you give a bit more information about your backend setup. What exactly are you searching for products? Also whatever it is you are searching for how do they belong to a supplier and country you using multi node tree picker to tag items?
Regards
Ismail
Hi Ismail,
Basically, there will be countries. Underneath, admin can add suppliers underneatch a country node, which will means that a country will have a list of suppliers associated with.
Each supplier then, will have a relationship with a product. So I am searching for products which related to a supplier, and I want that the user will have the option to filter by supplier, country and even keywords.
Italy
Supplier 1
Supplier 2
-Product 1
Malta
Actually, I am considering having suppliers categorised under different categories and there will have a SUPPLIER RELATIONSHIP WITH A COUNTRY.
So when you add a supplier under a category, then admin need to choose a country, through a relationship.
It makes more sense.
How can I cateter for that, through ezSearch pleasE?
Thanks for your help.
So you could tag up products with suppliers using multi node tree picker, you will then need to use gatheringnode data event and inject in supplier name or replace the , in ids then search on ids.
Regards
Ismail
Simon,
If I remember rightly ezsearch injects in searchable path property. So in Umbraco and in the index we have path property looks like 0,1,1234,12345 in the index ezsearch should have a property which will have path but where the , has been replaced with a space. This means you can do path based searches.
So in your 2 dropdowns for supplier and country the actual values will be node ids. In your search you will do where path contains supplier id and path contains country id and contains your keywords. Have a look in ezsearch source and also open the index using luke you should see it.
Regards
Ismail
Can you give me an example and where I can find useful information how I can use paths?
Thank you
Simon,
Take a look at the source code of ezsearch also take a look at http://thecogworks.co.uk/blog/posts/2012/november/examiness-hints-and-tips-from-the-trenches-part-2/ for how you can use gatheringnode data event to inject data into the index.
Regards
Ismail
Hi Guys,
I got stucked. I need some help.
I have the following structure:
Now, as shows in my very first post of this issue, I am trying to search through these three criteria: Category, Country and Text.
So if user select to show catering category in Italy with restaurants keyword, How can I restrict this pls to show only by restaurants keyword but which are under Italy country and only related to catering?
I have succeeded with country only where I set the rootContentNodeID as the country ID.
Appreciate any help.
thank you.
kind regards.
is working on a reply...