~ubuntu-branches/ubuntu/jaunty/beagle/jaunty-security

« back to all changes in this revision

Viewing changes to beagled/Lucene.Net/Search/FuzzyTermEnum.cs

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2008-05-04 00:31:32 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20080504003132-2tkm5o8moo5952ri
Tags: 0.3.7-2ubuntu1
 * Merge from Debian unstable. (LP: #225746) Remaining Ubuntu changes:
  - debian/control:
    + Rename ice{weasel,dove}-beagle to {mozilla,thunderbird}-beagle and
      and update the dependencies accordingly.
    + Change Maintainer to Ubuntu Mono Team.
  - debian/rules:
    + Install the mozilla-beagle and thunderbird-beagle extensions.
  - ice{dove,weasel}.dirs:
    + Renamed to {mozilla,thunderbird}-beagle.dirs.
    + Fixed paths to point to usr/lib/{firefox,thunderbird}

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2004 The Apache Software Foundation
3
 
 * 
4
 
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 
 * you may not use this file except in compliance with the License.
6
 
 * You may obtain a copy of the License at
 
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
 
3
 * contributor license agreements.  See the NOTICE file distributed with
 
4
 * this work for additional information regarding copyright ownership.
 
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
 
6
 * (the "License"); you may not use this file except in compliance with
 
7
 * the License.  You may obtain a copy of the License at
7
8
 * 
8
9
 * http://www.apache.org/licenses/LICENSE-2.0
9
10
 * 
15
16
 */
16
17
 
17
18
using System;
 
19
 
18
20
using IndexReader = Lucene.Net.Index.IndexReader;
19
21
using Term = Lucene.Net.Index.Term;
20
22
 
59
61
                /// valid term if such a term exists. 
60
62
                /// 
61
63
                /// </summary>
62
 
                /// <param name="reader">
 
64
                /// <param name="">reader
63
65
                /// </param>
64
 
                /// <param name="term">
 
66
                /// <param name="">term
65
67
                /// </param>
66
68
                /// <throws>  IOException </throws>
67
 
                /// <seealso cref="FuzzyTermEnum(IndexReader, Term, float, int)">
 
69
                /// <seealso cref="Term, float, int)">
68
70
                /// </seealso>
69
71
                public FuzzyTermEnum(IndexReader reader, Term term) : this(reader, term, FuzzyQuery.defaultMinSimilarity, FuzzyQuery.defaultPrefixLength)
70
72
                {
76
78
                /// valid term if such a term exists. 
77
79
                /// 
78
80
                /// </summary>
79
 
                /// <param name="reader">
80
 
                /// </param>
81
 
                /// <param name="term">
82
 
                /// </param>
83
 
                /// <param name="minSimilarity">
 
81
                /// <param name="">reader
 
82
                /// </param>
 
83
                /// <param name="">term
 
84
                /// </param>
 
85
                /// <param name="">minSimilarity
84
86
                /// </param>
85
87
                /// <throws>  IOException </throws>
86
 
                /// <seealso cref="FuzzyTermEnum(IndexReader, Term, float, int)">
 
88
                /// <seealso cref="Term, float, int)">
87
89
                /// </seealso>
88
90
                public FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity) : this(reader, term, minSimilarity, FuzzyQuery.defaultPrefixLength)
89
91
                {
324
326
                /// </returns>
325
327
                private int GetMaxDistance(int m)
326
328
                {
327
 
                        return (m < maxDistances.Length)?maxDistances[m]:CalculateMaxDistance(m);
 
329
                        return (m < maxDistances.Length) ? maxDistances[m] : CalculateMaxDistance(m);
328
330
                }
329
331
                
330
332
                private void  InitializeMaxDistances()