Skip to content

Apache Lucene open-source search software

add ASF license

Yonik Seeleyd45042208b89
diff --git a/example/exampledocs/spellchecker.xml b/example/exampledocs/spellchecker.xml
index a102bb562ae..d2ea3ef39b3 100644
--- a/example/exampledocs/spellchecker.xml
+++ b/example/exampledocs/spellchecker.xml
@@ -1,3 +1,19 @@
+<!--
+ 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.
+-->
<add>
<doc>
<field name="id">1</field>
diff --git a/src/java/org/apache/solr/search/QueryUtils.java b/src/java/org/apache/solr/search/QueryUtils.java
index b5f1a7afe5c..880f1c5114b 100755
--- a/src/java/org/apache/solr/search/QueryUtils.java
+++ b/src/java/org/apache/solr/search/QueryUtils.java
@@ -1,3 +1,20 @@
+/**
+ * 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.
+ */
+
package org.apache.solr.search;
import org.apache.lucene.search.Query;
@@ -66,37 +83,6 @@ public class QueryUtils {
}
return newBq;
}
-
-
- /*** TODO: use after next lucene update
- List <BooleanClause> clauses = (List <BooleanClause>)bq.clauses();
- // A single filtered out stopword currently causes a BooleanQuery with
- // zero clauses.
- if (clauses.size()==0) return q;
-
- for (BooleanClause clause: clauses) {
- if (!clause.isProhibited()) return q;
- }
-
- if (clauses.size()==1) {
- // if only one clause, dispense with the wrapping BooleanQuery
- Query negClause = clauses.get(0).getQuery();
- // we shouldn't need to worry about adjusting the boosts since the negative
- // clause would have never been selected in a positive query, and hence the
- // boost is meaningless.
- return negClause;
- } else {
- BooleanQuery newBq = new BooleanQuery(bq.isCoordDisabled());
- newBq.setBoost(bq.getBoost());
- // ignore minNrShouldMatch... it doesn't make sense for a negative query
-
- // the inverse of -a -b is a b
- for (BooleanClause clause: clauses) {
- newBq.add(clause.getQuery(), BooleanClause.Occur.SHOULD);
- }
- return newBq;
- }
- ***/
}
/** Makes negative queries suitable for querying by
diff --git a/src/java/org/apache/solr/util/ContentStreamBase.java b/src/java/org/apache/solr/util/ContentStreamBase.java
index 890beb90253..32f7c50cd73 100755
--- a/src/java/org/apache/solr/util/ContentStreamBase.java
+++ b/src/java/org/apache/solr/util/ContentStreamBase.java
@@ -1,3 +1,20 @@
+/**
+ * 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.
+ */
+
package org.apache.solr.util;
import java.io.ByteArrayInputStream;
diff --git a/src/test/org/apache/solr/analysis/BaseTokenTestCase.java b/src/test/org/apache/solr/analysis/BaseTokenTestCase.java
index 84683e70f3b..497d0922a5e 100644
--- a/src/test/org/apache/solr/analysis/BaseTokenTestCase.java
+++ b/src/test/org/apache/solr/analysis/BaseTokenTestCase.java
@@ -1,3 +1,20 @@
+/**
+ * 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.
+ */
+
package org.apache.solr.analysis;
import java.io.IOException;
diff --git a/src/test/org/apache/solr/search/TestQueryUtils.java b/src/test/org/apache/solr/search/TestQueryUtils.java
index 8933534ab2e..858b7059f99 100755
--- a/src/test/org/apache/solr/search/TestQueryUtils.java
+++ b/src/test/org/apache/solr/search/TestQueryUtils.java
@@ -1,3 +1,20 @@
+/**
+ * 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.
+ */
+
package org.apache.solr.search;
import junit.framework.TestCase;
diff --git a/src/webapp/resources/index.html b/src/webapp/resources/index.html
index 16866ce5f8b..f4a11e7fa97 100644
--- a/src/webapp/resources/index.html
+++ b/src/webapp/resources/index.html
@@ -1,3 +1,19 @@
+<!--
+ 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.
+-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="solr-admin.css">