i'm using Examine to search for nodes that have multiple values in a property.
Example: i have a node called "News" wich has a property called "categories" , this property is a "Dropdown list multiple, publish keys".
If I have two "News" like these:
News 1 :
categories: categoryId1, categoryId2
News 2 :
categories: categoryId2
When I do a search for all "news" of categoryId2, I'm expecting to see the two "news", but only "News 2" is listed.
Hello Marco,
thank you for your help, but that not solves my problem. With your code I only get an exact match of the results like I had explained before.
I've looked the "umbraco.config" file and saw that the field is stored like this
Sorry Pedro I've been on holiday for a couple of days.
I think you are swapping things up. The umbraco.config file is not the Examine index. You can query the index pretty easy via the Developer section in your Umbrack backend.
Maybe if you try that you get a better understanding of how the field is indexed by Examine. If you post that here hopefully I (or someone else) would be able to help you better.
Examine - search properties with multiple values
Hello,
i'm using Examine to search for nodes that have multiple values in a property. Example: i have a node called "News" wich has a property called "categories" , this property is a "Dropdown list multiple, publish keys".
If I have two "News" like these:
News 1 :
News 2 :
When I do a search for all "news" of categoryId2, I'm expecting to see the two "news", but only "News 2" is listed.
I'm using this code to do the search
How can I achieve what I'm looking for?
Hello Pedro,
I usually provide the search string as a string array (string[]).
Maybe you could try to split querySearch.Catagory. Example:
this will split the Category by whitespace but of course you can split any way you like.
Hello Marco, thank you for your help, but that not solves my problem. With your code I only get an exact match of the results like I had explained before. I've looked the "umbraco.config" file and saw that the field is stored like this
Looks like the Examine is treating the field "categories" like a string. So when I configured the filter like this
it gives me exact match results.
What I'm looking for is similar to these in SQL
Any clues?
Sorry Pedro I've been on holiday for a couple of days.
I think you are swapping things up. The umbraco.config file is not the Examine index. You can query the index pretty easy via the Developer section in your Umbrack backend.
Maybe if you try that you get a better understanding of how the field is indexed by Examine. If you post that here hopefully I (or someone else) would be able to help you better.
Regards.
is working on a reply...