AnsweredAssumed Answered

Lucene Search against a list of values

Question asked by mri on Aug 18, 2014
Hi,

I have a content model where an Element (Author) has a multi valued field (Email Addresses), which we have implemented as a list of strings.

So the idea is an author may have several email addresses (each stored as separate String values):
author1@work.com
author1@home.com

And then I want to search a single value against all values in the list, So lookup author based on the search query:
"author1@work.com" = Match
"author1@home.com" = Match
"author2@work.com" = No Match

I am wondering how I can search this in Lucene, previously we have used a search term like the following when we were just matching a single value (only allowed 1 email address):


"TYPE:\"{http://www.xxx.org/model/content/1.3}authors\" AND @name\\:emailAddress:\"" + emailAddressSearchValue + "\"";


But this doesnt work now that emailAddress has become a list.

I have looked through the Alfresco Search wiki, but don't seem to be able to find anything that discussed searching a single value against a content model that has a list of values.

Any help regarding this matter is greatly appreciated.

Outcomes