Commit f9ead31eaa355c2138ba2acaa0046982f9a11f99

Authored by Matthijs Brouwer
1 parent aaf7a9ed

bugfixes

docker/Dockerfile
1 1 # Automatically generated Dockerfile
2   -# - Build 2017-03-07 07:11
  2 +# - Build 2017-03-07 18:24
3 3 # - Lucene/Solr version 6.4.1
4   -# - Mtas release 20170228
  4 +# - Mtas release 20170307
5 5 #
6 6  
7 7 FROM ubuntu:16.04
... ... @@ -15,7 +15,7 @@ WORKDIR "/root"
15 15  
16 16 RUN mkdir lib
17 17  
18   -ADD https://github.com/meertensinstituut/mtas/releases/download/20170228/mtas-6.4.1.jar /root/lib/
  18 +ADD https://github.com/meertensinstituut/mtas/releases/download/20170307/mtas-6.4.1.jar /root/lib/
19 19  
20 20 RUN apt-get update && apt-get install -y lsof software-properties-common python-software-properties apache2 curl subversion \
21 21 && locale-gen en_US.UTF-8 en_US && update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en \
... ... @@ -55,9 +55,9 @@ RUN apt-get update && apt-get install -y lsof software-properties-common python-
55 55 && chmod -R 755 /var/www/html \
56 56 && printf "echo\n" >> /start.sh \
57 57 && printf "echo \"================ Mtas -- Multi Tier Annotation Search =================\"\n" >> /start.sh \
58   -&& printf "echo \" Timestamp 2017-03-07 07:11\"\n" >> /start.sh \
  58 +&& printf "echo \" Timestamp 2017-03-07 18:24\"\n" >> /start.sh \
59 59 && printf "echo \" Lucene/Solr version 6.4.1\"\n" >> /start.sh \
60   -&& printf "echo \" Mtas release 20170228\"\n" >> /start.sh \
  60 +&& printf "echo \" Mtas release 20170307\"\n" >> /start.sh \
61 61 && printf "echo \" See https://meertensinstituut.github.io/mtas/ for more information\"\n" >> /start.sh \
62 62 && printf "echo \"=======================================================================\"\n" >> /start.sh \
63 63 && printf "echo\n" >> /start.sh \
... ...
... ... @@ -5,7 +5,7 @@
5 5 <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
6 6 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
7 7 <currentDevelopmentVersion>6.4.1</currentDevelopmentVersion>
8   - <currentDevelopmentRelease>20170228</currentDevelopmentRelease>
  8 + <currentDevelopmentRelease>20170307</currentDevelopmentRelease>
9 9 </properties>
10 10 <modelVersion>4.0.0</modelVersion>
11 11 <groupId>dev.meertens.mtas</groupId>
... ...
src/mtas/search/spans/MtasSpanAndQuery.java
... ... @@ -22,7 +22,7 @@ public class MtasSpanAndQuery extends MtasSpanQuery {
22 22 /** The base query. */
23 23 private SpanNearQuery baseQuery;
24 24 private List<MtasSpanQuery> clauses;
25   -
  25 +
26 26 /**
27 27 * Instantiates a new mtas span and query.
28 28 *
... ... @@ -34,10 +34,10 @@ public class MtasSpanAndQuery extends MtasSpanQuery {
34 34 super();
35 35 clauses = new ArrayList<MtasSpanQuery>();
36 36 for(MtasSpanQuery item : initialClauses) {
37   - if(!clauses.contains(item)) {
38   - clauses.add(item);
  37 + if(!clauses.contains(item)) {
  38 + clauses.add(item);
39 39 }
40   - }
  40 + }
41 41 baseQuery = new MtasExtendedSpanAndQuery(
42 42 clauses.toArray(new MtasSpanQuery[clauses.size()]));
43 43 }
... ... @@ -75,12 +75,14 @@ public class MtasSpanAndQuery extends MtasSpanQuery {
75 75 actuallyRewritten |= clauses.get(i) != newClauses[i];
76 76 }
77 77 if (actuallyRewritten) {
78   - return new MtasSpanAndQuery(newClauses);
  78 + return new MtasSpanAndQuery(newClauses).rewrite(reader);
79 79 } else {
80   - return this;
  80 + return super.rewrite(reader);
81 81 }
  82 + } else if(clauses.size()>0) {
  83 + return clauses.get(0).rewrite(reader);
82 84 } else {
83   - return clauses.get(0).rewrite(reader);
  85 + return super.rewrite(reader);
84 86 }
85 87 }
86 88  
... ...
src/mtas/search/spans/MtasSpanOrQuery.java
... ... @@ -62,12 +62,14 @@ public class MtasSpanOrQuery extends MtasSpanQuery {
62 62 actuallyRewritten |= clauses.get(i)!=newClauses[i];
63 63 }
64 64 if(actuallyRewritten) {
65   - return new MtasSpanOrQuery(newClauses);
  65 + return new MtasSpanOrQuery(newClauses).rewrite(reader);
66 66 } else {
67   - return this;
  67 + return super.rewrite(reader);
68 68 }
69   - } else {
  69 + } else if(clauses.size()>0) {
70 70 return clauses.get(0).rewrite(reader);
  71 + } else {
  72 + return super.rewrite(reader);
71 73 }
72 74 }
73 75  
... ...