Skip to content

Commit d6e2417

Browse files
author
synapticloop
committed
start of or separator
1 parent 0fd1cec commit d6e2417

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

src/main/java/com/synapticloop/panl/server/handler/fielderiser/field/BaseField.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public abstract class BaseField {
6767
public static final String PROPERTY_KEY_PANL_FACET = "panl.facet.";
6868
public static final String PROPERTY_KEY_PANL_OR_FACET = "panl.or.facet.";
6969
public static final String PROPERTY_KEY_PANL_OR_ALWAYS = "panl.or.always.";
70+
public static final String PROPERTY_KEY_PANL_OR_SEPARATOR = "panl.or.separator.";
7071
public static final String PROPERTY_KEY_PANL_FACETSORT = "panl.facetsort.";
7172
public static final String PROPERTY_KEY_PANL_TYPE = "panl.type.";
7273
public static final String PROPERTY_KEY_PANL_PREFIX = "panl.prefix.";

src/main/java/com/synapticloop/panl/server/handler/fielderiser/field/facet/PanlOrFacetField.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ public class PanlOrFacetField extends PanlFacetField {
4949
// OR Facet properties //
5050
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
5151
protected boolean isAlwaysOr = false;
52+
protected String orSeparator = null;
5253

5354
public PanlOrFacetField(String lpseCode, String propertyKey, Properties properties, String solrCollection, String panlCollectionUri, int lpseLength) throws PanlServerException {
5455
super(lpseCode, propertyKey, properties, solrCollection, panlCollectionUri, lpseLength);
5556

5657
this.isAlwaysOr = properties.getProperty(PROPERTY_KEY_PANL_OR_ALWAYS + lpseCode, "false").equalsIgnoreCase("true");
58+
this.orSeparator = properties.getProperty(PROPERTY_KEY_PANL_OR_SEPARATOR + lpseCode, null);
5759
}
5860

5961
@Override public List<String> explainAdditional() {
@@ -267,4 +269,14 @@ public LpseToken instantiateToken(CollectionProperties collectionProperties, Str
267269
public boolean getIsAlwaysOr() {
268270
return isAlwaysOr;
269271
}
272+
273+
/**
274+
* <p>Return the OR separator for OR field values. This will return null if
275+
* no OR separator is configured.</p>
276+
*
277+
* @return the string for the OR separator, or null if not set
278+
*/
279+
public String getOrSeparator() {
280+
return orSeparator;
281+
}
270282
}

0 commit comments

Comments
 (0)