Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 16CF0200B8B for ; Tue, 4 Oct 2016 22:01:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 14986160AF2; Tue, 4 Oct 2016 20:01:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BEA92160AE9 for ; Tue, 4 Oct 2016 22:01:33 +0200 (CEST) Received: (qmail 22538 invoked by uid 500); 4 Oct 2016 20:01:32 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 22184 invoked by uid 99); 4 Oct 2016 20:01:32 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2016 20:01:32 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 84BEEE6998; Tue, 4 Oct 2016 20:01:32 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: synhershko@apache.org To: commits@lucenenet.apache.org Date: Tue, 04 Oct 2016 20:02:10 -0000 Message-Id: <9fbb804d6d6f4833a46e2ddc395131c9@git.apache.org> In-Reply-To: <24a353907def438ca7013b548e833d9e@git.apache.org> References: <24a353907def438ca7013b548e833d9e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [40/46] lucenenet git commit: Facet: Updated documentation archived-at: Tue, 04 Oct 2016 20:01:36 -0000 http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs b/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs index ae177b6..9b52503 100644 --- a/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs +++ b/src/Lucene.Net.Facet/Taxonomy/CategoryPath.cs @@ -31,19 +31,20 @@ namespace Lucene.Net.Facet.Taxonomy public class CategoryPath : IComparable { /// - /// An empty + /// An empty + /// public static readonly CategoryPath EMPTY = new CategoryPath(); /// - /// The components of this . Note that this array may be - /// shared with other instances, e.g. as a result of - /// , therefore you should traverse the array up to - /// for this path's components. + /// The components of this . Note that this array may be + /// shared with other instances, e.g. as a result of + /// , therefore you should traverse the array up to + /// for this path's components. /// public string[] Components { get; private set; } /// - /// The number of components of this . + /// The number of components of this . public int Length { get; private set; } // Used by singleton EMPTY @@ -65,7 +66,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Construct from the given path components. + /// Construct from the given path . + /// public CategoryPath(params string[] components) { Debug.Assert(components.Length > 0, "use CategoryPath.EMPTY to create an empty path"); @@ -81,7 +83,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Construct from a given path, separating path components with {@code delimiter}. + /// Construct from a given path, separating path components with . + /// public CategoryPath(string pathString, char delimiter) { string[] comps = pathString.Split(new[] { delimiter }, StringSplitOptions.RemoveEmptyEntries); @@ -107,7 +110,7 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Returns the number of characters needed to represent the path, including /// delimiter characters, for using with - /// . + /// . /// public virtual int FullPathLength() { @@ -126,7 +129,7 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Compares this path with another for lexicographic + /// Compares this path with another for lexicographic /// order. /// public virtual int CompareTo(CategoryPath other) @@ -167,14 +170,14 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Copies the path components to the given {@code char[]}, starting at index - /// {@code start}. {@code delimiter} is copied between the path components. + /// Copies the path components to the given , starting at index + /// . is copied between the path components. /// Returns the number of chars copied. /// /// /// NOTE: this method relies on the array being large enough to hold the /// components and separators - the amount of needed space can be calculated - /// with . + /// with . /// /// public virtual int CopyFullPath(char[] buf, int start, char delimiter) @@ -241,7 +244,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Calculate a 64-bit hash function for this path. + /// Calculate a 64-bit hash function for this path. + /// public virtual long LongHashCode() { if (Length == 0) @@ -258,7 +262,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Returns a sub-path of this path up to {@code length} components. + /// Returns a sub-path of this path up to components. + /// public virtual CategoryPath Subpath(int length) { if (length >= this.Length || length < 0) @@ -279,7 +284,7 @@ namespace Lucene.Net.Facet.Taxonomy /// Returns a string representation of the path, separating components with /// '/'. /// - /// + /// public override string ToString() { return ToString('/'); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs index 4552f08..0949614 100644 --- a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs +++ b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs @@ -34,8 +34,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory using MultiFields = Lucene.Net.Index.MultiFields; /// - /// A which retrieves stored taxonomy information from a - /// . + /// A which retrieves stored taxonomy information from a + /// . ///

/// Reading from the on-disk index on every method call is too slow, so this /// implementation employs caching: Some methods cache recent requests and their @@ -64,8 +64,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory private volatile TaxonomyIndexArrays taxoArrays; ///

- /// Called only from . If the taxonomy has been - /// recreated, you should pass {@code null} as the caches and parent/children + /// Called only from . If the taxonomy has been + /// recreated, you should pass null as the caches and parent/children /// arrays. /// internal DirectoryTaxonomyReader(DirectoryReader indexReader, DirectoryTaxonomyWriter taxoWriter, @@ -84,14 +84,11 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Open for reading a taxonomy stored in a given . + /// Open for reading a taxonomy stored in a given . /// - /// - /// The in which the taxonomy resides. - /// - /// if the Taxonomy is corrupt. - /// - /// if another error occurred. + /// The in which the taxonomy resides. + /// if the Taxonomy is corrupt. + /// if another error occurred. public DirectoryTaxonomyReader(Directory directory) { indexReader = OpenIndexReader(directory); @@ -106,11 +103,11 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Opens a over the given - /// (for NRT). + /// Opens a over the given + /// (for NRT). /// /// - /// The from which to obtain newly + /// The from which to obtain newly /// added categories, in real-time. public DirectoryTaxonomyReader(DirectoryTaxonomyWriter taxoWriter) { @@ -150,16 +147,16 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Implements the opening of a new instance if + /// Implements the opening of a new instance if /// the taxonomy has changed. /// /// - /// NOTE: the returned shares the + /// NOTE: the returned shares the /// ordinal and category caches with this reader. This is not expected to cause /// any issues, unless the two instances continue to live. The reader /// guarantees that the two instances cannot affect each other in terms of /// correctness of the caches, however if the size of the cache is changed - /// through , it will affect both reader instances. + /// through , it will affect both reader instances. /// /// protected override TaxonomyReader DoOpenIfChanged() @@ -231,8 +228,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Open the from this {@link - /// Directory}. + /// Open the from this . /// protected virtual DirectoryReader OpenIndexReader(Directory directory) { @@ -240,8 +236,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Open the from this {@link - /// IndexWriter}. + /// Open the from this . /// protected virtual DirectoryReader OpenIndexReader(IndexWriter writer) { @@ -249,8 +244,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Expert: returns the underlying instance that is - /// used by this . + /// Expert: returns the underlying instance that is + /// used by this . /// internal virtual DirectoryReader InternalIndexReader { @@ -379,13 +374,13 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// setCacheSize controls the maximum allowed size of each of the caches - /// used by and . + /// Setting controls the maximum allowed size of each of the caches + /// used by and . ///

/// Currently, if the given size is smaller than the current size of /// a cache, it will not shrink, and rather we be limited to its current /// size.

- /// the new maximum cache size, in number of entries. + /// the new maximum cache size, in number of entries. public virtual int CacheSize { set @@ -400,8 +395,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Returns ordinal -> label mapping, up to the provided - /// max ordinal or number of ordinals, whichever is - /// smaller. + /// max ordinal or number of ordinals, whichever is + /// smaller. /// public virtual string ToString(int max) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs index dd497fd..f59337e 100644 --- a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs +++ b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs @@ -54,20 +54,20 @@ namespace Lucene.Net.Facet.Taxonomy.Directory using TokenStream = Lucene.Net.Analysis.TokenStream; /// - /// which uses a to store the taxonomy + /// which uses a to store the taxonomy /// information on disk, and keeps an additional in-memory cache of some or all /// categories. /// - /// In addition to the permanently-stored information in the , - /// efficiency dictates that we also keep an in-memory cache of recently - /// seen or all categories, so that we do not need to go back to disk + /// In addition to the permanently-stored information in the , + /// efficiency dictates that we also keep an in-memory cache of recently + /// seen or all categories, so that we do not need to go back to disk /// for every category addition to see which ordinal this category already has, - /// if any. A object determines the specific caching + /// if any. A object determines the specific caching /// algorithm used. /// /// /// This class offers some hooks for extending classes to control the - /// instance that is used. See . + /// instance that is used. See . /// /// @lucene.experimental /// @@ -77,7 +77,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Property name of user commit data that contains the index epoch. The epoch /// changes whenever the taxonomy is recreated (i.e. opened with - /// . + /// . /// /// Applications should not use this property in their commit data because it /// will be overridden by this taxonomy writer. @@ -107,12 +107,12 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// We call the cache "complete" if we know that every category in our - /// taxonomy is in the cache. When the cache is not complete, and + /// taxonomy is in the cache. When the cache is not complete, and /// we can't find a category in the cache, we still need to look for it /// in the on-disk index; Therefore when the cache is not complete, we /// need to open a "reader" to the taxonomy index. /// The cache becomes incomplete if it was never filled with the existing - /// categories, or if a put() to the cache ever returned true (meaning + /// categories, or if a Put() to the cache ever returned true (meaning /// that some of the cached data was cleared). /// private volatile bool cacheIsComplete; @@ -121,7 +121,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory private volatile int nextID; /// - /// Reads the commit data from a Directory. + /// Reads the commit data from a . private static IDictionary ReadCommitData(Directory dir) { SegmentInfos infos = new SegmentInfos(); @@ -136,9 +136,9 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// known that no other process nor thread is in fact currently accessing /// this taxonomy. ///

- /// This method is unnecessary if your uses a - /// instead of the default - /// . When the "native" lock is used, a lock + /// This method is unnecessary if your uses a + /// instead of the default + /// . When the "native" lock is used, a lock /// does not stay behind forever when the process using it dies. ///

public static void Unlock(Directory directory) @@ -150,28 +150,28 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// Construct a Taxonomy writer. ///
/// - /// The in which to store the taxonomy. Note that + /// The in which to store the taxonomy. Note that /// the taxonomy is written directly to that directory (not to a /// subdirectory of it). /// - /// Specifies how to open a taxonomy for writing: APPEND + /// Specifies how to open a taxonomy for writing: /// means open an existing index for append (failing if the index does - /// not yet exist). CREATE means create a new index (first + /// not yet exist). means create a new index (first /// deleting the old one if it already existed). - /// APPEND_OR_CREATE appends to an existing index if there + /// appends to an existing index if there /// is one, otherwise it creates a new index. /// - /// A implementation which determines + /// A implementation which determines /// the in-memory caching policy. See for example - /// and . - /// If null or missing, is used. + /// and . + /// If null or missing, is used. /// /// if the taxonomy is corrupted. /// /// if the taxonomy is locked by another writer. If it is known /// that no other concurrent writer is active, the lock might /// have been left around by an old dead process, and should be - /// removed using . + /// removed using . /// /// if another error occurred. public DirectoryTaxonomyWriter(Directory directory, OpenMode openMode, @@ -250,18 +250,17 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Open internal index writer, which contains the taxonomy data. /// - /// Extensions may provide their own implementation or instance. - ///
NOTE: the instance this method returns will be closed upon calling - /// to . + /// Extensions may provide their own implementation or instance. + ///
NOTE: the instance this method returns will be disposed upon calling + /// to . ///
NOTE: the merge policy in effect must not merge none adjacent segments. See - /// comment in for the logic behind this. + /// comment in for the logic behind this. /// ///
///
- /// + /// /// - /// the on top of which an + /// the on top of which an /// should be opened. /// /// configuration for the internal index writer. @@ -271,18 +270,17 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Create the that would be used for opening the internal index writer. - ///
Extensions can configure the as they see fit, - /// including setting a , or - /// , different RAM size + /// Create the that would be used for opening the internal index writer. + ///
Extensions can configure the as they see fit, + /// including setting a , or + /// , different RAM size /// etc.
///
NOTE: internal docids of the configured index must not be altered. /// For that, categories are never deleted from the taxonomy index. /// In addition, merge policy in effect must not merge none adjacent segments. ///
- /// - /// see + /// + /// see protected virtual IndexWriterConfig CreateIndexWriterConfig(OpenMode openMode) { // TODO: should we use a more optimized Codec, e.g. Pulsing (or write custom)? @@ -295,7 +293,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Opens a from the internal . + /// Opens a from the internal . /// private void InitReaderManager() { @@ -317,7 +315,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Creates a new instance with a default cache as defined by - /// . + /// . /// public DirectoryTaxonomyWriter(Directory directory, OpenMode openMode = OpenMode.CREATE_OR_APPEND) : this(directory, openMode, DefaultTaxonomyWriterCache()) @@ -325,12 +323,13 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Defines the default to use in constructors + /// Defines the default to use in constructors /// which do not specify one. - ///

- /// The current default is constructed + /// + /// The current default is constructed /// with the parameters (1024, 0.15f, 3), i.e., the entire taxonomy is /// cached in memory while building it. + /// ///

public static ITaxonomyWriterCache DefaultTaxonomyWriterCache() { @@ -338,9 +337,9 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Frees used resources as well as closes the underlying , + /// Frees used resources as well as closes the underlying , /// which commits whatever changes made to it to the underlying - /// . + /// . /// public void Dispose() { @@ -363,10 +362,12 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// A hook for extending classes to close additional resources that were used. - /// The default implementation closes the as well as the - /// instances that were used.
+ /// The default implementation closes the as well as the + /// instances that were used. + /// /// NOTE: if you override this method, you should include a - /// super.closeResources() call in your implementation. + /// base.CloseResources() call in your implementation. + /// ///
protected virtual void CloseResources() { @@ -529,7 +530,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Verifies that this instance wasn't closed, or throws - /// if it is. + /// if it is. /// protected internal void EnsureOpen() { @@ -540,7 +541,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Note that the methods calling addCategoryDocument() are synchornized, so + /// Note that the methods calling are synchornized, so /// this method is effectively synchronized as well. /// private int AddCategoryDocument(FacetLabel categoryPath, int parent) @@ -598,15 +599,16 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Set the value we want to keep, as the position increment. - /// Note that when TermPositions.nextPosition() is later used to + /// Note that when TermPositions.NextPosition() is later used to /// retrieve this value, val-1 will be returned, not val. - ///

+ /// /// IMPORTANT NOTE: Before Lucene 2.9, val>=0 were safe (for val==0, /// the retrieved position would be -1). But starting with Lucene 2.9, /// this unfortunately changed, and only val>0 are safe. val=0 can /// still be used, but don't count on the value you retrieve later /// (it could be 0 or -1, depending on circumstances or versions). - /// This change is described in Lucene's JIRA: LUCENE-1542. + /// This change is described in Lucene's JIRA: LUCENE-1542. + /// ///

public virtual void Set(int val) { @@ -679,7 +681,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Combine original user data with the taxonomy epoch. + /// Combine original user data with the taxonomy epoch. + /// private IDictionary CombinedCommitData(IDictionary commitData) { IDictionary m = new Dictionary(); @@ -706,7 +709,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// prepare most of the work needed for a two-phase commit. - /// See . + /// See . /// public virtual void PrepareCommit() { @@ -744,7 +747,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// after a certain number (defined by this method) of cache misses. /// /// - /// If the number is set to {@code 0}, the entire taxonomy is read into the + /// If the number is set to 0, the entire taxonomy is read into the /// cache on first use, without fetching individual categories first. /// /// @@ -894,7 +897,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Takes the categories from the given taxonomy directory, and adds the /// missing ones to this taxonomy. Additionally, it fills the given - /// with a mapping from the original ordinal to the new + /// with a mapping from the original ordinal to the new /// ordinal. /// public virtual void AddTaxonomy(Directory taxoDir, IOrdinalMap map) @@ -935,13 +938,13 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// Mapping from old ordinal to new ordinals, used when merging indexes /// wit separate taxonomies. /// - /// addToTaxonomies() merges one or more taxonomies into the given taxonomy - /// (this). An IOrdinalMap is filled for each of the added taxonomies, + /// merges one or more taxonomies into the given taxonomy + /// (this). An is filled for each of the added taxonomies, /// containing the new ordinal (in the merged taxonomy) of each of the /// categories in the old taxonomy. ///

- /// There exist two implementations of IOrdinalMap: MemoryOrdinalMap and - /// DiskOrdinalMap. As their names suggest, the former keeps the map in + /// There exist two implementations of : and + /// . As their names suggest, the former keeps the map in /// memory and the latter in a temporary disk file. Because these maps will /// later be needed one by one (to remap the counting lists), not all at the /// same time, it is recommended to put the first taxonomy's map in memory, @@ -952,10 +955,10 @@ namespace Lucene.Net.Facet.Taxonomy.Directory public interface IOrdinalMap { ///

- /// Set the size of the map. This MUST be called before addMapping(). - /// It is assumed (but not verified) that addMapping() will then be - /// called exactly 'size' times, with different origOrdinals between 0 - /// and size-1. + /// Set the size of the map. This MUST be called before . + /// It is assumed (but not verified) that will then be + /// called exactly 'size' times, with different between 0 + /// and size - 1. /// void SetSize(int taxonomySize); @@ -964,7 +967,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory void AddMapping(int origOrdinal, int newOrdinal); /// - /// Call addDone() to say that all addMapping() have been done. + /// Call to say that all have been done. /// In some implementations this might free some resources. /// void AddDone(); @@ -981,7 +984,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// maintained in memory + /// maintained in memory /// public sealed class MemoryOrdinalMap : IOrdinalMap { @@ -1026,7 +1029,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// maintained on file system + /// maintained on file system /// public sealed class DiskOrdinalMap : IOrdinalMap { @@ -1102,7 +1105,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Rollback changes to the taxonomy writer and closes the instance. Following /// this method the instance becomes unusable (calling any of its API methods - /// will yield an ). + /// will yield an ). /// public virtual void Rollback() { @@ -1117,7 +1120,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Replaces the current taxonomy with the given one. This method should /// generally be called in conjunction with - /// to replace both the taxonomy + /// to replace both the taxonomy /// as well as the search index content. /// public virtual void ReplaceTaxonomy(Directory taxoDir) @@ -1146,7 +1149,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Returns the of this taxonomy writer. + /// Returns the of this taxonomy writer. + /// public virtual Directory Directory { get @@ -1156,9 +1160,9 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Used by to support NRT. + /// Used by to support NRT. /// - /// NOTE: you should not use the obtained in any + /// NOTE: you should not use the obtained in any /// way, other than opening an IndexReader on it, or otherwise, the taxonomy /// index may become corrupt! /// @@ -1173,8 +1177,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory /// /// Expert: returns current index epoch, if this is a - /// near-real-time reader. Used by {@link - /// DirectoryTaxonomyReader} to support NRT. + /// near-real-time reader. Used by + /// to support NRT. /// /// @lucene.internal /// http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs b/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs index 9cbaaed..a261374 100644 --- a/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs +++ b/src/Lucene.Net.Facet/Taxonomy/Directory/TaxonomyIndexArrays.cs @@ -28,7 +28,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory using MultiFields = Lucene.Net.Index.MultiFields; /// - /// A that are initialized from the taxonomy + /// A that are initialized from the taxonomy /// index. /// /// @lucene.experimental @@ -45,7 +45,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory private int[] children, siblings; /// - /// Used by after the array grew. + /// Used by after the array grew. + /// private TaxonomyIndexArrays(int[] parents) { this.parents = parents; @@ -137,7 +138,9 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } } - // Read the parents of the new categories + /// + /// Read the parents of the new categories + /// private void InitParents(IndexReader reader, int first) { if (reader.MaxDoc == first) @@ -204,8 +207,8 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Returns the parents array, where {@code parents[i]} denotes the parent of - /// category ordinal {@code i}. + /// Returns the parents array, where Parents[i] denotes the parent of + /// category ordinal i. /// public override int[] Parents { @@ -216,10 +219,10 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Returns the children array, where {@code children[i]} denotes the youngest - /// child of category ordinal {@code i}. The youngest child is defined as the + /// Returns the children array, where Children[i] denotes the youngest + /// child of category ordinal i. The youngest child is defined as the /// category that was added last to the taxonomy as an immediate child of - /// {@code i}. + /// i. /// public override int[] Children { @@ -236,9 +239,9 @@ namespace Lucene.Net.Facet.Taxonomy.Directory } /// - /// Returns the siblings array, where {@code siblings[i]} denotes the sibling - /// of category ordinal {@code i}. The sibling is defined as the previous - /// youngest child of {@code parents[i]}. + /// Returns the siblings array, where Siblings[i] denotes the sibling + /// of category ordinal i. The sibling is defined as the previous + /// youngest child of Parents[i]. /// public override int[] Siblings { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/DocValuesOrdinalsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/DocValuesOrdinalsReader.cs b/src/Lucene.Net.Facet/Taxonomy/DocValuesOrdinalsReader.cs index 3d5cc53..b48eafd 100644 --- a/src/Lucene.Net.Facet/Taxonomy/DocValuesOrdinalsReader.cs +++ b/src/Lucene.Net.Facet/Taxonomy/DocValuesOrdinalsReader.cs @@ -25,21 +25,23 @@ using IntsRef = Lucene.Net.Util.IntsRef; /// - /// Decodes ordinals previously indexed into a BinaryDocValues field - + /// Decodes ordinals previously indexed into a field + /// public class DocValuesOrdinalsReader : OrdinalsReader { private readonly string field; /// - /// Default constructor. + /// Default constructor. + /// public DocValuesOrdinalsReader() : this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME) { } /// - /// Create this, with the specified indexed field name. + /// Create this, with the specified indexed field name. + /// public DocValuesOrdinalsReader(string field) { this.field = field; @@ -87,7 +89,8 @@ } /// - /// Subclass & override if you change the encoding. + /// Subclass & override if you change the encoding. + /// protected virtual void Decode(BytesRef buf, IntsRef ordinals) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs b/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs index edc68c0..56a16af 100644 --- a/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs +++ b/src/Lucene.Net.Facet/Taxonomy/FacetLabel.cs @@ -40,20 +40,21 @@ namespace Lucene.Net.Facet.Taxonomy * be on the safe side. */ /// - /// The maximum number of characters a can have. + /// The maximum number of characters a can have. /// public static readonly int MAX_CATEGORY_PATH_LENGTH = (BYTE_BLOCK_SIZE - 2) / 4; /// - /// The components of this . Note that this array may be - /// shared with other instances, e.g. as a result of - /// , therefore you should traverse the array up to - /// for this path's components. + /// The components of this . Note that this array may be + /// shared with other instances, e.g. as a result of + /// , therefore you should traverse the array up to + /// for this path's components. /// public string[] Components { get; private set; } /// - /// The number of components of this . + /// The number of components of this . + /// public int Length { get; private set; } // Used by subpath @@ -68,7 +69,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Construct from the given path components. + /// Construct from the given path components. + /// public FacetLabel(params string[] components) { this.Components = components; @@ -77,7 +79,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Construct from the dimension plus the given path components. + /// Construct from the dimension plus the given path components. + /// public FacetLabel(string dim, string[] path) { Components = new string[1 + path.Length]; @@ -106,7 +109,7 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Compares this path with another for lexicographic + /// Compares this path with another for lexicographic /// order. /// public virtual int CompareTo(FacetLabel other) @@ -171,10 +174,9 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Calculate a 64-bit hash function for this path. This - /// is necessary for (the - /// default cache impl for {@link - /// LruTaxonomyWriterCache}) to reduce the chance of - /// "silent but deadly" collisions. + /// is necessary for (the + /// default cache impl for ) + /// to reduce the chance of "silent but deadly" collisions. /// public virtual long LongHashCode() { @@ -192,16 +194,17 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Returns a sub-path of this path up to {@code length} components. - public virtual FacetLabel Subpath(int len) + /// Returns a sub-path of this path up to components. + /// + public virtual FacetLabel Subpath(int length) { - if (len >= this.Length || len < 0) + if (length >= this.Length || length < 0) { return this; } else { - return new FacetLabel(this, len); + return new FacetLabel(this, length); } } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs b/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs index 3511af8..6cb5043 100644 --- a/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs +++ b/src/Lucene.Net.Facet/Taxonomy/FastTaxonomyFacetCounts.cs @@ -26,15 +26,15 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Computes facets counts, assuming the default encoding - /// into DocValues was used. + /// into DocValues was used. /// /// @lucene.experimental /// public class FastTaxonomyFacetCounts : IntTaxonomyFacets { /// - /// Create {@code FastTaxonomyFacetCounts}, which also - /// counts all facet labels. + /// Create , which also + /// counts all facet labels. /// public FastTaxonomyFacetCounts(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) : this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME, taxoReader, config, fc) @@ -42,11 +42,11 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Create {@code FastTaxonomyFacetCounts}, using the - /// specified {@code indexFieldName} for ordinals. Use - /// this if you had set {@link - /// FacetsConfig#setIndexFieldName} to change the index - /// field name for certain dimensions. + /// Create , using the + /// specified for ordinals. Use + /// this if you had set + /// to change the index + /// field name for certain dimensions. /// public FastTaxonomyFacetCounts(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) : base(indexFieldName, taxoReader, config) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/FloatAssociationFacetField.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/FloatAssociationFacetField.cs b/src/Lucene.Net.Facet/Taxonomy/FloatAssociationFacetField.cs index 1b070a6..dbcf615 100644 --- a/src/Lucene.Net.Facet/Taxonomy/FloatAssociationFacetField.cs +++ b/src/Lucene.Net.Facet/Taxonomy/FloatAssociationFacetField.cs @@ -24,18 +24,17 @@ namespace Lucene.Net.Facet.Taxonomy using Document = Lucene.Net.Documents.Document; /// - /// Add an instance of this to your to add - /// a facet label associated with a float. Use {@link - /// TaxonomyFacetSumFloatAssociations} to aggregate float values - /// per facet label at search time. + /// Add an instance of this to your to add + /// a facet label associated with a float. Use + /// to aggregate float values per facet label at search time. /// /// @lucene.experimental /// public class FloatAssociationFacetField : AssociationFacetField { /// - /// Creates this from {@code dim} and {@code path} and a - /// float association + /// Creates this from and and a + /// float association /// public FloatAssociationFacetField(float assoc, string dim, params string[] path) : base(FloatToBytesRef(assoc), dim, path) @@ -43,14 +42,16 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Encodes a {@code float} as a 4-byte . + /// Encodes a as a 4-byte . + /// public static BytesRef FloatToBytesRef(float v) { return IntAssociationFacetField.IntToBytesRef(Number.FloatToIntBits(v)); } /// - /// Decodes a previously encoded {@code float}. + /// Decodes a previously encoded . + /// public static float BytesRefToFloat(BytesRef b) { return Number.IntBitsToFloat(IntAssociationFacetField.BytesRefToInt(b)); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs b/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs index 27c8eff..70dffb4 100644 --- a/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs +++ b/src/Lucene.Net.Facet/Taxonomy/FloatTaxonomyFacets.cs @@ -25,7 +25,7 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Base class for all taxonomy-based facets that aggregate - /// to a per-ords float[]. + /// to a per-ords . /// public abstract class FloatTaxonomyFacets : TaxonomyFacets { @@ -34,7 +34,8 @@ namespace Lucene.Net.Facet.Taxonomy protected readonly float[] values; /// - /// Sole constructor. + /// Sole constructor. + /// protected internal FloatTaxonomyFacets(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config) : base(indexFieldName, taxoReader, config) { @@ -42,7 +43,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Rolls up any single-valued hierarchical dimensions. + /// Rolls up any single-valued hierarchical dimensions. + /// protected virtual void Rollup() { // Rollup any necessary dims: http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/IntAssociationFacetField.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/IntAssociationFacetField.cs b/src/Lucene.Net.Facet/Taxonomy/IntAssociationFacetField.cs index e7b56d7..3cdf528 100644 --- a/src/Lucene.Net.Facet/Taxonomy/IntAssociationFacetField.cs +++ b/src/Lucene.Net.Facet/Taxonomy/IntAssociationFacetField.cs @@ -23,18 +23,17 @@ namespace Lucene.Net.Facet.Taxonomy using Document = Lucene.Net.Documents.Document; /// - /// Add an instance of this to your to add - /// a facet label associated with an int. Use {@link - /// TaxonomyFacetSumIntAssociations} to aggregate int values - /// per facet label at search time. + /// Add an instance of this to your to add + /// a facet label associated with an int. Use + /// to aggregate int values per facet label at search time. /// /// @lucene.experimental /// public class IntAssociationFacetField : AssociationFacetField { /// - /// Creates this from {@code dim} and {@code path} and an - /// int association + /// Creates this from and and an + /// int association /// public IntAssociationFacetField(int assoc, string dim, params string[] path) : base(IntToBytesRef(assoc), dim, path) @@ -42,8 +41,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Encodes an {@code int} as a 4-byte , - /// big-endian. + /// Encodes an as a 4-byte , + /// big-endian. /// public static BytesRef IntToBytesRef(int v) { @@ -58,7 +57,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Decodes a previously encoded {@code int}. + /// Decodes a previously encoded . + /// public static int BytesRefToInt(BytesRef b) { return ((b.Bytes[b.Offset] & 0xFF) << 24) | ((b.Bytes[b.Offset + 1] & 0xFF) << 16) | http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs b/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs index 2c4e533..60b59c9 100644 --- a/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs +++ b/src/Lucene.Net.Facet/Taxonomy/IntTaxonomyFacets.cs @@ -24,7 +24,7 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Base class for all taxonomy-based facets that aggregate - /// to a per-ords int[]. + /// to a per-ords . /// public abstract class IntTaxonomyFacets : TaxonomyFacets @@ -34,7 +34,8 @@ namespace Lucene.Net.Facet.Taxonomy protected internal readonly int[] values; /// - /// Sole constructor. + /// Sole constructor. + /// protected internal IntTaxonomyFacets(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config) : base(indexFieldName, taxoReader, config) { @@ -42,7 +43,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Rolls up any single-valued hierarchical dimensions. + /// Rolls up any single-valued hierarchical dimensions. + /// protected virtual void Rollup() { // Rollup any necessary dims: http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/LRUHashMap.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/LRUHashMap.cs b/src/Lucene.Net.Facet/Taxonomy/LRUHashMap.cs index 059f834..5ff77fb 100644 --- a/src/Lucene.Net.Facet/Taxonomy/LRUHashMap.cs +++ b/src/Lucene.Net.Facet/Taxonomy/LRUHashMap.cs @@ -22,33 +22,17 @@ namespace Lucene.Net.Facet.Taxonomy */ /// - /// LRUHashMap is an extension of Java's HashMap, which has a bounded size(); - /// When it reaches that size, each time a new element is added, the least + /// is similar to of Java's HashMap, which has a bounded ; + /// When it reaches that , each time a new element is added, the least /// recently used (LRU) entry is removed. /// - /// Java makes it very easy to implement LRUHashMap - all its functionality is - /// already available from , and we just need to - /// configure that properly. + /// Unlike the Java Lucene implementation, this one is thread safe. Do note + /// that every time an element is read from , + /// a write operation also takes place to update the element's last access time. + /// This is because the LRU order needs to be remembered to determine which element + /// to evict when the is exceeded. /// /// - /// Note that like HashMap, LRUHashMap is unsynchronized, and the user MUST - /// synchronize the access to it if used from several threads. Moreover, while - /// with HashMap this is only a concern if one of the threads is modifies the - /// map, with LURHashMap every read is a modification (because the LRU order - /// needs to be remembered) so proper synchronization is always necessary. - /// - /// - /// With the usual synchronization mechanisms available to the user, this - /// unfortunately means that LRUHashMap will probably perform sub-optimally under - /// heavy contention: while one thread uses the hash table (reads or writes), any - /// other thread will be blocked from using it - or even just starting to use it - /// (e.g., calculating the hash function). A more efficient approach would be not - /// to use LinkedHashMap at all, but rather to use a non-locking (as much as - /// possible) thread-safe solution, something along the lines of - /// java.util.concurrent.ConcurrentHashMap (though that particular class does not - /// support the additional LRU semantics, which will need to be added separately - /// using a concurrent linked list or additional storage of timestamps (in an - /// array or inside the entry objects), or whatever). /// /// @lucene.experimental /// @@ -74,6 +58,17 @@ namespace Lucene.Net.Facet.Taxonomy this.cache = new Dictionary(capacity); } + /// + /// allows changing the map's maximal number of elements + /// which was defined at construction time. + /// + /// Note that if the map is already larger than maxSize, the current + /// implementation does not shrink it (by removing the oldest elements); + /// Rather, the map remains in its current size as new elements are + /// added, and will only start shrinking (until settling again on the + /// given ) if existing elements are explicitly deleted. + /// + /// public virtual int Capacity { get { return capacity; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/OrdinalsReader.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/OrdinalsReader.cs b/src/Lucene.Net.Facet/Taxonomy/OrdinalsReader.cs index c8e4843..3223b6a 100644 --- a/src/Lucene.Net.Facet/Taxonomy/OrdinalsReader.cs +++ b/src/Lucene.Net.Facet/Taxonomy/OrdinalsReader.cs @@ -23,16 +23,16 @@ /// /// Provides per-document ordinals. /// - public abstract class OrdinalsReader { /// - /// Returns ordinals for documents in one segment. + /// Returns ordinals for documents in one segment. + /// public abstract class OrdinalsSegmentReader { /// - /// Get the ordinals for this document. ordinals.offset - /// must always be 0! + /// Get the ordinals for this document. The . + /// must always be 0! /// public abstract void Get(int doc, IntsRef ordinals); @@ -57,8 +57,8 @@ public abstract OrdinalsSegmentReader GetReader(AtomicReaderContext context); /// - /// Returns the indexed field name this {@code - /// OrdinalsReader} is reading from. + /// Returns the indexed field name this + /// is reading from. /// public abstract string IndexFieldName { get; } } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs b/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs index 1b51568..297c5c2 100644 --- a/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs +++ b/src/Lucene.Net.Facet/Taxonomy/ParallelTaxonomyArrays.cs @@ -19,18 +19,18 @@ /// /// Returns 3 arrays for traversing the taxonomy: - ///
    - ///
  • {@code parents}: {@code parents[i]} denotes the parent of category - /// ordinal {@code i}.
  • - ///
  • {@code children}: {@code children[i]} denotes a child of category ordinal - /// {@code i}.
  • - ///
  • {@code siblings}: {@code siblings[i]} denotes the sibling of category - /// ordinal {@code i}.
  • - ///
+ /// + /// : Parents[i] denotes the parent of category + /// ordinal i. + /// : Children[i] denotes a child of category ordinal + /// i. + /// : Siblings[i] denotes the sibling of category + /// ordinal i. + /// /// - /// To traverse the taxonomy tree, you typically start with {@code children[0]} + /// To traverse the taxonomy tree, you typically start with Children[0] /// (ordinal 0 is reserved for ROOT), and then depends if you want to do DFS or - /// BFS, you call {@code children[children[0]]} or {@code siblings[children[0]]} + /// BFS, you call Children[Children[0]] or Siblings[Children[0]] /// and so forth, respectively. /// /// @@ -43,26 +43,27 @@ public abstract class ParallelTaxonomyArrays { /// - /// Sole constructor. + /// Sole constructor. + ///
public ParallelTaxonomyArrays() { } /// - /// Returns the parents array, where {@code parents[i]} denotes the parent of - /// category ordinal {@code i}. + /// Returns the parents array, where Parents[i] denotes the parent of + /// category ordinal i. /// public abstract int[] Parents { get; } /// - /// Returns the children array, where {@code children[i]} denotes a child of - /// category ordinal {@code i}. + /// Returns the children array, where Children[i] denotes a child of + /// category ordinal i. /// public abstract int[] Children { get; } /// - /// Returns the siblings array, where {@code siblings[i]} denotes the sibling - /// of category ordinal {@code i}. + /// Returns the siblings array, where Siblings[i] denotes the sibling + /// of category ordinal i. /// public abstract int[] Siblings { get; } } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/PrintTaxonomyStats.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/PrintTaxonomyStats.cs b/src/Lucene.Net.Facet/Taxonomy/PrintTaxonomyStats.cs index 601e5d8..1f94b86 100644 --- a/src/Lucene.Net.Facet/Taxonomy/PrintTaxonomyStats.cs +++ b/src/Lucene.Net.Facet/Taxonomy/PrintTaxonomyStats.cs @@ -26,19 +26,22 @@ namespace Lucene.Net.Facet.Taxonomy using FSDirectory = Lucene.Net.Store.FSDirectory; /// - /// Prints how many ords are under each dimension. + /// Prints how many ords are under each dimension. + /// // java -cp ../build/core/classes/java:../build/facet/classes/java org.apache.lucene.facet.util.PrintTaxonomyStats -printTree /s2/scratch/indices/wikibig.trunk.noparents.facets.Lucene41.nd1M/facets public class PrintTaxonomyStats { /// - /// Sole constructor. + /// Sole constructor. + /// public PrintTaxonomyStats() { } /// - /// Command-line tool. + /// Command-line tool. + /// public static void Main(string[] args) { bool printTree = false; @@ -56,6 +59,7 @@ namespace Lucene.Net.Facet.Taxonomy } if (args.Length != (printTree ? 2 : 1)) { + // LUCENENET TODO: Usage depends on wrapping this into a console application assembly. Console.WriteLine("\nUsage: java -classpath ... org.apache.lucene.facet.util.PrintTaxonomyStats [-printTree] /path/to/taxononmy/index\n"); Environment.Exit(1); } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/SearcherTaxonomyManager.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/SearcherTaxonomyManager.cs b/src/Lucene.Net.Facet/Taxonomy/SearcherTaxonomyManager.cs index 2c8edb3..8fb75d8 100644 --- a/src/Lucene.Net.Facet/Taxonomy/SearcherTaxonomyManager.cs +++ b/src/Lucene.Net.Facet/Taxonomy/SearcherTaxonomyManager.cs @@ -32,32 +32,35 @@ namespace Lucene.Net.Facet.Taxonomy using SearcherManager = Lucene.Net.Search.SearcherManager; /// - /// Manages near-real-time reopen of both an IndexSearcher - /// and a TaxonomyReader. + /// Manages near-real-time reopen of both an + /// and a . /// - /// NOTE: If you call {@link - /// DirectoryTaxonomyWriter#replaceTaxonomy} then you must - /// open a new {@code SearcherTaxonomyManager} afterwards. + /// + /// NOTE: If you call + /// then you must open a new afterwards. /// /// public class SearcherTaxonomyManager : ReferenceManager { /// - /// Holds a matched pair of and - /// + /// Holds a matched pair of and + /// /// public class SearcherAndTaxonomy { /// - /// Point-in-time . + /// Point-in-time . + /// public IndexSearcher Searcher { get; private set; } /// - /// Matching point-in-time . + /// Matching point-in-time . + /// public DirectoryTaxonomyReader TaxonomyReader { get; private set; } /// - /// Create a SearcherAndTaxonomy + /// Create a + /// public SearcherAndTaxonomy(IndexSearcher searcher, DirectoryTaxonomyReader taxonomyReader) { this.Searcher = searcher; @@ -71,7 +74,7 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Creates near-real-time searcher and taxonomy reader - /// from the corresponding writers. + /// from the corresponding writers. /// public SearcherTaxonomyManager(IndexWriter writer, bool applyAllDeletes, SearcherFactory searcherFactory, DirectoryTaxonomyWriter taxoWriter) @@ -93,8 +96,8 @@ namespace Lucene.Net.Facet.Taxonomy /// /// /// NOTE: you should only use this constructor if you commit and call - /// in the same thread. Otherwise it could lead to an - /// unsync'd and pair. + /// in the same thread. Otherwise it could lead to an + /// unsync'd and pair. /// /// public SearcherTaxonomyManager(Store.Directory indexDir, Store.Directory taxoDir, SearcherFactory searcherFactory) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs index b86c924..aa4acac 100644 --- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs +++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs @@ -25,9 +25,8 @@ namespace Lucene.Net.Facet.Taxonomy using MatchingDocs = FacetsCollector.MatchingDocs; /// - /// Reads from any ; use {@link - /// FastTaxonomyFacetCounts} if you are using the - /// default encoding from . + /// Reads from any ; use + /// if you are using the default encoding from . /// /// @lucene.experimental /// @@ -36,10 +35,9 @@ namespace Lucene.Net.Facet.Taxonomy private readonly OrdinalsReader ordinalsReader; /// - /// Create {@code TaxonomyFacetCounts}, which also - /// counts all facet labels. Use this for a non-default - /// ; otherwise use {@link - /// FastTaxonomyFacetCounts}. + /// Create , which also + /// counts all facet labels. Use this for a non-default + /// ; otherwise use . /// public TaxonomyFacetCounts(OrdinalsReader ordinalsReader, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) : base(ordinalsReader.IndexFieldName, taxoReader, config) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs index e30cef2..242466d 100644 --- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs +++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumFloatAssociations.cs @@ -27,16 +27,16 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Aggregates sum of int values previously indexed with - /// , assuming the default - /// encoding. + /// , assuming the default + /// encoding. /// /// @lucene.experimental /// public class TaxonomyFacetSumFloatAssociations : FloatTaxonomyFacets { /// - /// Create {@code TaxonomyFacetSumFloatAssociations} against - /// the default index field. + /// Create against + /// the default index field. /// public TaxonomyFacetSumFloatAssociations(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) : this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME, taxoReader, config, fc) @@ -44,8 +44,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Create {@code TaxonomyFacetSumFloatAssociations} against - /// the specified index field. + /// Create against + /// the specified index field. /// public TaxonomyFacetSumFloatAssociations(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) : base(indexFieldName, taxoReader, config) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs index 7ff982b..07b78b0 100644 --- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs +++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumIntAssociations.cs @@ -26,16 +26,16 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Aggregates sum of int values previously indexed with - /// , assuming the default - /// encoding. + /// , assuming the default + /// encoding. /// /// @lucene.experimental /// public class TaxonomyFacetSumIntAssociations : IntTaxonomyFacets { /// - /// Create {@code TaxonomyFacetSumIntAssociations} against - /// the default index field. + /// Create against + /// the default index field. /// public TaxonomyFacetSumIntAssociations(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) : this(FacetsConfig.DEFAULT_INDEX_FIELD_NAME, taxoReader, config, fc) @@ -43,8 +43,8 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Create {@code TaxonomyFacetSumIntAssociations} against - /// the specified index field. + /// Create against + /// the specified index field. /// public TaxonomyFacetSumIntAssociations(string indexFieldName, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc) : base(indexFieldName, taxoReader, config) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs index ffe18df..c5e5cb5 100644 --- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs +++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetSumValueSource.cs @@ -33,8 +33,8 @@ namespace Lucene.Net.Facet.Taxonomy using Weight = Lucene.Net.Search.Weight; /// - /// Aggregates sum of values from {@link - /// FunctionValues#doubleVal}, for each facet label. + /// Aggregates sum of values from , + /// for each facet label. /// /// @lucene.experimental /// @@ -44,10 +44,9 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Aggreggates float facet values from the provided - /// , pulling ordinals using {@link - /// DocValuesOrdinalsReader} against the default indexed - /// facet field {@link - /// FacetsConfig#DEFAULT_INDEX_FIELD_NAME}. + /// , pulling ordinals using + /// against the default indexed + /// facet field . /// public TaxonomyFacetSumValueSource(TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, ValueSource valueSource) @@ -58,8 +57,8 @@ namespace Lucene.Net.Facet.Taxonomy /// /// Aggreggates float facet values from the provided - /// , and pulls ordinals from the - /// provided . + /// , and pulls ordinals from the + /// provided . /// public TaxonomyFacetSumValueSource(OrdinalsReader ordinalsReader, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc, ValueSource valueSource) @@ -158,15 +157,16 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// that returns the score for each - /// hit; use this to aggregate the sum of all hit scores - /// for each facet label. + /// that returns the score for each + /// hit; use this to aggregate the sum of all hit scores + /// for each facet label. /// public class ScoreValueSource : ValueSource { /// - /// Sole constructor. + /// Sole constructor. + /// public ScoreValueSource() { } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/44958102/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs index ef8dede..87ea6d0 100644 --- a/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs +++ b/src/Lucene.Net.Facet/Taxonomy/TaxonomyFacets.cs @@ -25,7 +25,8 @@ namespace Lucene.Net.Facet.Taxonomy using DimConfig = Lucene.Net.Facet.FacetsConfig.DimConfig; // javadocs /// - /// Base class for all taxonomy-based facets impls. + /// Base class for all taxonomy-based facets impls. + /// public abstract class TaxonomyFacets : Facets { private static readonly IComparer BY_VALUE_THEN_DIM = new ComparatorAnonymousInnerClassHelper(); @@ -54,26 +55,29 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Index field name provided to the constructor. + /// Index field name provided to the constructor. + /// protected readonly string indexFieldName; /// - /// {@code TaxonomyReader} provided to the constructor. + /// provided to the constructor. + /// protected readonly TaxonomyReader taxoReader; /// - /// {@code FacetsConfig} provided to the constructor. + /// provided to the constructor. + /// protected readonly FacetsConfig config; /// /// Maps parent ordinal to its child, or -1 if the parent - /// is childless. + /// is childless. /// protected readonly int[] children; /// /// Maps an ordinal to its sibling, or -1 if there is no - /// sibling. + /// sibling. /// protected readonly int[] siblings; @@ -91,9 +95,9 @@ namespace Lucene.Net.Facet.Taxonomy } /// - /// Throws {@code IllegalArgumentException} if the - /// dimension is not recognized. Otherwise, returns the - /// for this dimension. + /// Throws if the + /// dimension is not recognized. Otherwise, returns the + /// for this dimension. /// protected internal virtual DimConfig VerifyDim(string dim) {