I want to search for documents hat have a field with the datatype "dropdownlist multiple".
I am searching for the results like this:
var values = new string[] { "MultipleList1", "MultipleList2" };
var aliases = new string[] { "mylist" };
query = query.And().GroupedOr(aliases, values);
var searchResults = ExamineManager.Instance.Search(query.Compile());
This works fine, when the results have just one selected value of the dropdownlist. When there are two or more values selected the query does not find anything.
Can soneone tell me what I am doing wrong? Thank you very much for your help,
I suspect the fields are being stored as a csv list. Have a quick look in the index for a field with multiple values and confirm if it is being stored as csv. if it is being stored as csv you will need to implement gatheringnode data event and for that field get the values replace the , with a space then inject that value into new field and search on that field see http://thecogworks.co.uk/blog/posts/2012/november/examiness-hints-and-tips-from-the-trenches-part-2/ for more information
Examine GroupedOr and Multiple Dropdownlist
Hello,
I want to search for documents hat have a field with the datatype "dropdownlist multiple".
I am searching for the results like this:
This works fine, when the results have just one selected value of the dropdownlist. When there are two or more values selected the query does not find anything.
Can soneone tell me what I am doing wrong? Thank you very much for your help,
mannaky
Mannaky,
I suspect the fields are being stored as a csv list. Have a quick look in the index for a field with multiple values and confirm if it is being stored as csv. if it is being stored as csv you will need to implement gatheringnode data event and for that field get the values replace the , with a space then inject that value into new field and search on that field see http://thecogworks.co.uk/blog/posts/2012/november/examiness-hints-and-tips-from-the-trenches-part-2/ for more information
Regards
Ismail
is working on a reply...