/// <summary> Indicate whether to load the field with the given name or not. If the {@link Field#Name()} is not in either of the /// initializing Sets, then {@link Mono.Lucene.Net.Documents.FieldSelectorResult#NO_LOAD} is returned. If a Field name /// is in both <code>fieldsToLoad</code> and <code>lazyFieldsToLoad</code>, lazy has precedence. /// /// </summary> /// <param name="fieldName">The {@link Field} name to check /// </param> /// <returns> The {@link FieldSelectorResult} /// </returns> public virtual FieldSelectorResult Accept(System.String fieldName) { FieldSelectorResult result = FieldSelectorResult.NO_LOAD; if (fieldsToLoad.Contains(fieldName) == true) { result = FieldSelectorResult.LOAD; } if (lazyFieldsToLoad.Contains(fieldName) == true) { result = FieldSelectorResult.LAZY_LOAD; } return(result); }
public override bool Equals(System.Object o) { if (this == o) { return(true); } if (o == null || GetType() != o.GetType()) { return(false); } FieldSelectorResult that = (FieldSelectorResult)o; if (id != that.id) { return(false); } return(true); }
/// <summary>Load field according to its associated value in fieldSelections</summary> /// <param name="field">a field name /// </param> /// <returns> the fieldSelections value that field maps to or NO_LOAD if none. /// </returns> public virtual FieldSelectorResult Accept(System.String field) { FieldSelectorResult selection = (FieldSelectorResult)fieldSelections[field]; return(selection != null?selection:FieldSelectorResult.NO_LOAD); }