Return-Path: X-Original-To: apmail-lucenenet-commits-archive@www.apache.org Delivered-To: apmail-lucenenet-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55986113FF for ; Fri, 1 Aug 2014 17:35:29 +0000 (UTC) Received: (qmail 8842 invoked by uid 500); 1 Aug 2014 17:35:29 -0000 Delivered-To: apmail-lucenenet-commits-archive@lucenenet.apache.org Received: (qmail 8731 invoked by uid 500); 1 Aug 2014 17:35:29 -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 8715 invoked by uid 99); 1 Aug 2014 17:35:29 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Aug 2014 17:35:29 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E16DD9BDDD3; Fri, 1 Aug 2014 17:35:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mherndon@apache.org To: commits@lucenenet.apache.org Date: Fri, 01 Aug 2014 17:35:31 -0000 Message-Id: <1298d74c585c44a6be0c6b76145672ac@git.apache.org> In-Reply-To: <9e99504b00c144d38e723ec3f65bf9fd@git.apache.org> References: <9e99504b00c144d38e723ec3f65bf9fd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] git commit: adding initial documentation on sorting. adding initial documentation on sorting. Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/2c8e873b Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/2c8e873b Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/2c8e873b Branch: refs/heads/pcl Commit: 2c8e873b43d55ede354dc7366a5ff69d4f6c884b Parents: 0fbb29e Author: Michael Herndon Authored: Fri Aug 1 13:32:09 2014 -0400 Committer: Michael Herndon Committed: Fri Aug 1 13:32:09 2014 -0400 ---------------------------------------------------------------------- docs/sorting.md | 11 +++++++++++ 1 file changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2c8e873b/docs/sorting.md ---------------------------------------------------------------------- diff --git a/docs/sorting.md b/docs/sorting.md new file mode 100644 index 0000000..1b26773 --- /dev/null +++ b/docs/sorting.md @@ -0,0 +1,11 @@ +#Sorting + +The system libraries in Java and C# have differences in the default sorting mechanism for their respective frameworks. + +[Array.Sort](http://msdn.microsoft.com/en-us/library/kwx6zbd4\(v=vs.110\).aspx)in C# uses [Quick Sort](http://algs4.cs.princeton.edu/23quicksort) as the default algorithm for soring. + +[Array.sort](http://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html#sort(T\[\],%20java.util.Comparator) in in Java uses the [Tim Sort](http://svn.python.org/projects/python/trunk/Objects/listsort.txt) as the default sorting algorithm as of Java 7. + +The differences in sorting methods could account for the discrepencies between running ported tests for the various sorting algorithms in Lucene core. + +The base sorter test class uses Array.sort in order to test the ordinal order of elements in the array. Because of the differences of sorting alogrithm in the languages, this may break the tests that test for the oridinal positions. \ No newline at end of file