You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2017/01/03 10:38:56 UTC

[2/2] lucene-solr:branch_6x: LUCENE-7603: handle graph token streams in query parsers

LUCENE-7603: handle graph token streams in query parsers


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c980f6a1
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c980f6a1
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c980f6a1

Branch: refs/heads/branch_6x
Commit: c980f6a1c2a33a039d09a83cd5b9b95a58fa784f
Parents: fb39e39 0a5300a
Author: Mike McCandless <mi...@apache.org>
Authored: Tue Jan 3 05:38:26 2017 -0500
Committer: Mike McCandless <mi...@apache.org>
Committed: Tue Jan 3 05:38:26 2017 -0500

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |   4 +
 .../org/apache/lucene/search/GraphQuery.java    | 137 +++++++++++
 .../org/apache/lucene/util/QueryBuilder.java    | 119 ++++++++--
 .../graph/GraphTokenStreamFiniteStrings.java    | 230 +++++++++++++++++++
 .../apache/lucene/util/graph/package-info.java  |  21 ++
 .../apache/lucene/search/TestGraphQuery.java    |  80 +++++++
 .../apache/lucene/util/TestQueryBuilder.java    |  15 +-
 .../TestGraphTokenStreamFiniteStrings.java      | 217 +++++++++++++++++
 .../queryparser/classic/QueryParserBase.java    |  42 +++-
 .../classic/TestMultiFieldQueryParser.java      |  12 +-
 .../queryparser/classic/TestQueryParser.java    | 111 ++++-----
 11 files changed, 894 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c980f6a1/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --cc lucene/CHANGES.txt
index afa65d5,afa65d5..97514fc
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@@ -38,6 -38,6 +38,10 @@@ New feature
    type-safe replacements for ValueSource in the queries module.  These
    expose per-segment LongValues or DoubleValues iterators. (Alan Woodward, Adrien Grand)
  
++* LUCENE-7603: Graph token streams are now handled accurately by query
++  parsers, by enumerating all paths and creating the corresponding
++  query/ies as sub-clauses (Matt Weber via Mike McCandless)
++
  Bug Fixes
  
  * LUCENE-7547: JapaneseTokenizerFactory was failing to close the

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c980f6a1/lucene/core/src/java/org/apache/lucene/util/graph/package-info.java
----------------------------------------------------------------------
diff --cc lucene/core/src/java/org/apache/lucene/util/graph/package-info.java
index 0000000,0000000..bbc9b6a
new file mode 100644
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/util/graph/package-info.java
@@@ -1,0 -1,0 +1,21 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one or more
++ * contributor license agreements.  See the NOTICE file distributed with
++ * this work for additional information regarding copyright ownership.
++ * The ASF licenses this file to You under the Apache License, Version 2.0
++ * (the "License"); you may not use this file except in compliance with
++ * the License.  You may obtain a copy of the License at
++ *
++ *     http://www.apache.org/licenses/LICENSE-2.0
++ *
++ * Unless required by applicable law or agreed to in writing, software
++ * distributed under the License is distributed on an "AS IS" BASIS,
++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++ * See the License for the specific language governing permissions and
++ * limitations under the License.
++ */
++
++/**
++ * Utility classes for working with token streams as graphs.
++ */
++package org.apache.lucene.util.graph;