Index: solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
===================================================================
--- solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java	(revision 1146533)
+++ solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java	(working copy)
@@ -34,7 +34,7 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.queryparser.classic.ParseException;
 import org.apache.lucene.search.*;
-import org.apache.lucene.search.similar.MoreLikeThis;
+import org.apache.lucene.queries.mlt.MoreLikeThis;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.FacetParams;
Index: modules/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java
===================================================================
--- modules/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java	(revision 0)
+++ modules/queries/src/test/org/apache/lucene/queries/mlt/TestMoreLikeThis.java	(working copy)
@@ -1,4 +1,4 @@
-package org.apache.lucene.search.similar;
+package org.apache.lucene.queries.mlt;
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -92,14 +92,13 @@
     
     assertEquals("Expected " + originalValues.size() + " clauses.",
         originalValues.size(), clauses.size());
-    
-    for (int i = 0; i < clauses.size(); i++) {
-      BooleanClause clause = clauses.get(i);
+
+    for (BooleanClause clause : clauses) {
       TermQuery tq = (TermQuery) clause.getQuery();
       Float termBoost = originalValues.get(tq.getTerm().text());
       assertNotNull("Expected term " + tq.getTerm().text(), termBoost);
-      
-      float totalBoost = termBoost.floatValue() * boostFactor;
+
+      float totalBoost = termBoost * boostFactor;
       assertEquals("Expected boost of " + totalBoost + " for term '"
           + tq.getTerm().text() + "' got " + tq.getBoost(), totalBoost, tq
           .getBoost(), 0.0001);
@@ -118,11 +117,10 @@
     BooleanQuery query = (BooleanQuery) mlt.like(new StringReader(
         "lucene release"));
     List<BooleanClause> clauses = query.clauses();
-    
-    for (int i = 0; i < clauses.size(); i++) {
-      BooleanClause clause = clauses.get(i);
+
+    for (BooleanClause clause : clauses) {
       TermQuery tq = (TermQuery) clause.getQuery();
-      originalValues.put(tq.getTerm().text(), Float.valueOf(tq.getBoost()));
+      originalValues.put(tq.getTerm().text(), tq.getBoost());
     }
     return originalValues;
   }
Index: modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java
===================================================================
--- modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java	(revision 0)
+++ modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java	(working copy)
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.lucene.search.similar;
+package org.apache.lucene.queries.mlt;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
Index: modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThisQuery.java
===================================================================
--- modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThisQuery.java	(revision 0)
+++ modules/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThisQuery.java	(working copy)
@@ -1,7 +1,7 @@
 /*
  * Created on 25-Jan-2006
  */
-package org.apache.lucene.search.similar;
+package org.apache.lucene.queries.mlt;
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
Index: lucene/contrib/queries/src/test/org/apache/lucene/search/similar/TestMoreLikeThis.java (deleted)
===================================================================
Index: lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java (deleted)
===================================================================
Index: lucene/contrib/queries/src/java/org/apache/lucene/search/similar/SimilarityQueries.java (deleted)
===================================================================
Index: lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThisQuery.java (deleted)
===================================================================
Index: lucene/contrib/queries/src/java/org/apache/lucene/search/similar/package.html (deleted)
===================================================================
Index: lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/LikeThisQueryBuilder.java
===================================================================
--- lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/LikeThisQueryBuilder.java	(revision 1146533)
+++ lucene/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/builders/LikeThisQueryBuilder.java	(working copy)
@@ -11,7 +11,7 @@
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
-import org.apache.lucene.search.similar.MoreLikeThisQuery;
+import org.apache.lucene.queries.mlt.MoreLikeThisQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.xmlparser.DOMUtils;
 import org.apache.lucene.xmlparser.ParserException;
Index: lucene/contrib/xml-query-parser/build.xml
===================================================================
--- lucene/contrib/xml-query-parser/build.xml	(revision 1146533)
+++ lucene/contrib/xml-query-parser/build.xml	(working copy)
@@ -25,35 +25,38 @@
 
   <import file="../contrib-build.xml"/>
 
-  <contrib-uptodate name="queries-contrib" contrib-src-name="queries" property="queries.uptodate" classpath.property="queries.jar"/>
+  <contrib-uptodate name="queries-contrib" contrib-src-name="queries" property="queries-contrib.uptodate" classpath.property="queries-contrib.jar"/>
   <property name="lucene.jar" location="${common.dir}/build/lucene-core-${version}.jar"/>
   <property name="servlet.jar" location="${common.dir}/lib/servlet-api-2.4.jar"/>
   <available property="servlet.jar.present" type="file" file="${servlet.jar}"/>
   <module-uptodate name="queryparser" property="queryparser.uptodate" classpath.property="queryparser.jar"/>
+  <module-uptodate name="queries" property="queries.uptodate" classpath.property="queries.jar"/>
 
 
   <path id="classpath">
+    <pathelement path="${queries-contrib.jar}"/>
+    <pathelement path="${queryparser.jar}"/>
     <pathelement path="${queries.jar}"/>
-    <pathelement path="${queryparser.jar}"/>
     <path refid="base.classpath"/>
   </path>
 
   <path id="web-classpath">
+    <pathelement path="${queries-contrib.jar}"/>
+    <pathelement path="${queryparser.jar}"/>
     <pathelement path="${queries.jar}"/>
-    <pathelement path="${queryparser.jar}"/>
     <pathelement path="${servlet.jar}"/>
     <pathelement path="${build.dir}/${final.name}.jar"/>
     <path refid="base.classpath"/>
   </path>
 
-  <target name="compile-core" depends="build-queries,build-queryparser,common.compile-core" />
+  <target name="compile-core" depends="build-queries-contrib,build-queryparser,build-queries,common.compile-core" />
 
-  <target name="build-queries" unless="queries.uptodate">
+  <target name="build-queries-contrib" unless="queries-contrib.uptodate">
     <echo>XML Parser building dependency ${queries.jar}</echo>
     <ant antfile="../queries/build.xml" target="default" inheritall="false" dir="../queries">
       <propertyset refid="uptodate.and.compiled.properties"/>
     </ant>
-    <property name="queries.uptodate" value="true"/>
+    <property name="queries-contrib.uptodate" value="true"/>
   </target>
 
   <!-- override contrib-build.xml target to also build web demo -->
@@ -86,10 +89,17 @@
   </target>
 
   <target name="build-queryparser" unless="queryparser.uptodate">
-    <echo>Demo building dependency modules/queryparser</echo>
+    <echo>XML QueryParser building dependency modules/queryparser</echo>
     <subant target="default">
       <fileset dir="${common.dir}/../modules/queryparser" includes="build.xml"/>
     </subant>
   </target>
 
+  <target name="build-queries" unless="queryparser.uptodate">
+    <echo>XML QueryParser building dependency modules/queries</echo>
+    <subant target="default">
+      <fileset dir="${common.dir}/../modules/queries" includes="build.xml"/>
+    </subant>
+  </target>
+
 </project>
Index: lucene/build.xml
===================================================================
--- lucene/build.xml	(revision 1146533)
+++ lucene/build.xml	(working copy)
@@ -207,6 +207,7 @@
         </fileset>
         <pathelement location="${common.dir}/../modules/analysis/build/common/lucene-analyzers-common-${version}.jar"/>
         <pathelement location="${common.dir}/../modules/queryparser/build/lucene-queryparser-${version}.jar"/>
+        <pathelement location="${common.dir}/../modules/queries/build/lucene-queries-${version}.jar"/>
       </path>
 
       <invoke-javadoc
Index: dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml
===================================================================
--- dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml	(revision 1146533)
+++ dev-tools/idea/lucene/contrib/xml-query-parser/xml-query-parser.iml	(working copy)
@@ -19,5 +19,6 @@
     <orderEntry type="module" module-name="analysis-common" />
     <orderEntry type="module" module-name="lucene" />
     <orderEntry type="module" module-name="queryparser" />
+    <orderEntry type="module" module-name="queries" />
   </component>
 </module>
Index: dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template
===================================================================
--- dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template	(revision 1146533)
+++ dev-tools/maven/lucene/contrib/xml-query-parser/pom.xml.template	(working copy)
@@ -54,6 +54,11 @@
     </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
+      <artifactId>lucene-queries</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
       <artifactId>lucene-queryparser</artifactId>
       <version>${project.version}</version>
     </dependency>
