Lucene.Net.Search.Query.Clone C# (CSharp) Méthode

Clone() public méthode

Returns a clone of this query.
public Clone ( ) : object
Résultat object
        public virtual object Clone()
        {
            try
            {
                return (Query)base.MemberwiseClone();
            }
            catch (Exception e)
            {
                throw new Exception("Clone not supported: " + e.Message);
            }
        }

Usage Example

Exemple #1
0
        private readonly Query match; // query to match

        #endregion Fields

        #region Constructors

        public BoostingQuery(Query match, Query context, float boost)
        {
            this.match = match;
            this.context = (Query) context.Clone(); // clone before boost
            this.boost = boost;
            this.context.Boost = 0.0f; // ignore context-only matches
        }
All Usage Examples Of Lucene.Net.Search.Query::Clone