I (hopefully) fixed this. Uwe
----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: [email protected] > -----Original Message----- > From: Uwe Schindler [mailto:[email protected]] > Sent: Friday, May 20, 2016 10:32 PM > To: [email protected] > Subject: RE: lucene-solr:master: LUCENE-7293: don't try to highlight GeoPoint > queries > > Hi this commit seems to break benchmark module on all 3 branches! > > e.g., http://jenkins.thetaphi.de/job/Lucene-Solr-6.x-Linux/706/ > http://jenkins.thetaphi.de/job/Lucene-Solr-master-Linux/16799/ > > Uwe > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: [email protected] > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] > > Sent: Friday, May 20, 2016 8:51 PM > > To: [email protected] > > Subject: lucene-solr:master: LUCENE-7293: don't try to highlight GeoPoint > > queries > > > > Repository: lucene-solr > > Updated Branches: > > refs/heads/master c0784d29b -> aa90b88e2 > > > > > > LUCENE-7293: don't try to highlight GeoPoint queries > > > > > > Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo > > Commit: http://git-wip-us.apache.org/repos/asf/lucene- > > solr/commit/aa90b88e > > Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/aa90b88e > > Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/aa90b88e > > > > Branch: refs/heads/master > > Commit: aa90b88e2d214d7c999c2c678e92beaec9781100 > > Parents: c0784d2 > > Author: Mike McCandless <[email protected]> > > Authored: Fri May 20 14:48:35 2016 -0400 > > Committer: Mike McCandless <[email protected]> > > Committed: Fri May 20 14:50:06 2016 -0400 > > > > ---------------------------------------------------------------------- > > lucene/CHANGES.txt | 3 ++ > > lucene/highlighter/build.xml | 3 +- > > .../highlight/WeightedSpanTermExtractor.java | 5 ++- > > .../search/highlight/HighlighterTest.java | 32 +++++++++++++++++--- > > 4 files changed, 37 insertions(+), 6 deletions(-) > > ---------------------------------------------------------------------- > > > > > > http://git-wip-us.apache.org/repos/asf/lucene- > > solr/blob/aa90b88e/lucene/CHANGES.txt > > ---------------------------------------------------------------------- > > diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt > > index 5eabdb4..00fc633 100644 > > --- a/lucene/CHANGES.txt > > +++ b/lucene/CHANGES.txt > > @@ -124,6 +124,9 @@ Bug Fixes > > * LUCENE-7231: WeightedSpanTermExtractor didn't deal correctly with > > single-term > > phrase queries. (Eva Popenda, Alan Woodward) > > > > +* LUCENE-7293: Don't try to highlight GeoPoint queries (Britta Weber, > > + Nick Knize, Mike McCandless) > > + > > Documentation > > > > * LUCENE-7223: Improve XXXPoint javadocs to make it clear that you > > > > http://git-wip-us.apache.org/repos/asf/lucene- > > solr/blob/aa90b88e/lucene/highlighter/build.xml > > ---------------------------------------------------------------------- > > diff --git a/lucene/highlighter/build.xml b/lucene/highlighter/build.xml > > index e0dfa7e..e706b99 100644 > > --- a/lucene/highlighter/build.xml > > +++ b/lucene/highlighter/build.xml > > @@ -31,12 +31,13 @@ > > <path id="classpath"> > > <pathelement path="${memory.jar}"/> > > <pathelement path="${queries.jar}"/> > > + <pathelement path="${spatial.jar}"/> > > <pathelement path="${join.jar}"/> > > <pathelement path="${analyzers-common.jar}"/> > > <path refid="base.classpath"/> > > </path> > > > > - <target name="compile-core" depends="jar-memory,jar-queries,jar- > > join,jar-analyzers-common,common.compile-core" /> > > + <target name="compile-core" depends="jar-memory,jar-spatial,jar- > > queries,jar-join,jar-analyzers-common,common.compile-core" /> > > > > <target name="javadocs" depends="javadocs-memory,compile- > > core,check-javadocs-uptodate" > > unless="javadocs-uptodate-${name}"> > > > > http://git-wip-us.apache.org/repos/asf/lucene- > > > solr/blob/aa90b88e/lucene/highlighter/src/java/org/apache/lucene/search/ > > highlight/WeightedSpanTermExtractor.java > > ---------------------------------------------------------------------- > > diff --git > > > a/lucene/highlighter/src/java/org/apache/lucene/search/highlight/Weighte > > dSpanTermExtractor.java > > > b/lucene/highlighter/src/java/org/apache/lucene/search/highlight/Weighte > > dSpanTermExtractor.java > > index 89cbd11..14acb9d 100644 > > --- > > > a/lucene/highlighter/src/java/org/apache/lucene/search/highlight/Weighte > > dSpanTermExtractor.java > > +++ > > > b/lucene/highlighter/src/java/org/apache/lucene/search/highlight/Weighte > > dSpanTermExtractor.java > > @@ -62,9 +62,10 @@ import > > org.apache.lucene.search.spans.SpanNearQuery; > > import org.apache.lucene.search.spans.SpanNotQuery; > > import org.apache.lucene.search.spans.SpanOrQuery; > > import org.apache.lucene.search.spans.SpanQuery; > > -import org.apache.lucene.search.spans.Spans; > > import org.apache.lucene.search.spans.SpanTermQuery; > > import org.apache.lucene.search.spans.SpanWeight; > > +import org.apache.lucene.search.spans.Spans; > > +import org.apache.lucene.spatial.geopoint.search.GeoPointInBBoxQuery; > > import org.apache.lucene.util.Bits; > > import org.apache.lucene.util.IOUtils; > > > > @@ -211,6 +212,8 @@ public class WeightedSpanTermExtractor { > > //nothing > > } else if (query instanceof CustomScoreQuery){ > > extract(((CustomScoreQuery) query).getSubQuery(), boost, terms); > > + } else if (query instanceof GeoPointInBBoxQuery) { > > + // nothing > > } else { > > Query origQuery = query; > > final IndexReader reader = getLeafContext().reader(); > > > > http://git-wip-us.apache.org/repos/asf/lucene- > > > solr/blob/aa90b88e/lucene/highlighter/src/test/org/apache/lucene/search/ > > highlight/HighlighterTest.java > > ---------------------------------------------------------------------- > > diff --git > > > a/lucene/highlighter/src/test/org/apache/lucene/search/highlight/Highlight > > erTest.java > > > b/lucene/highlighter/src/test/org/apache/lucene/search/highlight/Highlight > > erTest.java > > index 0a034f1..c6dc863 100644 > > --- > > > a/lucene/highlighter/src/test/org/apache/lucene/search/highlight/Highlight > > erTest.java > > +++ > > > b/lucene/highlighter/src/test/org/apache/lucene/search/highlight/Highlight > > erTest.java > > @@ -16,8 +16,6 @@ > > */ > > package org.apache.lucene.search.highlight; > > > > -import javax.xml.parsers.DocumentBuilder; > > -import javax.xml.parsers.DocumentBuilderFactory; > > import java.io.ByteArrayInputStream; > > import java.io.IOException; > > import java.nio.charset.StandardCharsets; > > @@ -29,6 +27,8 @@ import java.util.Iterator; > > import java.util.List; > > import java.util.Map; > > import java.util.StringTokenizer; > > +import javax.xml.parsers.DocumentBuilder; > > +import javax.xml.parsers.DocumentBuilderFactory; > > > > import org.apache.lucene.analysis.Analyzer; > > import org.apache.lucene.analysis.BaseTokenStreamTestCase; > > @@ -53,21 +53,22 @@ import org.apache.lucene.document.TextField; > > import org.apache.lucene.index.DirectoryReader; > > import org.apache.lucene.index.IndexReader; > > import org.apache.lucene.index.IndexWriter; > > -import org.apache.lucene.index.IndexWriterConfig; > > import org.apache.lucene.index.IndexWriterConfig.OpenMode; > > +import org.apache.lucene.index.IndexWriterConfig; > > import org.apache.lucene.index.Term; > > import org.apache.lucene.queries.CommonTermsQuery; > > import org.apache.lucene.queries.CustomScoreQuery; > > import org.apache.lucene.queries.payloads.SpanPayloadCheckQuery; > > import org.apache.lucene.search.BooleanClause.Occur; > > +import org.apache.lucene.search.BooleanClause; > > import org.apache.lucene.search.BooleanQuery; > > import org.apache.lucene.search.ConstantScoreQuery; > > import org.apache.lucene.search.FuzzyQuery; > > import org.apache.lucene.search.IndexSearcher; > > import org.apache.lucene.search.MultiPhraseQuery; > > import org.apache.lucene.search.MultiTermQuery; > > -import org.apache.lucene.search.PhraseQuery; > > import org.apache.lucene.search.PhraseQuery.Builder; > > +import org.apache.lucene.search.PhraseQuery; > > import org.apache.lucene.search.PrefixQuery; > > import org.apache.lucene.search.Query; > > import org.apache.lucene.search.RegexpQuery; > > @@ -87,6 +88,7 @@ import > org.apache.lucene.search.spans.SpanNotQuery; > > import org.apache.lucene.search.spans.SpanOrQuery; > > import org.apache.lucene.search.spans.SpanQuery; > > import org.apache.lucene.search.spans.SpanTermQuery; > > +import org.apache.lucene.spatial.geopoint.search.GeoPointInBBoxQuery; > > import org.apache.lucene.store.Directory; > > import org.apache.lucene.util.BytesRef; > > import org.apache.lucene.util.LuceneTestCase; > > @@ -163,6 +165,28 @@ public class HighlighterTest extends > > BaseTokenStreamTestCase implements Formatte > > > > } > > > > + public void testGeoPointQueryHighlight() throws Exception { > > + BooleanQuery boolQuery = new BooleanQuery.Builder().add( > > + new BooleanClause(new GeoPointInBBoxQuery("geo_point", - > > 64.92354174306496 > > + , 61.10078883158897, -170.15625, 118.47656249999999), > > BooleanClause.Occur.SHOULD)).add( > > + new BooleanClause(new TermQuery(new Term(FIELD_NAME, > > "instances")), BooleanClause.Occur.SHOULD)).build(); > > + CustomScoreQuery query = new CustomScoreQuery(boolQuery); > > + > > + searcher = newSearcher(reader); > > + TopDocs hits = searcher.search(query, 10); > > + QueryScorer scorer = new QueryScorer(query, FIELD_NAME); > > + Highlighter highlighter = new Highlighter(scorer); > > + > > + final int docId0 = hits.scoreDocs[0].doc; > > + Document doc = searcher.doc(docId0); > > + String storedField = doc.get(FIELD_NAME); > > + > > + TokenStream stream = getAnyTokenStream(FIELD_NAME, docId0); > > + Fragmenter fragmenter = new SimpleSpanFragmenter(scorer); > > + highlighter.setTextFragmenter(fragmenter); > > + highlighter.getBestFragment(stream, storedField); > > + } > > + > > public void testQueryScorerHits() throws Exception { > > PhraseQuery phraseQuery = new PhraseQuery(FIELD_NAME, "very", > > "long"); > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
