lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [2/7] lucene-solr:jira/gradle: Move queryparser test's resources to a right place
Date Fri, 02 Nov 2018 10:30:00 GMT
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
new file mode 100644
index 0000000..ec6cb51
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
@@ -0,0 +1,17 @@
+# 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.
+Q0001E_INVALID_SYNTAX = Syntax Error: {0}
+
+Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION = Truncated unicode escape sequence.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
new file mode 100644
index 0000000..68e449c
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
@@ -0,0 +1,17 @@
+# 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.
+Q0001E_INVALID_SYNTAX = \u69cb\u6587\u30a8\u30e9\u30fc: {0}
+
+Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION = \u5207\u308a\u6368\u3066\u3089\u308c\u305f\u30e6\u30cb\u30b3\u30fc\u30c9\u30fb\u30a8\u30b9\u30b1\u30fc\u30d7\u30fb\u30b7\u30fc\u30b1\u30f3\u30b9\u3002

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BooleanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BooleanQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BooleanQuery.xml
new file mode 100644
index 0000000..67c3e08
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BooleanQuery.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery>sumitomo</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingQuery.xml
new file mode 100644
index 0000000..e10ddca
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingQuery.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BoostingQuery>
+  <!-- Find docs about banks, preferably merger info and preferably not "World bank" -->
+  <Query>
+    <BooleanQuery fieldName="contents">
+      <Clause occurs="should">
+        <TermQuery>merger</TermQuery>
+      </Clause>
+      <Clause occurs="must">
+        <TermQuery>bank</TermQuery>
+      </Clause>
+    </BooleanQuery>  
+  </Query>
+  <BoostQuery boost="0.01">
+      <UserQuery>"world bank"</UserQuery>
+  </BoostQuery>
+</BoostingQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
new file mode 100644
index 0000000..65bbd61
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BoostingTermQuery fieldName="contents">sumitomo</BoostingTermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
new file mode 100644
index 0000000..13cbc1b
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<ConstantScoreQuery>
+  <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
+</ConstantScoreQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
new file mode 100644
index 0000000..28938ae
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TermQuery SYSTEM "foo://bar.xyz/mydtd">
+<!--
+ 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.
+-->
+<TermQuery fieldName="contents">sumitomo</TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
new file mode 100644
index 0000000..0c94b00
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<DisjunctionMaxQuery>
+  <TermQuery fieldName="a">merger</TermQuery>
+  <DisjunctionMaxQuery tieBreaker="0.3">
+    <TermQuery fieldName="b">verger</TermQuery>
+  </DisjunctionMaxQuery>
+</DisjunctionMaxQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
new file mode 100644
index 0000000..dc59613
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TermQuery [
+<!ENTITY internalTerm "sumitomo">
+<!ENTITY externalTerm SYSTEM "foo://bar.xyz/external">
+<!ENTITY % myParameterEntity "foo://bar.xyz/param">
+]>
+<!--
+ 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.
+-->
+<TermQuery fieldName="contents">&internalTerm;&externalTerm;</TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
new file mode 100644
index 0000000..78173d8
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<FuzzyLikeThisQuery>
+  <!-- Matches on misspelt "Sumitomo" bank -->
+  <Field fieldName="contents">
+    Sumitimo bank 
+  </Field>
+</FuzzyLikeThisQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
new file mode 100644
index 0000000..6c04de6
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<LikeThisQuery percentTermsToMatch="5" stopWords="Reuter" minDocFreq="2">
+IRAQI TROOPS REPORTED PUSHING BACK IRANIANS Iraq said today its troops were pushing Iranian
forces out of 
+  positions they had initially occupied when they launched a new offensive near the southern
port of 
+  Basra early yesterday.     A High Command communique said Iraqi troops had won a significant
victory 
+  and were continuing to advance.     Iraq said it had foiled a three-pronged thrust some
10 km 
+  (six miles) from Basra, but admitted the Iranians had occupied ground held by the Mohammed
al-Qassem 
+  unit, one of three divisions attacked.     The communique said Iranian Revolutionary Guards
were under 
+  assault from warplanes, helicopter gunships, heavy artillery and tanks.     "Our forces
are continuing 
+  their advance until they purge the last foothold" occupied by the Iranians, it said.  
  
+  (Iran said its troops had killed or wounded more than 4,000 Iraqis and were stabilising
their new positions.)     
+  The Baghdad communique said Iraqi planes also destroyed oil installations at Iran's southwestern
Ahvaz field 
+  during a raid today. It denied an Iranian report that an Iraqi jet was shot down.     
+  Iraq also reported a naval battle at the northern tip of the Gulf. Iraqi naval units and
forces defending an 
+  offshore terminal sank six Iranian out of 28 Iranian boats attempting to attack an offshore
terminal, 
+  the communique said.      Reuter 3;
+</LikeThisQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
new file mode 100644
index 0000000..d258393
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BooleanQuery>
+  <Clause occurs="must">
+    <MatchAllDocsQuery/>
+  </Clause>
+  <Clause occurs="filter">
+    <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
new file mode 100644
index 0000000..aecac7f
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!--
+  This query was added to demonstrate nested boolean queries - there
+  was a bug in the XML parser which added ALL child <Clause> tags to 
+  the top level tags ie. took child and grandchild elements instead
+  of just child elements. This was due to the use of the 
+  Element.getElementsByTagName() call in BooleanQueryBuilder
+-->  
+<BooleanQuery fieldName="contents">  
+  <Clause occurs="should">
+    <BooleanQuery fieldName="contents">
+      <Clause occurs="must">
+        <TermQuery>doesNotExistButShouldBeOKBecauseOtherClauseExists</TermQuery>
+      </Clause>
+    </BooleanQuery>
+  </Clause>
+  <Clause occurs="should">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
new file mode 100644
index 0000000..45af138
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <PointRangeQuery fieldName="date3" lowerTerm="19870409" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
new file mode 100644
index 0000000..2159c2c
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <PointRangeQuery fieldName="date3" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
new file mode 100644
index 0000000..dc18953
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <PointRangeQuery fieldName="date3"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
new file mode 100644
index 0000000..eca8573
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <PointRangeQuery fieldName="date3" lowerTerm="19870409"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/RangeQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/RangeQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/RangeQuery.xml
new file mode 100644
index 0000000..946fdf2
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/RangeQuery.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/SpanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/SpanQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/SpanQuery.xml
new file mode 100644
index 0000000..fc37d96
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/SpanQuery.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<SpanOr fieldName="contents">
+  <SpanNear slop="8" inOrder="false" >    
+      <SpanOr>
+        <SpanTerm>killed</SpanTerm>
+        <SpanTerm>died</SpanTerm>
+        <SpanTerm>dead</SpanTerm>
+      </SpanOr>
+      <SpanOr>
+        <!-- a less verbose way of declaring SpanTerm declarations - these are analyzed
+          into a series of Tokens which are added as SpanTerm elements of a SpanOr
+        -->
+        <SpanOrTerms>miner miners</SpanOrTerms>
+        <!-- finds mine near worker or workers -->
+        <SpanNear slop="6" inOrder="false">    
+          <SpanTerm>mine</SpanTerm>          
+          <SpanOrTerms>worker workers</SpanOrTerms>
+          <BoostingTermQuery>heavy</BoostingTermQuery>
+        </SpanNear>
+      </SpanOr>
+  </SpanNear>  
+  <SpanFirst end="10">
+    <SpanOrTerms>fire burn</SpanOrTerms>
+  </SpanFirst> 
+  <!-- Other Span examples....
+    
+  <SpanNot>
+    <Include>
+        <SpanNear slop="2" inOrder="2">    
+            <SpanTerm>social</SpanTerm>
+            <SpanTerm>services</SpanTerm>
+        </SpanNear>        
+    </Include>
+    <Exclude>
+        <SpanTerm>public</SpanTerm>
+    </Exclude>
+  </SpanNot>
+    -->
+</SpanOr>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQuery.xml
new file mode 100644
index 0000000..14dae37
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQuery.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<TermQuery fieldName="contents">sumitomo</TermQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
new file mode 100644
index 0000000..229a112
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<TermQuery fieldName="contents"></TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermsQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermsQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermsQuery.xml
new file mode 100644
index 0000000..df93fc2
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermsQuery.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+    <!-- TermsQuery uses an analyzer to tokenize text and creates a BooleanQuery with
nested
+      "should" TermQueries for each of the tokens encountered. This can be used for user
input
+      which may include content or characters that would otherwise be illegal query syntax
when
+      using the standard lucene query parser. Of course the downside is that none of the
query 
+      operators (AND NOT ~ ^ : etc) will have an effect. For some scenarios queries are
+      not formed by people familiar with Lucene query syntax and they can inadvertently type
illegal
+      query syntax so in these cases this is an appropriate and simple alternative
+    --> 
+<TermsQuery fieldName="contents">sumitomo bank</TermsQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQuery.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQuery.xml
new file mode 100644
index 0000000..f7b6cae8
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQuery.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<BooleanQuery>
+  <Clause occurs="must">
+    <UserQuery>"Bank of England"</UserQuery>
+  </Clause>
+  <Clause occurs="filter">
+    <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
new file mode 100644
index 0000000..7b35a63
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<UserQuery fieldName="doesNotExist" boost="10">Bank^2</UserQuery>


Mime
View raw message