Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gradle/template.gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.

#############################
# Local developer settings #
#############################
Expand Down
1 change: 1 addition & 0 deletions gradle/testing/defaults-tests/logging.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.

# root handler
handlers=java.util.logging.ConsoleHandler
Expand Down
44 changes: 12 additions & 32 deletions gradle/validation/rat-sources.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,10 @@ allprojects {

exclude "**/*gradle.lockfile"

// TODO: SOLR-15601 ?
exclude "**/*.properties"
exclude "**/*.txt"

// TODO: SOLR-15601: HTML should carry the license, perhaps?
exclude "**/*.html"
// Solr core marker file; often empty
exclude "**/core.properties"

// Conditionally apply module-specific patterns.
switch (project.path) {
Expand Down Expand Up @@ -203,16 +201,6 @@ allprojects {
exclude "src/test-files/META-INF/services/*"
break

case ":solr:modules:ltr":
// TODO: SOLR-15601: Some of these should carry the license, perhaps?
exclude "**/*.py"
break

case ":solr:modules:scripting":
// TODO: SOLR-15601: Some of these should carry the license, perhaps?
exclude "**/*.js"
break

case ":solr:modules:s3-repository":
exclude "src/test-files/s3.conf" // empty file
break
Expand All @@ -222,7 +210,6 @@ allprojects {
break

case ":solr:core":
exclude "src/resources/*.xml"
exclude "src/test-files/**/*.aff"
exclude "src/test-files/**/*.dic"
exclude "src/test-files/**/*.conf"
Expand All @@ -232,37 +219,30 @@ allprojects {
break

case ":solr:server":
exclude "**/*.xml"
exclude "**/*.sh"
exclude "**/*.bat"
exclude "**/*.cmd"
exclude "**/*.js"
// Vendored (or adapted) from the Jetty distribution; not Solr's own IP.
exclude "etc/jetty*.xml"
exclude "etc/webdefault.xml"
exclude "modules"
// zoo.cfg intentionally has no header and serves as the RAT detection canary.
ratCanaryPath.set("/solr/zoo.cfg")
break

case ":solr:webapp":
exclude "web/img/**"
break

case ":solr:solr-ref-guide":
exclude "ui-src/**"
break

case ":solr:docker":
exclude "tests/**/*.xml"
// Deliberately malformed XML used to test the docker image's handling of a broken log4j2 config.
exclude "tests/cases/test_log4j/bogus-log4j2.xml"
break

case ":solr:example":
exclude "**/*.xml"
exclude "**/*.cfg"
exclude "**/*.js"
exclude "films/README.md"
// films.xml is third-party (Freebase) data, like films/README.md.
exclude "films/films.xml"
// films/README.md documents third-party (Freebase) data and intentionally has no
// header, so it serves as the RAT detection canary.
ratCanaryPath.set("/films/README.md")
break

case ":solr:solrj":
exclude "src/test-files/**/*.cfg"
exclude "src/test-files/**/*.xml"
break
}
Expand Down
16 changes: 16 additions & 0 deletions solr/core/src/test-files/exampledocs/example.html
Original file line number Diff line number Diff line change
@@ -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>
<title>Welcome to Solr</title>
Expand Down
16 changes: 16 additions & 0 deletions solr/core/src/test-files/solr/collection1/conf/example.html
Original file line number Diff line number Diff line change
@@ -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>
<title>Welcome to Solr</title>
Expand Down

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently I touched the file and activated basic indentation rules like end-of-line whitespace trimming. Fine.

Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
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>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
Expand Down Expand Up @@ -49,7 +65,7 @@
+-->
<div class="searchbox">
<form action="http://www.google.com/search" method="get" class="roundtopsmall">
<input value="lucene.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp;
<input value="lucene.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp;
<input name="Search" value="Search" type="submit">
</form>
</div>
Expand Down Expand Up @@ -211,8 +227,8 @@ <h1>Welcome to Solr</h1>
</ul>
</li>
</ul>
</div>
</div>

<a name="N1000D"></a><a name="intro"></a>
<h2 class="boxed">What Is Solr?</h2>
<div class="section">
Expand All @@ -227,7 +243,7 @@ <h2 class="boxed">What Is Solr?</h2>
</p>
</div>


<a name="N1002A"></a><a name="news"></a>
<h2 class="boxed">News</h2>
<div class="section">
Expand All @@ -239,36 +255,36 @@ <h3 class="boxed">02 October 2007 - Solr at OSSummit Asia</h3>
</p>
<p>The following talks and trainings are scheduled for the upcoming 2008 OSSummit:</p>
<ul>

<li>
<a href="http://www.ossummit.com/2007/program/talk/8">Lucene Boot Camp</a> by Erik Hatcher (originally by Grant Ingersoll). An all-day training focusing on getting started with Lucene - the core library under Solr.</li>

<li>
<a href="http://www.ossummit.com/2007/program/talk/25">Solr in a Day</a> by Erik Hatcher. All you need to know to use Solr effectively.</li>

<li>
<a href="http://www.ossummit.com/2007/program/talk/67">Lucene Case Studies</a> by Erik Hatcher. A rapid series of examples of many Lucene and Solr using applications.</li>

</ul>
<a name="N10058"></a><a name="03+September+2007+-+Lucene+at+ApacheCon+Atlanta"></a>
<h3 class="boxed">03 September 2007 - Lucene at ApacheCon Atlanta</h3>
<p>
<a href="http://www.us.apachecon.com"><img alt="ApacheCon US logo" class="float-right" src="http://www.apache.org/ads/ApacheCon/2007-usa-125x125.png"></a>
Lucene will once again be well represented at ApacheCon USA in Atlanta this November 12-16, 2007.
Lucene will once again be well represented at ApacheCon USA in Atlanta this November 12-16, 2007.
</p>
<p>The following talks and trainings are scheduled for this year's conference:</p>
<ul>

<li>November 12: <a href="http://us.apachecon.com/us2007/program/talk/1859">Lucene Boot Camp</a> by Grant Ingersoll. An all-day training focusing on getting started with Lucene.</li>

<li>November 16, 9:00 am: <a href="http://us.apachecon.com/us2007/program/talk/1992">Apache Solr out of the Box</a> by Chris Hostetter. Introduction to Solr.</li>

<li>November 16, 10:00 am: <a href="http://us.apachecon.com/us2007/program/talk/1943">Building a Vertical Search Site using Apache Software</a> by Ken Krugler. Will cover many Lucene-based projects.</li>

<li>November 16, 3:00 pm: <a href="http://us.apachecon.com/us2007/program/talk/1953">Apache Lucene Performance</a> by Grant Ingersoll. Tips and techniques for improving Lucene performance.</li>

<li>November 16, 4:00 pm: <a href="http://us.apachecon.com/us2007/program/talk/2017"> Advanced Indexing Techniques with Apache Lucene</a> by Michael Busch. Information on payloads and advanced indexing techniques.</li>

</ul>
<a name="N10091"></a><a name="06+June+2007%3A+Release+1.2+available"></a>
<h3 class="boxed">06 June 2007: Release 1.2 available</h3>
Expand All @@ -295,14 +311,14 @@ <h3 class="boxed">22 December 2006: Release 1.1.0 available</h3>
<a name="N100B6"></a><a name="15+August+2006%3A+Solr+at+ApacheCon+US"></a>
<h3 class="boxed">15 August 2006: Solr at ApacheCon US</h3>
<p>Chris Hostetter will be presenting
<strong><a href="http://www.apachecon.com/2006/US/html/sessions.html#FR26">"Faceted Searching With Apache Solr"</a></strong>
<strong><a href="http://www.apachecon.com/2006/US/html/sessions.html#FR26">"Faceted Searching With Apache Solr"</a></strong>
at ApacheCon US 2006, on October 13th at 4:30pm.
See the <a href="http://www.us.apachecon.com/">ApacheCon</a> website for more details.
</p>
<a name="N100C9"></a><a name="21+April+2006%3A+Solr+at+ApacheCon"></a>
<h3 class="boxed">21 April 2006: Solr at ApacheCon</h3>
<p>Yonik Seeley will be presenting
<strong>"Apache Solr, a Full-Text Search Server based on Lucene"</strong>
<strong>"Apache Solr, a Full-Text Search Server based on Lucene"</strong>
at ApacheCon Europe 2006, on June 29th at 5:30pm.
See the <a href="http://www.eu.apachecon.com/">ApacheCon</a> website for more details.
</p>
Expand All @@ -321,7 +337,7 @@ <h3 class="boxed">17 January 2006: Solr Joins Apache Incubator</h3>
</p>
</div>


</div>
<!--+
|end content
Expand Down
16 changes: 16 additions & 0 deletions solr/example/exampledocs/sample.html
Original file line number Diff line number Diff line change
@@ -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>
<title>Welcome to Solr</title>
Expand Down
16 changes: 16 additions & 0 deletions solr/modules/extraction/src/test-files/extraction/example.html
Original file line number Diff line number Diff line change
@@ -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>
<title>Welcome to Solr</title>
Expand Down
16 changes: 16 additions & 0 deletions solr/modules/extraction/src/test-files/extraction/simple.html
Original file line number Diff line number Diff line change
@@ -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>
<title>Welcome to Solr</title>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0.
#
# Filename regex -> password map
# Example any file ending in .doc should use password foobar:
# .*\.doc = fooBar
#
# Note: Apache Tika 1.1 supports password for .pdf and .docx only, not .doc or other formats
# Note: Apache Tika 1.1 supports password for .pdf and .docx only, not .doc or other formats
.*\.pdf$ = solrRules
.*\.docx$ = Word2010
.*\.docx$ = Word2010
19 changes: 17 additions & 2 deletions solr/modules/ltr/example/libsvm_formatter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 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.

from subprocess import call
import os

Expand All @@ -6,7 +21,7 @@

class LibSvmFormatter:
def processQueryDocFeatureVector(self,docClickInfo,trainingFile):
'''Expects as input a sorted by queries list or generator that provides the context
'''Expects as input a sorted by queries list or generator that provides the context
for each query in a tuple composed of: (query , docId , relevance , source , featureVector).
The list of documents that are part of the same query will generate comparisons
against each other for training. '''
Expand Down Expand Up @@ -82,7 +97,7 @@ def _writeRankSVMPairs(listOfFeatures,output):
(4, {1:0.9, 2:0.9, 3:0.1})
(3, {1:0.7, 2:0.9, 3:0.2})
(1, {1:0.1, 2:0.9, 6:0.1})
]
]
'''
for d1 in range(0,len(listOfFeatures)):
for d2 in range(d1+1,len(listOfFeatures)):
Expand Down
15 changes: 15 additions & 0 deletions solr/modules/ltr/example/train_and_upload_demo_model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
#!/usr/bin/env python3

# 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.

import sys
import json
import http.client
Expand Down
Loading
Loading