Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#769 closed enhancement (fixed)

Disjunct fields search

Reported by: heikki Owned by: heikki
Priority: minor Milestone: v2.7.0
Component: General Version:
Keywords: search parameters, or, disjunction Cc:

Description

Searches could be more expressive if there was the option to search for a value "in this field, OR in that field". Currently multiple fields in search requests are handled as AND only.

The implementation uses a naming convention such that if you want to search in field 'a' or in field 'b', you send the parameter 'a_OR_b'. You could also add more fields like that e.g. 'a_OR_b_OR_c'.

Not for all fields it's possible or desired to do this; fields for which this doesn't work are northBL, southBL, eastBL, westBL, relation, without, phrase extTo, extFrom, featured, template, and the Range Query Fields. If they are part of a _OR_ parameter, they are ignored.

Multiple _OR_-containing parameters may be sent, also in combination with AND-parameters (that do not contain _OR_ in their name).

See also http://osgeo-org.1803224.n2.nabble.com/Search-with-OR-operator-td7119012.html.

Change History (2)

comment:1 by heikki, 13 years ago

Resolution: fixed
Status: newclosed

Committed in trunk rev. 8654

comment:2 by fxp, 12 years ago

Minor changes (https://github.com/geonetwork/core-geonetwork/commit/817be82ed321f08d0ca82f219704680849de2236) :

  • Fix sub-boolean clause
  • Align non tokenized mechanism to addNotRequiredTextField and addRequiredTextField (no surrounding double quote).
Note: See TracTickets for help on using tickets.