From a1966d93c710d0f0134d8801eb997859a03a5ed3 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Wed, 22 Nov 2006 22:45:23 +0000 Subject: [PATCH] import and whitespace cleanup only git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@478355 13f79535-47bb-0310-9956-ffa450edef68 --- .../search/similar/SimilarityQueries.java | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/contrib/queries/src/java/org/apache/lucene/search/similar/SimilarityQueries.java b/contrib/queries/src/java/org/apache/lucene/search/similar/SimilarityQueries.java index 3ee237e861c..2214d50fe8a 100644 --- a/contrib/queries/src/java/org/apache/lucene/search/similar/SimilarityQueries.java +++ b/contrib/queries/src/java/org/apache/lucene/search/similar/SimilarityQueries.java @@ -15,21 +15,23 @@ */ package org.apache.lucene.search.similar; -import java.io.*; -import java.util.*; -import java.net.*; +import java.io.IOException; +import java.io.StringReader; +import java.util.HashSet; +import java.util.Set; -import org.apache.lucene.analysis.*; -import org.apache.lucene.analysis.standard.*; -import org.apache.lucene.document.*; -import org.apache.lucene.search.*; -import org.apache.lucene.index.*; -import org.apache.lucene.util.*; +import org.apache.lucene.analysis.Analyzer; +import org.apache.lucene.analysis.TokenStream; +import org.apache.lucene.index.Term; +import org.apache.lucene.search.BooleanClause; +import org.apache.lucene.search.BooleanQuery; +import org.apache.lucene.search.IndexSearcher; +import org.apache.lucene.search.Query; +import org.apache.lucene.search.TermQuery; /** * Simple similarity measures. * - * * @see MoreLikeThis */ public final class SimilarityQueries @@ -42,14 +44,13 @@ public final class SimilarityQueries } /** - * Simple similarity query generators. + * Simple similarity query generators. * Takes every unique word and forms a boolean query where all words are optional. * After you get this you'll use to to query your {@link IndexSearcher} for similar docs. * The only caveat is the first hit returned should be your source document - you'll * need to then ignore that. * *

- * * So, if you have a code fragment like this: *
* @@ -57,8 +58,6 @@ public final class SimilarityQueries * * *

- * - * The query returned, in string form, will be '(i use lucene to search fast searchers are good'). * *

@@ -72,10 +71,6 @@ public final class SimilarityQueries * {@link org.apache.lucene.search.BooleanQuery.TooManyClauses BooleanQuery.TooManyClauses}, the * query as it is will be returned. * - * - * - * - * * @param body the body of the document you want to find similar documents to * @param a the analyzer to use to parse the body * @param field the field you want to search on, probably something like "contents" or "body"