diff options
author | Sopot Cela | 2016-11-09 12:43:26 +0000 |
---|---|---|
committer | Sopot Cela | 2016-11-09 12:43:26 +0000 |
commit | ad603c7e425e44239148f16c15da24e13bab153b (patch) | |
tree | edc070d262d069b51938268fe3b72234fa18aab3 /org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsToken.java | |
parent | 5bf6a6d33bac1e234a0d3b153d59d3c0d6229a42 (diff) | |
download | eclipse.platform.ua-ad603c7e425e44239148f16c15da24e13bab153b.tar.gz eclipse.platform.ua-ad603c7e425e44239148f16c15da24e13bab153b.tar.xz eclipse.platform.ua-ad603c7e425e44239148f16c15da24e13bab153b.zip |
Bug 466829 - Upgrade platform.ua to Lucene 6.1.0I20161114-2000I20161114-0355I20161113-2000I20161112-2000I20161112-0405I20161111-2000I20161111-1220I20161111-0900I20161111-0740I20161111-0510
Note that for exact analyzer use (wildcard and exact searches using
quotes) the number of results will not match because of a bug in the old
code.
The files added under folders .../indexXYZ are needed for compatibility
tests which I added. See PrebuiltIndexCompatibility.java changes.
Change-Id: Id18cdb387ada7f2c30eecbe59b726d3bf6dd00c1
Signed-off-by: Sopot Cela <scela@redhat.com>
Diffstat (limited to 'org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsToken.java')
-rw-r--r-- | org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsToken.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsToken.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsToken.java index 6ba76f209..ce0014a44 100644 --- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsToken.java +++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/QueryWordsToken.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Sopot Cela - Bug 466829 *******************************************************************************/ package org.eclipse.help.internal.search; import org.apache.lucene.index.*; @@ -41,16 +42,16 @@ public class QueryWordsToken { if (questionPos == -1 && starPos == value.length() - 1) { Term t = new Term("exact_" + field, value.substring(0, starPos)); //$NON-NLS-1$ q = new PrefixQuery(t); - ((PrefixQuery) q).setBoost(boost); + q = new BoostQuery(q, boost); } else { Term t = new Term("exact_" + field, value); //$NON-NLS-1$ q = new WildcardQuery(t); - ((WildcardQuery) q).setBoost(boost); + q = new BoostQuery(q, boost); } } else { Term t = new Term(field, value); q = new TermQuery(t); - ((TermQuery) q).setBoost(boost); + q = new BoostQuery(q, boost); } // after updating Lucene, set boost on a Query class return q; |