mirror of https://github.com/apache/lucene.git
LUCENE-6732: Remove tabs XSL files
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1695405 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1331a57e3d
commit
763c8d726c
|
@ -131,7 +131,7 @@
|
|||
import org.apache.tools.ant.BuildException;
|
||||
|
||||
def extensions = [
|
||||
'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js', 'xml'
|
||||
'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js', 'xml', 'xsl'
|
||||
];
|
||||
def invalidPatterns = [
|
||||
(~$/@author\b/$) : '@author javadoc tag',
|
||||
|
|
|
@ -18,57 +18,57 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/Document">
|
||||
<BooleanQuery>
|
||||
<!-- Clause if user selects a preference for type of job - apply choice of
|
||||
permanent/contract filter and cache -->
|
||||
<xsl:if test="type">
|
||||
<Clause occurs="must">
|
||||
<ConstantScoreQuery>
|
||||
<CachedFilter>
|
||||
<TermsFilter fieldName="type"><xsl:value-of select="type"/></TermsFilter>
|
||||
</CachedFilter>
|
||||
</ConstantScoreQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Use standard Lucene query parser for any job description input -->
|
||||
<xsl:if test="description">
|
||||
<Clause occurs="must">
|
||||
<UserQuery fieldName="description"><xsl:value-of select="description"/></UserQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
|
||||
<!-- If any of the location fields are set OR them ALL in a Boolean filter and cache individual filters -->
|
||||
<xsl:if test="South|North|East|West">
|
||||
<Clause occurs="must">
|
||||
<ConstantScoreQuery>
|
||||
<BooleanFilter>
|
||||
<xsl:for-each select="South|North|East|West">
|
||||
<Clause occurs="should">
|
||||
<CachedFilter>
|
||||
<TermsFilter fieldName="location"><xsl:value-of select="name()"/></TermsFilter>
|
||||
</CachedFilter>
|
||||
</Clause>
|
||||
</xsl:for-each>
|
||||
</BooleanFilter>
|
||||
</ConstantScoreQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Use XSL functions to split and zero pad salary range value -->
|
||||
<xsl:if test="salaryRange">
|
||||
<Clause occurs="must">
|
||||
<ConstantScoreQuery>
|
||||
<RangeFilter fieldName="salary" >
|
||||
<xsl:attribute name="lowerTerm">
|
||||
<xsl:value-of select='format-number( substring-before(salaryRange,"-"), "000" )' />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="upperTerm">
|
||||
<xsl:value-of select='format-number( substring-after(salaryRange,"-"), "000" )' />
|
||||
</xsl:attribute>
|
||||
</RangeFilter>
|
||||
</ConstantScoreQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<!-- Clause if user selects a preference for type of job - apply choice of
|
||||
permanent/contract filter and cache -->
|
||||
<xsl:if test="type">
|
||||
<Clause occurs="must">
|
||||
<ConstantScoreQuery>
|
||||
<CachedFilter>
|
||||
<TermsFilter fieldName="type"><xsl:value-of select="type"/></TermsFilter>
|
||||
</CachedFilter>
|
||||
</ConstantScoreQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Use standard Lucene query parser for any job description input -->
|
||||
<xsl:if test="description">
|
||||
<Clause occurs="must">
|
||||
<UserQuery fieldName="description"><xsl:value-of select="description"/></UserQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
|
||||
<!-- If any of the location fields are set OR them ALL in a Boolean filter and cache individual filters -->
|
||||
<xsl:if test="South|North|East|West">
|
||||
<Clause occurs="must">
|
||||
<ConstantScoreQuery>
|
||||
<BooleanFilter>
|
||||
<xsl:for-each select="South|North|East|West">
|
||||
<Clause occurs="should">
|
||||
<CachedFilter>
|
||||
<TermsFilter fieldName="location"><xsl:value-of select="name()"/></TermsFilter>
|
||||
</CachedFilter>
|
||||
</Clause>
|
||||
</xsl:for-each>
|
||||
</BooleanFilter>
|
||||
</ConstantScoreQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Use XSL functions to split and zero pad salary range value -->
|
||||
<xsl:if test="salaryRange">
|
||||
<Clause occurs="must">
|
||||
<ConstantScoreQuery>
|
||||
<RangeFilter fieldName="salary" >
|
||||
<xsl:attribute name="lowerTerm">
|
||||
<xsl:value-of select='format-number( substring-before(salaryRange,"-"), "000" )' />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="upperTerm">
|
||||
<xsl:value-of select='format-number( substring-after(salaryRange,"-"), "000" )' />
|
||||
</xsl:attribute>
|
||||
</RangeFilter>
|
||||
</ConstantScoreQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
</BooleanQuery>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
|
@ -18,29 +18,29 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/Document">
|
||||
<!--This template ANDs all fields together. Within a single field all terms are ORed.
|
||||
The query fields are fed directly through an analyzer and so do not need to adhere to
|
||||
traditional Lucene query syntax.
|
||||
-->
|
||||
The query fields are fed directly through an analyzer and so do not need to adhere to
|
||||
traditional Lucene query syntax.
|
||||
-->
|
||||
<BooleanQuery>
|
||||
<xsl:if test="count(artist)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="artist"><xsl:value-of select="artist"/></TermsQuery>
|
||||
</Clause>
|
||||
<xsl:if test="count(artist)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="artist"><xsl:value-of select="artist"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(album)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="album"><xsl:value-of select="album"/></TermsQuery>
|
||||
</Clause>
|
||||
<xsl:if test="count(album)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="album"><xsl:value-of select="album"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(genre)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="genre"><xsl:value-of select="genre"/></TermsQuery>
|
||||
</Clause>
|
||||
<xsl:if test="count(genre)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="genre"><xsl:value-of select="genre"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(releaseDate)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="releaseDate"><xsl:value-of select="releaseDate"/></TermsQuery>
|
||||
</Clause>
|
||||
<xsl:if test="count(releaseDate)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="releaseDate"><xsl:value-of select="releaseDate"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
</BooleanQuery>
|
||||
|
||||
|
|
|
@ -18,30 +18,30 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/Document">
|
||||
<!-- This template uses an efficient, cached filter for the "genre" field".
|
||||
Other query fields are fed directly through an analyzer and so do not need to adhere to
|
||||
traditional Lucene query syntax. Terms within a field are ORed while different fields are ANDed
|
||||
-->
|
||||
<BooleanQuery>
|
||||
<xsl:if test="count(artist)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="artist"><xsl:value-of select="artist"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(album)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="album"><xsl:value-of select="album"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(releaseDate)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="releaseDate"><xsl:value-of select="releaseDate"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<Clause occurs="filter">
|
||||
<TermsQuery fieldName="genre">
|
||||
<xsl:value-of select="genre"/>
|
||||
</TermsQuery>
|
||||
</Clause>
|
||||
</BooleanQuery>
|
||||
Other query fields are fed directly through an analyzer and so do not need to adhere to
|
||||
traditional Lucene query syntax. Terms within a field are ORed while different fields are ANDed
|
||||
-->
|
||||
<BooleanQuery>
|
||||
<xsl:if test="count(artist)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="artist"><xsl:value-of select="artist"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(album)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="album"><xsl:value-of select="album"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(releaseDate)>0">
|
||||
<Clause occurs="must">
|
||||
<TermsQuery fieldName="releaseDate"><xsl:value-of select="releaseDate"/></TermsQuery>
|
||||
</Clause>
|
||||
</xsl:if>
|
||||
<Clause occurs="filter">
|
||||
<TermsQuery fieldName="genre">
|
||||
<xsl:value-of select="genre"/>
|
||||
</TermsQuery>
|
||||
</Clause>
|
||||
</BooleanQuery>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:template match="/Document">
|
||||
<!-- This template is designed to work with a google-like search form - one edit box and
|
||||
uses the traditional Lucene query syntax
|
||||
-->
|
||||
uses the traditional Lucene query syntax
|
||||
-->
|
||||
<BooleanQuery>
|
||||
<Clause occurs="must">
|
||||
<UserQuery><xsl:value-of select="queryString"/></UserQuery>
|
||||
<UserQuery><xsl:value-of select="queryString"/></UserQuery>
|
||||
</Clause>
|
||||
</BooleanQuery>
|
||||
</xsl:template>
|
||||
|
|
|
@ -88,8 +88,8 @@
|
|||
<xsl:call-template name="modules"/>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="modules">
|
||||
<ul>
|
||||
<xsl:for-each select="str:split($buildfiles,'|')">
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<xsl:template match='/'>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<link>http://localhost:8983/solr</link>
|
||||
<description>
|
||||
This has been formatted by the sample "example_rss.xsl" transform -
|
||||
|
|
|
@ -49,10 +49,10 @@
|
|||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:for-each select="*">
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -60,10 +60,10 @@
|
|||
<xsl:template match="doc/*">
|
||||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*"/>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<xsl:template match='/'>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<link>http://localhost:8983/solr</link>
|
||||
<description>
|
||||
This has been formatted by the sample "example_rss.xsl" transform -
|
||||
|
|
|
@ -49,10 +49,10 @@
|
|||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:for-each select="*">
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -60,10 +60,10 @@
|
|||
<xsl:template match="doc/*">
|
||||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*"/>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<xsl:template match='/'>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<link>http://localhost:8983/solr</link>
|
||||
<description>
|
||||
This has been formatted by the sample "example_rss.xsl" transform -
|
||||
|
|
|
@ -49,10 +49,10 @@
|
|||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:for-each select="*">
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -60,10 +60,10 @@
|
|||
<xsl:template match="doc/*">
|
||||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*"/>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<xsl:template match='/'>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<link>http://localhost:8983/solr</link>
|
||||
<description>
|
||||
This has been formatted by the sample "example_rss.xsl" transform -
|
||||
|
|
|
@ -49,10 +49,10 @@
|
|||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:for-each select="*">
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -60,10 +60,10 @@
|
|||
<xsl:template match="doc/*">
|
||||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*"/>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<xsl:template match='/'>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<title>Example Solr RSS 2.0 Feed</title>
|
||||
<link>http://localhost:8983/solr</link>
|
||||
<description>
|
||||
This has been formatted by the sample "example_rss.xsl" transform -
|
||||
|
|
|
@ -49,10 +49,10 @@
|
|||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:for-each select="*">
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
@ -60,10 +60,10 @@
|
|||
<xsl:template match="doc/*">
|
||||
<xsl:variable name="fn" select="@name"/>
|
||||
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:element name="field">
|
||||
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*"/>
|
||||
|
|
|
@ -81,8 +81,8 @@
|
|||
<xsl:call-template name="modules"/>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="modules">
|
||||
<ul>
|
||||
<xsl:for-each select="str:split($buildfiles,'|')">
|
||||
|
|
Loading…
Reference in New Issue