You should be able to filter "(word1 in field OR word2 in field) AND
NOT(word1 in field AND word2 in field)". Translate that into the right
syntax.
I don't know if lucene is smart enough to execute the filter only once (it
should be i guess).
Makes sense ?

On Thu, Dec 15, 2016 at 12:12 PM, Leo BRUVRY-LAGADEC <Leo.Bruvry.Lagadec@
partenaire-exterieur.ifremer.fr> wrote:

> Hi,
>
> I have a multivalued field in my schema called "idx_affilliation".
>
> <field name="idx_affilliation">IFREMER, Ctr Brest, DRO Geosci Marines,
> F-29280 Plouzane, France.</field>
> <field name="idx_affilliation">Univ Lisbon, Ctr Geofis, P-1269102 Lisbon,
> Portugal.</field>
> <field name="idx_affilliation">Univ Bretagne Occidentale, Inst Univ
> Europeen Mer, Lab Domaines Ocean, F-29280 Plouzane, France.</field>
> <field name="idx_affilliation">Total Explorat Prod Geosci Projets Nouveaux
> Exper, F-92078 Paris, France.</field>
>
> I want to be able to do a query like: idx_affilliation:(IFREMER Portugal)
> and not have this document returned. In other words, I do not want queries
> to span individual values for the field.
>
> ------------------------------------------------------------
> -----------------------------------
>
> Here are some further examples using the document above of how I want this
> to work:
>
> idx_affilliation:(IFREMER France) --> Returns it.
> idx_affilliation:(IFREMER Plouzane) --> Returns it.
> idx_affilliation:("Univ Bretagne Occidentale") --> Returns it.
> idx_affilliation:("Univ Lisbon" Portugal) --> Returns it.
> idx_affilliation:(IFREMER Portugal) --> DOES NOT RETURN IT.
>
> Does someone known if it's possible to do this ?
>
> Best regards,
> Leo.
>

Reply via email to