Index: lucene/build.xml =================================================================== --- lucene/build.xml (revision 1328746) +++ lucene/build.xml (working copy) @@ -195,20 +195,25 @@ + - - -${Name} ${version} Javadoc Index - -

${Name} ${version} Javadoc Index

-
    -
  • core: Lucene core library
  • -
  • test-framework: Framework for testing Lucene-based applications
  • -]]> - - ]]> + + + + + + + + + + + + + + + + + Index: lucene/common-build.xml =================================================================== --- lucene/common-build.xml (revision 1328746) +++ lucene/common-build.xml (working copy) @@ -124,7 +124,7 @@ - + Index: lucene/module-build.xml =================================================================== --- lucene/module-build.xml (revision 1328746) +++ lucene/module-build.xml (working copy) @@ -90,14 +90,6 @@ - - - -${name}: ${project.description} -]]> - - Index: lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/package.html =================================================================== --- lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/package.html (revision 1328746) +++ lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/package.html (working copy) @@ -31,5 +31,272 @@

    NOTE: {@link org.apache.lucene.queryparser.flexible.standard} has an alternative queryparser that matches the syntax of this one, but is more modular, enabling substantial customization to how a query is created. +

    Query Parser Syntax

    + + + + +

    Overview

    +
    +

    Although Lucene provides the ability to create your own + queries through its API, it also provides a rich query + language through the Query Parser, a lexer which + interprets a string into a Lucene Query using JavaCC. +

    +

    Generally, the query parser syntax may change from + release to release. This page describes the syntax as of + the current release. If you are using a different + version of Lucene, please consult the copy of + docs/queryparsersyntax.html that was distributed + with the version you are using. +

    +

    + Before choosing to use the provided Query Parser, please consider the following: +

      + +
    1. If you are programmatically generating a query string and then + parsing it with the query parser then you should seriously consider building + your queries directly with the query API. In other words, the query + parser is designed for human-entered text, not for program-generated + text.
    2. + + +
    3. Untokenized fields are best added directly to queries, and not + through the query parser. If a field's values are generated programmatically + by the application, then so should query clauses for this field. + An analyzer, which the query parser uses, is designed to convert human-entered + text to terms. Program-generated values, like dates, keywords, etc., + should be consistently program-generated.
    4. + + +
    5. In a query form, fields which are general text should use the query + parser. All others, such as date ranges, keywords, etc. are better added + directly through the query API. A field with a limit set of values, + that can be specified with a pull-down menu should not be added to a + query string which is subsequently parsed, but rather added as a + TermQuery clause.
    6. + +
    + +

    +
    + + + +

    Terms

    +
    +

    A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.

    +

    A Single Term is a single word such as "test" or "hello".

    +

    A Phrase is a group of words surrounded by double quotes such as "hello dolly".

    +

    Multiple terms can be combined together with Boolean operators to form a more complex query (see below).

    +

    Note: The analyzer used to create the index will be used on the terms and phrases in the query string. + So it is important to choose an analyzer that will not interfere with the terms used in the query string.

    +
    + + + +

    Fields

    +
    +

    Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.

    +

    You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.

    +

    As an example, let's assume a Lucene index contains two fields, title and text and text is the default field. + If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:

    +
    title:"The Right Way" AND text:go
    +

    or

    +
    title:"Do it right" AND right
    +

    Since text is the default field, the field indicator is not required.

    +

    Note: The field is only valid for the term that it directly precedes, so the query

    +
    title:Do it right
    +

    Will only find "Do" in the title field. It will find "it" and "right" in the default field (in this case the text field).

    +
    + + + +

    Term Modifiers

    +
    +

    Lucene supports modifying query terms to provide a wide range of searching options.

    + +

    Wildcard Searches

    +

    Lucene supports single and multiple character wildcard searches within single terms + (not within phrase queries).

    +

    To perform a single character wildcard search use the "?" symbol.

    +

    To perform a multiple character wildcard search use the "*" symbol.

    +

    The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

    +
    te?t
    +

    Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

    +
    test*
    +

    You can also use the wildcard searches in the middle of a term.

    +
    te*t
    +

    Note: You cannot use a * or ? symbol as the first character of a search.

    + +

    Fuzzy Searches

    +

    Lucene supports fuzzy searches based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:

    +
    roam~
    +

    This search will find terms like foam and roams.

    +

    Starting with Lucene 1.9 an additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:

    +
    roam~0.8
    +

    The default that is used if the parameter is not given is 0.5.

    + +

    Proximity Searches

    +

    Lucene supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "apache" and "jakarta" within 10 words of each other in a document use the search:

    +
    "jakarta apache"~10
    + +

    Range Searches

    +

    Range Queries allow one to match documents whose field(s) values + are between the lower and upper bound specified by the Range Query. + Range Queries can be inclusive or exclusive of the upper and lower bounds. + Sorting is done lexicographically.

    +
    mod_date:[20020101 TO 20030101]
    +

    This will find documents whose mod_date fields have values between 20020101 and 20030101, inclusive. + Note that Range Queries are not reserved for date fields. You could also use range queries with non-date fields:

    +
    title:{Aida TO Carmen}
    +

    This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.

    +

    Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by + curly brackets.

    + +

    Boosting a Term

    +

    Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

    +

    Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for

    +
    jakarta apache
    +

    and you want the term "jakarta" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. + You would type:

    +
    jakarta^4 apache
    +

    This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example:

    +
    "jakarta apache"^4 "Apache Lucene"
    +

    By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)

    +
    + + + + +

    Boolean Operators

    +
    +

    Boolean operators allow terms to be combined through logic operators. + Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).

    + +

    +

    The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. + The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. + The symbol || can be used in place of the word OR.

    +

    To search for documents that contain either "jakarta apache" or just "jakarta" use the query:

    +
    "jakarta apache" jakarta
    +

    or

    +
    "jakarta apache" OR jakarta
    + +

    AND

    +

    The AND operator matches documents where both terms exist anywhere in the text of a single document. + This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

    +

    To search for documents that contain "jakarta apache" and "Apache Lucene" use the query:

    +
    "jakarta apache" AND "Apache Lucene"
    + +

    +

    +

    The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.

    +

    To search for documents that must contain "jakarta" and may contain "lucene" use the query:

    +
    +jakarta lucene
    + +

    NOT

    +

    The NOT operator excludes documents that contain the term after NOT. + This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.

    +

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    +
    "jakarta apache" NOT "Apache Lucene"
    +

    Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:

    +
    NOT "jakarta apache"
    + +

    -

    +

    The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.

    +

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    +
    "jakarta apache" -"Apache Lucene"
    +
    + + + +

    Grouping

    +
    +

    Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

    +

    To search for either "jakarta" or "apache" and "website" use the query:

    +
    (jakarta OR apache) AND website
    +

    This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.

    +
    + + + +

    Field Grouping

    +
    +

    Lucene supports using parentheses to group multiple clauses to a single field.

    +

    To search for a title that contains both the word "return" and the phrase "pink panther" use the query:

    +
    title:(+return +"pink panther")
    +
    + + + +

    Escaping Special Characters

    +
    +

    Lucene supports escaping special characters that are part of the query syntax. The current list special characters are

    +

    + - && || ! ( ) { } [ ] ^ " ~ * ? : \

    +

    To escape these character use the \ before the character. For example to search for (1+1):2 use the query:

    +
    \(1\+1\)\:2
    +
    + Index: lucene/site/build/site/contributions.html =================================================================== --- lucene/site/build/site/contributions.html (revision 1328746) +++ lucene/site/build/site/contributions.html (working copy) @@ -1,756 +0,0 @@ - - - - - - - - - Apache Lucene - Contributions - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Contributions -

    - - - -

    Overview

    -
    -

    This page lists external Lucene resources. If you have - written something that should be included, please post all - relevant information to one of the mailing lists. Nothing - listed here is directly supported by the Lucene - developers, so if you encounter any problems with any of - this software, please use the author's contact information - to get help.

    -

    If you are looking for information on contributing patches or other improvements to Lucene, see - How To Contribute on the Lucene Wiki.

    -
    - - - -

    Lucene Tools

    -
    -

    - Software that works with Lucene indices. -

    - -

    Luke

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.getopt.org/luke/ - -
    - author - - Andrzej Bialecki -
    - -

    LIMO (Lucene Index Monitor)

    - - - - - - - - - - - - - - - - -
    - URL - - - http://limo.sf.net/ - -
    - author - - Julien Nioche -
    -
    - - - -

    Lucene Document Converters

    -
    -

    - Lucene requires information you want to index to be - converted into a Document class. Here are - contributions for various solutions that convert different - content types to Lucene's Document classes. -

    - -

    XML Document #1

    - - - - - - - - - - - - - - - - -
    - URL - - - http://marc.theaimsgroup.com/?l=lucene-dev&m=100723333506246&w=2 - -
    - author - - Philip Ogren - ogren@mayo.edu -
    - -

    XML Document #2

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00346.html - -
    - author - - Peter Carlson - carlson@bookandhammer.com -
    - -

    PDF Box

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.pdfbox.org/ - -
    - author - - Ben Litchfield - ben@csh.rit.edu -
    - -

    XPDF - PDF Document Conversion

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.foolabs.com/xpdf - -
    - author - - N/A -
    - -

    PDFTextStream -- PDF text and metadata extraction

    - - - - - - - - - - - - - - - - -
    - URL - - - http://snowtide.com - -
    - author - - N/A -
    - -

    PJ Classic & PJ Professional - PDF Document Conversion

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.etymon.com/ - -
    - author - - N/A -
    -
    - - - -

    Miscellaneous

    -
    -

    - -

    - -

    Arabic Analyzer for Java

    - - - - - - - - - - - - - - - - -
    - URL - - - http://savannah.nongnu.org/projects/aramorph - -
    - author - - Pierrick Brihaye -
    - -

    Phonetix

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.companywebstore.de/tangentum/mirror/en/products/phonetix/index.html - -
    - author - - tangentum technologies -
    - -

    ejIndex - JBoss MBean for Lucene

    -

    - -

    - - - - - - - - - - - - - - - - -
    - URL - - - http://ejindex.sourceforge.net/ - -
    - author - - Andy Scholz -
    - -

    JavaCC

    - - - - - - - - - - - - - - - - -
    - URL - - - https://javacc.dev.java.net/ - -
    - author - - Sun Microsystems (java.net) -
    - -

    LuSQL - Index databases with Lucene

    - - - - - - - - - - - - - - - - -
    - URL - - - http://lab.cisti-icist.nrc-cnrc.gc.ca/cistilabswiki/index.php/LuSql - -
    - author - - Glen Newton -
    -
    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/scoring.html =================================================================== --- lucene/site/build/site/scoring.html (revision 1328746) +++ lucene/site/build/site/scoring.html (working copy) @@ -1,599 +0,0 @@ - - - - - - - - - Apache Lucene - Scoring - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Scoring -

    - - - - -

    Introduction

    -
    -

    Lucene scoring is the heart of why we all love Lucene. It is blazingly fast and it hides almost all of the complexity from the user. - In a nutshell, it works. At least, that is, until it doesn't work, or doesn't work as one would expect it to - work. Then we are left digging into Lucene internals or asking for help on java-user@lucene.apache.org to figure out why a document with five of our query terms - scores lower than a different document with only one of the query terms.

    -

    While this document won't answer your specific scoring issues, it will, hopefully, point you to the places that can - help you figure out the what and why of Lucene scoring.

    -

    Lucene scoring uses a combination of the - Vector Space Model (VSM) of Information - Retrieval and the Boolean model - to determine - how relevant a given Document is to a User's query. In general, the idea behind the VSM is the more - times a query term appears in a document relative to - the number of times the term appears in all the documents in the collection, the more relevant that - document is to the query. It uses the Boolean model to first narrow down the documents that need to - be scored based on the use of boolean logic in the Query specification. Lucene also adds some - capabilities and refinements onto this model to support boolean and fuzzy searching, but it - essentially remains a VSM based system at the heart. - For some valuable references on VSM and IR in general refer to the - Lucene Wiki IR references. -

    -

    The rest of this document will cover Scoring basics and how to change your - Similarity. Next it will cover ways you can - customize the Lucene internals in Changing your Scoring - -- Expert Level which gives details on implementing your own - Query class and related functionality. Finally, we - will finish up with some reference material in the Appendix. -

    -
    - - -

    Scoring

    -
    -

    Scoring is very much dependent on the way documents are indexed, - so it is important to understand indexing (see - Apache Lucene - Getting Started Guide - and the Lucene - file formats - before continuing on with this section.) It is also assumed that readers know how to use the - Searcher.explain(Query query, int doc) functionality, - which can go a long way in informing why a score is returned. -

    - -

    Fields and Documents

    -

    In Lucene, the objects we are scoring are - Documents. A Document is a collection - of - Fields. Each Field has semantics about how - it is created and stored (i.e. tokenized, untokenized, raw data, compressed, etc.) It is important to - note that Lucene scoring works on Fields and then combines the results to return Documents. This is - important because two Documents with the exact same content, but one having the content in two Fields - and the other in one Field will return different scores for the same query due to length normalization - (assumming the - DefaultSimilarity - on the Fields). -

    - -

    Score Boosting

    -

    Lucene allows influencing search results by "boosting" in more than one level: -

      - -
    • -Document level boosting - - while indexing - by calling - document.setBoost() - before a document is added to the index. -
    • - -
    • -Document's Field level boosting - - while indexing - by calling - field.setBoost() - before adding a field to the document (and before adding the document to the index). -
    • - -
    • -Query level boosting - - during search, by setting a boost on a query clause, calling - Query.setBoost(). -
    • - -
    - -

    -

    Indexing time boosts are preprocessed for storage efficiency and written to - the directory (when writing the document) in a single byte (!) as follows: - For each field of a document, all boosts of that field - (i.e. all boosts under the same field name in that doc) are multiplied. - The result is multiplied by the boost of the document, - and also multiplied by a "field length norm" value - that represents the length of that field in that doc - (so shorter fields are automatically boosted up). - The result is decoded as a single byte - (with some precision loss of course) and stored in the directory. - The similarity object in effect at indexing computes the length-norm of the field. -

    -

    This composition of 1-byte representation of norms - (that is, indexing time multiplication of field boosts & doc boost & field-length-norm) - is nicely described in - Fieldable.setBoost(). -

    -

    Encoding and decoding of the resulted float norm in a single byte are done by the - static methods of the class Similarity: - encodeNorm() and - decodeNorm(). - Due to loss of precision, it is not guaranteed that decode(encode(x)) = x, - e.g. decode(encode(0.89)) = 0.75. - At scoring (search) time, this norm is brought into the score of document - as norm(t, d), as shown by the formula in - Similarity. -

    - -

    Understanding the Scoring Formula

    -

    - This scoring formula is described in the - Similarity class. Please take the time to study this formula, as it contains much of the information about how the - basics of Lucene scoring work, especially the - TermQuery. -

    - -

    The Big Picture

    -

    OK, so the tf-idf formula and the - Similarity - is great for understanding the basics of Lucene scoring, but what really drives Lucene scoring are - the use and interactions between the - Query classes, as created by each application in - response to a user's information need. -

    -

    In this regard, Lucene offers a wide variety of Query implementations, most of which are in the - org.apache.lucene.search package. - These implementations can be combined in a wide variety of ways to provide complex querying - capabilities along with - information about where matches took place in the document collection. The Query - section below - highlights some of the more important Query classes. For information on the other ones, see the - package summary. For details on implementing - your own Query class, see Changing your Scoring -- - Expert Level below. -

    -

    Once a Query has been created and submitted to the - IndexSearcher, the scoring process - begins. (See the Appendix Algorithm section for more notes on the process.) After some infrastructure setup, - control finally passes to the Weight implementation and its - Scorer instance. In the case of any type of - BooleanQuery, scoring is handled by the - BooleanWeight2 - (link goes to ViewVC BooleanQuery java code which contains the BooleanWeight2 inner class) or - BooleanWeight - (link goes to ViewVC BooleanQuery java code, which contains the BooleanWeight inner class). -

    -

    - Assuming the use of the BooleanWeight2, a - BooleanScorer2 is created by bringing together - all of the - Scorers from the sub-clauses of the BooleanQuery. - When the BooleanScorer2 is asked to score it delegates its work to an internal Scorer based on the type - of clauses in the Query. This internal Scorer essentially loops over the sub scorers and sums the scores - provided by each scorer while factoring in the coord() score. - -

    - -

    Query Classes

    -

    For information on the Query Classes, refer to the - search package javadocs - -

    - -

    Changing Similarity

    -

    One of the ways of changing the scoring characteristics of Lucene is to change the similarity factors. For information on - how to do this, see the - search package javadocs -

    -
    - - -

    Changing your Scoring -- Expert Level

    -
    -

    At a much deeper level, one can affect scoring by implementing their own Query classes (and related scoring classes.) To learn more - about how to do this, refer to the - search package javadocs - -

    -
    - - - -

    Appendix

    -
    - -

    Algorithm

    -

    This section is mostly notes on stepping through the Scoring process and serves as - fertilizer for the earlier sections.

    -

    In the typical search application, a - Query - is passed to the - Searcher - , beginning the scoring process. -

    -

    Once inside the Searcher, a - Collector - is used for the scoring and sorting of the search results. - These important objects are involved in a search: -

      - -
    1. The - Weight - object of the Query. The Weight object is an internal representation of the Query that - allows the Query to be reused by the Searcher. -
    2. - -
    3. The Searcher that initiated the call.
    4. - -
    5. A - Filter - for limiting the result set. Note, the Filter may be null. -
    6. - -
    7. A - Sort - object for specifying how to sort the results if the standard score based sort method is not - desired. -
    8. - -
    - -

    -

    Assuming we are not sorting (since sorting doesn't - effect the raw Lucene score), - we call one of the search methods of the Searcher, passing in the - Weight - object created by Searcher.createWeight(Query), - Filter - and the number of results we want. This method - returns a - TopDocs - object, which is an internal collection of search results. - The Searcher creates a - TopScoreDocCollector - and passes it along with the Weight, Filter to another expert search method (for more on the - Collector - mechanism, see - Searcher - .) The TopDocCollector uses a - PriorityQueue - to collect the top results for the search. -

    -

    If a Filter is being used, some initial setup is done to determine which docs to include. Otherwise, - we ask the Weight for - a - Scorer - for the - IndexReader - of the current searcher and we proceed by - calling the score method on the - Scorer - . -

    -

    At last, we are actually going to score some documents. The score method takes in the Collector - (most likely the TopScoreDocCollector or TopFieldCollector) and does its business. - Of course, here is where things get involved. The - Scorer - that is returned by the - Weight - object depends on what type of Query was submitted. In most real world applications with multiple - query terms, - the - Scorer - is going to be a - BooleanScorer2 - (see the section on customizing your scoring for info on changing this.) - -

    -

    Assuming a BooleanScorer2 scorer, we first initialize the Coordinator, which is used to apply the - coord() factor. We then - get a internal Scorer based on the required, optional and prohibited parts of the query. - Using this internal Scorer, the BooleanScorer2 then proceeds - into a while loop based on the Scorer#next() method. The next() method advances to the next document - matching the query. This is an - abstract method in the Scorer class and is thus overriden by all derived - implementations. If you have a simple OR query - your internal Scorer is most likely a DisjunctionSumScorer, which essentially combines the scorers - from the sub scorers of the OR'd terms.

    -
    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/demo.html =================================================================== --- lucene/site/build/site/demo.html (revision 1328746) +++ lucene/site/build/site/demo.html (working copy) @@ -1,372 +0,0 @@ - - - - - - - - - Apache Lucene - Building and Installing the Basic Demo - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Building and Installing the Basic Demo -

    - - - - -

    About this Document

    -
    -

    -This document is intended as a "getting started" guide to using and running the Lucene demos. -It walks you through some basic installation and configuration. -

    -
    - - - - -

    About the Demo

    -
    -

    -The Lucene command-line demo code consists of an application that demonstrates various -functionalities of Lucene and how you can add Lucene to your applications. -

    -
    - - - -

    Setting your CLASSPATH

    -
    -

    -First, you should download the -latest Lucene distribution and then extract it to a working directory. -

    -

    -You need three JARs: the Lucene JAR, the common analysis JAR, and the Lucene demo JAR. You should -see the Lucene JAR file in the core/ directory you created when you extracted the archive -- it -should be named something like lucene-core-{version}.jar. You should also see files -called lucene-analyzers-common-{version}.jar and lucene-demo-{version}.jar -under analysis/common/ and demo/, respectively. -

    -

    -Put all three of these files in your Java CLASSPATH. -

    -
    - - - -

    Indexing Files

    -
    -

    -Once you've gotten this far you're probably itching to go. Let's build an index! Assuming -you've set your CLASSPATH correctly, just type: - -

    -    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
    -
    - -This will produce a subdirectory called index which will contain an index of all of the -Lucene source code. -

    -

    -To search the index type: - -

    -    java org.apache.lucene.demo.SearchFiles
    -
    - -You'll be prompted for a query. Type in a swear word and press the enter key. You'll see that the -Lucene developers are very well mannered and get no results. Now try entering the word "string". -That should return a whole bunch of documents. The results will page at every tenth result and ask -you whether you want more results. -

    -
    - - - -

    About the code...

    -
    -

    - -read on>>> - -

    -
    - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/demo2.html =================================================================== --- lucene/site/build/site/demo2.html (revision 1328746) +++ lucene/site/build/site/demo2.html (working copy) @@ -1,421 +0,0 @@ - - - - - - - - - Apache Lucene - Basic Demo Sources Walk-through - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Basic Demo Sources Walk-through -

    - - - - -

    About the Code

    -
    -

    -In this section we walk through the sources behind the command-line Lucene demo: where to find them, -their parts and their function. This section is intended for Java developers wishing to understand -how to use Lucene in their applications. -

    -
    - - - - -

    Location of the source

    -
    -

    -NOTE: to examine the sources, you need to download and extract a source checkout of -Lucene: (lucene-{version}-src.zip). -

    -

    -Relative to the directory created when you extracted Lucene, you -should see a directory called lucene/demo/. This is the root for the Lucene -demo. Under this directory is src/java/org/apache/lucene/demo/. This is where all -the Java sources for the demo live. -

    -

    -Within this directory you should see the IndexFiles.java class we executed earlier. -Bring it up in vi or your editor of choice and let's take a look at it. -

    -
    - - - -

    IndexFiles

    -
    -

    -As we discussed in the previous walk-through, the IndexFiles class creates a Lucene -Index. Let's take a look at how it does this. -

    -

    -The main() method parses the command-line parameters, then in preparation for -instantiating IndexWriter, opens a -Directory and instantiates -StandardAnalyzer and -IndexWriterConfig. -

    -

    -The value of the -index command-line parameter is the name of the filesystem directory -where all index information should be stored. If IndexFiles is invoked with a -relative path given in the -index command-line parameter, or if the -index -command-line parameter is not given, causing the default relative index path "index" -to be used, the index path will be created as a subdirectory of the current working directory -(if it does not already exist). On some platforms, the index path may be created in a different -directory (such as the user's home directory). -

    -

    -The -docs command-line parameter value is the location of the directory containing -files to be indexed. -

    -

    -The -update command-line parameter tells IndexFiles not to delete the -index if it already exists. When -update is not given, IndexFiles will -first wipe the slate clean before indexing any documents. -

    -

    -Lucene Directorys are used by the -IndexWriter to store information in the index. In addition to the -FSDirectory implementation we are using, -there are several other Directory subclasses that can write to RAM, to databases, etc. -

    -

    -Lucene Analyzers are processing pipelines -that break up text into indexed tokens, a.k.a. terms, and optionally perform other operations on these -tokens, e.g. downcasing, synonym insertion, filtering out unwanted tokens, etc. The Analyzer -we are using is StandardAnalyzer, which creates tokens using the Word Break rules from the -Unicode Text Segmentation algorithm specified in Unicode -Standard Annex #29; converts tokens to lowercase; and then filters out stopwords. Stopwords are -common language words such as articles (a, an, the, etc.) and other tokens that may have less value for -searching. It should be noted that there are different rules for every language, and you should use the -proper analyzer for each. Lucene currently provides Analyzers for a number of different languages (see -the javadocs under -lucene/analysis/common/src/java/org/apache/lucene/analysis). -

    -

    -The IndexWriterConfig instance holds all configuration for IndexWriter. For -example, we set the OpenMode to use here based on the value of the -update -command-line parameter. -

    -

    -Looking further down in the file, after IndexWriter is instantiated, you should see the -indexDocs() code. This recursive function crawls the directories and creates -Document objects. The -Document is simply a data object to represent the text content from the file as well as -its creation time and location. These instances are added to the IndexWriter. If -the -update command-line parameter is given, the IndexWriter -OpenMode will be set to OpenMode.CREATE_OR_APPEND, and rather than -adding documents to the index, the IndexWriter will update them -in the index by attempting to find an already-indexed document with the same identifier (in our -case, the file path serves as the identifier); deleting it from the index if it exists; and then -adding the new document to the index. -

    -
    - - - -

    Searching Files

    -
    -

    -The SearchFiles class is -quite simple. It primarily collaborates with an -IndexSearcher, -StandardAnalyzer (which is used in the -IndexFiles class as well) -and a QueryParser. The -query parser is constructed with an analyzer used to interpret your query text in the same way the -documents are interpreted: finding word boundaries, downcasing, and removing useless words like -'a', 'an' and 'the'. The Query -object contains the results from the -QueryParser which is passed -to the searcher. Note that it's also possible to programmatically construct a rich -Query object without using the query -parser. The query parser just enables decoding the Lucene query -syntax into the corresponding Query -object. -

    -

    - -SearchFiles uses the IndexSearcher.search(query,n) method that returns -TopDocs with max n hits. -The results are printed in pages, sorted by score (i.e. relevance). -

    -
    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/index.html =================================================================== --- lucene/site/build/site/index.html (revision 1328746) +++ lucene/site/build/site/index.html (working copy) @@ -1,280 +0,0 @@ - - - - - - - -Lucene Java Documentation - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    Lucene Java Documentation

    - -

    - This is the official documentation for Lucene Java
    - Please use the menu on the left to access the Javadocs and different documents. -

    - -

    - Additional documentation is available in the Wiki. -

    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/systemrequirements.html =================================================================== --- lucene/site/build/site/systemrequirements.html (revision 1328746) +++ lucene/site/build/site/systemrequirements.html (working copy) @@ -1,299 +0,0 @@ - - - - - - - -Apache Lucene - System Requirements - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    Apache Lucene - System Requirements

    - - - - -

    System Requirements

    -
    -

    - Lucene Core has the following minimum requirements: -

      - -
    • Java 1.6.x or greater.
    • - -
    • ANT 1.7.0 or greater.
    • - -
    • CPU, Disk and Memory requirements are based on the many choices made in implementing Lucene (document size, number of documents, and number of hits retrieved to name a few.)
    • - -
    - -

    -

    Some modules may have other requirements, refer to their documentation and build files for information.

    -
    - - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/gettingstarted.html =================================================================== --- lucene/site/build/site/gettingstarted.html (revision 1328746) +++ lucene/site/build/site/gettingstarted.html (working copy) @@ -1,310 +0,0 @@ - - - - - - - - - Apache Lucene - Getting Started Guide - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Getting Started Guide -

    -
    - -
    - - - -

    Getting Started

    -
    -

    -This document is intended as a "getting started" guide. It has three audiences: first-time users -looking to install Apache Lucene in their application; developers looking to modify or base -the applications they develop on Lucene; and developers looking to become involved in and contribute -to the development of Lucene. This document is written in tutorial and walk-through format. The -goal is to help you "get started". It does not go into great depth on some of the conceptual or -inner details of Lucene. -

    -

    -Each section listed below builds on one another. More advanced users -may wish to skip sections. -

    - -
    - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/.htaccess =================================================================== --- lucene/site/build/site/.htaccess (revision 1328746) +++ lucene/site/build/site/.htaccess (working copy) @@ -1,3 +0,0 @@ -#Forrest generates UTF-8 by default, but these httpd servers are -#ignoring the meta http-equiv charset tags -AddDefaultCharset off Index: lucene/site/build/site/queryparsersyntax.html =================================================================== --- lucene/site/build/site/queryparsersyntax.html (revision 1328746) +++ lucene/site/build/site/queryparsersyntax.html (working copy) @@ -1,536 +0,0 @@ - - - - - - - - - Apache Lucene - Query Parser Syntax - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Query Parser Syntax -

    - - - -

    Overview

    -
    -

    Although Lucene provides the ability to create your own - queries through its API, it also provides a rich query - language through the Query Parser, a lexer which - interprets a string into a Lucene Query using JavaCC. -

    -

    Generally, the query parser syntax may change from - release to release. This page describes the syntax as of - the current release. If you are using a different - version of Lucene, please consult the copy of - docs/queryparsersyntax.html that was distributed - with the version you are using. -

    -

    - Before choosing to use the provided Query Parser, please consider the following: -

      - -
    1. If you are programmatically generating a query string and then - parsing it with the query parser then you should seriously consider building - your queries directly with the query API. In other words, the query - parser is designed for human-entered text, not for program-generated - text.
    2. - - -
    3. Untokenized fields are best added directly to queries, and not - through the query parser. If a field's values are generated programmatically - by the application, then so should query clauses for this field. - An analyzer, which the query parser uses, is designed to convert human-entered - text to terms. Program-generated values, like dates, keywords, etc., - should be consistently program-generated.
    4. - - -
    5. In a query form, fields which are general text should use the query - parser. All others, such as date ranges, keywords, etc. are better added - directly through the query API. A field with a limit set of values, - that can be specified with a pull-down menu should not be added to a - query string which is subsequently parsed, but rather added as a - TermQuery clause.
    6. - -
    - -

    -
    - - - -

    Terms

    -
    -

    A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.

    -

    A Single Term is a single word such as "test" or "hello".

    -

    A Phrase is a group of words surrounded by double quotes such as "hello dolly".

    -

    Multiple terms can be combined together with Boolean operators to form a more complex query (see below).

    -

    Note: The analyzer used to create the index will be used on the terms and phrases in the query string. - So it is important to choose an analyzer that will not interfere with the terms used in the query string.

    -
    - - - -

    Fields

    -
    -

    Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.

    -

    You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.

    -

    As an example, let's assume a Lucene index contains two fields, title and text and text is the default field. - If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:

    -
    title:"The Right Way" AND text:go
    -

    or

    -
    title:"Do it right" AND right
    -

    Since text is the default field, the field indicator is not required.

    -

    Note: The field is only valid for the term that it directly precedes, so the query

    -
    title:Do it right
    -

    Will only find "Do" in the title field. It will find "it" and "right" in the default field (in this case the text field).

    -
    - - - -

    Term Modifiers

    -
    -

    Lucene supports modifying query terms to provide a wide range of searching options.

    - -

    Wildcard Searches

    -

    Lucene supports single and multiple character wildcard searches within single terms - (not within phrase queries).

    -

    To perform a single character wildcard search use the "?" symbol.

    -

    To perform a multiple character wildcard search use the "*" symbol.

    -

    The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

    -
    te?t
    -

    Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

    -
    test*
    -

    You can also use the wildcard searches in the middle of a term.

    -
    te*t
    -

    Note: You cannot use a * or ? symbol as the first character of a search.

    - -

    Fuzzy Searches

    -

    Lucene supports fuzzy searches based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:

    -
    roam~
    -

    This search will find terms like foam and roams.

    -

    Starting with Lucene 1.9 an additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:

    -
    roam~0.8
    -

    The default that is used if the parameter is not given is 0.5.

    - -

    Proximity Searches

    -

    Lucene supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "apache" and "jakarta" within 10 words of each other in a document use the search:

    -
    "jakarta apache"~10
    - -

    Range Searches

    -

    Range Queries allow one to match documents whose field(s) values - are between the lower and upper bound specified by the Range Query. - Range Queries can be inclusive or exclusive of the upper and lower bounds. - Sorting is done lexicographically.

    -
    mod_date:[20020101 TO 20030101]
    -

    This will find documents whose mod_date fields have values between 20020101 and 20030101, inclusive. - Note that Range Queries are not reserved for date fields. You could also use range queries with non-date fields:

    -
    title:{Aida TO Carmen}
    -

    This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.

    -

    Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by - curly brackets.

    - -

    Boosting a Term

    -

    Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

    -

    Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for

    -
    jakarta apache
    -

    and you want the term "jakarta" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. - You would type:

    -
    jakarta^4 apache
    -

    This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example:

    -
    "jakarta apache"^4 "Apache Lucene"
    -

    By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)

    -
    - - - - -

    Boolean Operators

    -
    -

    Boolean operators allow terms to be combined through logic operators. - Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).

    - -

    -

    The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. - The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. - The symbol || can be used in place of the word OR.

    -

    To search for documents that contain either "jakarta apache" or just "jakarta" use the query:

    -
    "jakarta apache" jakarta
    -

    or

    -
    "jakarta apache" OR jakarta
    - -

    AND

    -

    The AND operator matches documents where both terms exist anywhere in the text of a single document. - This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

    -

    To search for documents that contain "jakarta apache" and "Apache Lucene" use the query:

    -
    "jakarta apache" AND "Apache Lucene"
    - -

    +

    -

    The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.

    -

    To search for documents that must contain "jakarta" and may contain "lucene" use the query:

    -
    +jakarta lucene
    - -

    NOT

    -

    The NOT operator excludes documents that contain the term after NOT. - This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.

    -

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    -
    "jakarta apache" NOT "Apache Lucene"
    -

    Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:

    -
    NOT "jakarta apache"
    - -

    -

    -

    The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.

    -

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    -
    "jakarta apache" -"Apache Lucene"
    -
    - - - -

    Grouping

    -
    -

    Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

    -

    To search for either "jakarta" or "apache" and "website" use the query:

    -
    (jakarta OR apache) AND website
    -

    This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.

    -
    - - - -

    Field Grouping

    -
    -

    Lucene supports using parentheses to group multiple clauses to a single field.

    -

    To search for a title that contains both the word "return" and the phrase "pink panther" use the query:

    -
    title:(+return +"pink panther")
    -
    - - - -

    Escaping Special Characters

    -
    -

    Lucene supports escaping special characters that are part of the query syntax. The current list special characters are

    -

    + - && || ! ( ) { } [ ] ^ " ~ * ? : \

    -

    To escape these character use the \ before the character. For example to search for (1+1):2 use the query:

    -
    \(1\+1\)\:2
    -
    - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/broken-links.xml =================================================================== --- lucene/site/build/site/broken-links.xml (revision 1328746) +++ lucene/site/build/site/broken-links.xml (working copy) @@ -1,2 +0,0 @@ - - Index: lucene/site/build/site/linkmap.html =================================================================== --- lucene/site/build/site/linkmap.html (revision 1328746) +++ lucene/site/build/site/linkmap.html (working copy) @@ -1,501 +0,0 @@ - - - - - - - -Site Linkmap Table of Contents - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    Site Linkmap Table of Contents

    -

    - This is a map of the complete site and its structure. -

    -
      -
    • -Lucene  ___________________  site -
    • -
        - - - - -
          -
        • -Documentation  ___________________  docs -
        • -
            - -
              -
            • -Overview  ___________________  overview -
            • -
            - -
              -
            • -Changes  ___________________  changes -
            • -
            - -
              -
            • -Javadocs  ___________________  javadoc -
            • -
                - -
                  -
                • -Core  ___________________  javadoc-core -
                • -
                - - - - - - - - - - - - - -
                  -
                • -Analysis: UIMA  ___________________  javadoc-analyzers-uima -
                • -
                - -
                  -
                • -Benchmark  ___________________  javadoc-benchmark -
                • -
                - -
                  -
                • -Demo  ___________________  javadoc-demo -
                • -
                - -
                  -
                • -Faceting  ___________________  javadoc-facet -
                • -
                - -
                  -
                • -Grouping  ___________________  javadoc-grouping -
                • -
                - -
                  -
                • -Highlighter  ___________________  javadoc-highlighter -
                • -
                - -
                  -
                • -Join  ___________________  javadoc-join -
                • -
                - -
                  -
                • -Memory  ___________________  javadoc-memory -
                • -
                - - - -
                  -
                • -Queries  ___________________  javadoc-queries -
                • -
                - -
                  -
                • -Query Parsers  ___________________  javadoc-queryparser -
                • -
                - -
                  -
                • -Sandbox  ___________________  javadoc-sandbox -
                • -
                - -
                  -
                • -Spatial  ___________________  javadoc-spatial -
                • -
                - - - -
                  -
                • -Test Framework  ___________________  javadoc-test-framework -
                • -
                - -
              -
            - - - - - -
              -
            • -FAQ  ___________________  faq -
            • -
            - - - - - - - -
              -
            • -Scoring  ___________________  scoring -
            • -
            - -
              -
            • -Wiki  ___________________  wiki -
            • -
            - - - -
          -
        - - - - - - -
      -
    -
    - -
     
    -
    - - - - Index: lucene/site/build/site/fileformats.html =================================================================== --- lucene/site/build/site/fileformats.html (revision 1328746) +++ lucene/site/build/site/fileformats.html (working copy) @@ -1,2648 +0,0 @@ - - - - - - - - - Apache Lucene - Index File Formats - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Index File Formats -

    - - - -

    Index File Formats

    -
    -

    - This document defines the index file formats used - in this version of Lucene. If you are using a different - version of Lucene, please consult the copy of - docs/fileformats.html - that was distributed - with the version you are using. -

    -

    - Apache Lucene is written in Java, but several - efforts are underway to write - versions - of Lucene in other programming - languages. If these versions are to remain compatible with Apache - Lucene, then a language-independent definition of the Lucene index - format is required. This document thus attempts to provide a - complete and independent definition of the Apache Lucene file - formats. -

    -

    - As Lucene evolves, this document should evolve. - Versions of Lucene in different programming languages should endeavor - to agree on file formats, and generate new versions of this document. -

    -

    - Compatibility notes are provided in this document, - describing how file formats have changed from prior versions. -

    -

    - In version 2.1, the file format was changed to allow - lock-less commits (ie, no more commit lock). The - change is fully backwards compatible: you can open a - pre-2.1 index for searching or adding/deleting of - docs. When the new segments file is saved - (committed), it will be written in the new file format - (meaning no specific "upgrade" process is needed). - But note that once a commit has occurred, pre-2.1 - Lucene will not be able to read the index. -

    -

    - In version 2.3, the file format was changed to allow - segments to share a single set of doc store (vectors & - stored fields) files. This allows for faster indexing - in certain cases. The change is fully backwards - compatible (in the same way as the lock-less commits - change in 2.1). -

    -

    - In version 2.4, Strings are now written as true UTF-8 - byte sequence, not Java's modified UTF-8. See issue - LUCENE-510 for details. -

    -

    - In version 2.9, an optional opaque Map<String,String> - CommitUserData may be passed to IndexWriter's commit - methods (and later retrieved), which is recorded in - the segments_N file. See issue LUCENE-1382 for - details. Also, diagnostics were added to each segment - written recording details about why it was written - (due to flush, merge; which OS/JRE was used; etc.). - See issue LUCENE-1654 for details. -

    -

    - In version 3.0, compressed fields are no longer - written to the index (they can still be read, but on - merge the new segment will write them, - uncompressed). See issue LUCENE-1960 for details. -

    -

    - In version 3.1, segments records the code version - that created them. See LUCENE-2720 for details. - - Additionally segments track explicitly whether or - not they have term vectors. See LUCENE-2811 for details. -

    -

    - In version 3.2, numeric fields are written as natively - to stored fields file, previously they were stored in - text format only. -

    -

    - In version 3.4, fields can omit position data while - still indexing term frequencies. -

    -
    - - - -

    Definitions

    -
    -

    - The fundamental concepts in Lucene are index, - document, field and term. -

    -

    - An index contains a sequence of documents. -

    -
      - -
    • - -

      - A document is a sequence of fields. -

      - -
    • - - -
    • - -

      - A field is a named sequence of terms. -

      - -
    • - - -
    • - A term is a string. -
    • - -
    -

    - The same string in two different fields is - considered a different term. Thus terms are represented as a pair of - strings, the first naming the field, and the second naming text - within the field. -

    - -

    Inverted Indexing

    -

    - The index stores statistics about terms in order - to make term-based search more efficient. Lucene's - index falls into the family of indexes known as an inverted - index. This is because it can list, for a term, the documents that contain - it. This is the inverse of the natural relationship, in which - documents list terms. -

    - -

    Types of Fields

    -

    - In Lucene, fields may be stored, in which - case their text is stored in the index literally, in a non-inverted - manner. Fields that are inverted are called indexed. A field - may be both stored and indexed.

    -

    The text of a field may be tokenized into terms to be - indexed, or the text of a field may be used literally as a term to be indexed. - Most fields are - tokenized, but sometimes it is useful for certain identifier fields - to be indexed literally. -

    -

    See the Field java docs for more information on Fields.

    - -

    Segments

    -

    - Lucene indexes may be composed of multiple sub-indexes, or - segments. Each segment is a fully independent index, which could be searched - separately. Indexes evolve by: -

    -
      - -
    1. - -

      Creating new segments for newly added documents.

      - -
    2. - -
    3. - -

      Merging existing segments.

      - -
    4. - -
    -

    - Searches may involve multiple segments and/or multiple indexes, each - index potentially composed of a set of segments. -

    - -

    Document Numbers

    -

    - Internally, Lucene refers to documents by an integer document - number. The first document added to an index is numbered zero, and each - subsequent document added gets a number one greater than the previous. -

    -

    - -
    - -

    -

    - Note that a document's number may change, so caution should be taken - when storing these numbers outside of Lucene. In particular, numbers may - change in the following situations: -

    -
      - -
    • - -

      - The - numbers stored in each segment are unique only within the segment, - and must be converted before they can be used in a larger context. - The standard technique is to allocate each segment a range of - values, based on the range of numbers used in that segment. To - convert a document number from a segment to an external value, the - segment's base document - number is added. To convert an external value back to a - segment-specific value, the segment is identified by the range that - the external value is in, and the segment's base value is - subtracted. For example two five document segments might be - combined, so that the first segment has a base value of zero, and - the second of five. Document three from the second segment would - have an external value of eight. -

      - -
    • - -
    • - -

      - When documents are deleted, gaps are created - in the numbering. These are eventually removed as the index evolves - through merging. Deleted documents are dropped when segments are - merged. A freshly-merged segment thus has no gaps in its numbering. -

      - -
    • - -
    -
    - - - -

    Overview

    -
    -

    - Each segment index maintains the following: -

    -
      - -
    • - -

      Field names. This - contains the set of field names used in the index. - -

      - -
    • - -
    • - -

      Stored Field - values. This contains, for each document, a list of attribute-value - pairs, where the attributes are field names. These are used to - store auxiliary information about the document, such as its title, - url, or an identifier to access a - database. The set of stored fields are what is returned for each hit - when searching. This is keyed by document number. -

      - -
    • - -
    • - -

      Term dictionary. - A dictionary containing all of the terms used in all of the indexed - fields of all of the documents. The dictionary also contains the - number of documents which contain the term, and pointers to the - term's frequency and proximity data. -

      - -
    • - - -
    • - -

      Term Frequency - data. For each term in the dictionary, the numbers of all the - documents that contain that term, and the frequency of the term in - that document, unless frequencies are omitted (IndexOptions.DOCS_ONLY) -

      - -
    • - - -
    • - -

      Term Proximity - data. For each term in the dictionary, the positions that the term - occurs in each document. Note that this will - not exist if all fields in all documents omit position data. -

      - -
    • - - -
    • - -

      Normalization - factors. For each field in each document, a value is stored that is - multiplied into the score for hits on that field. -

      - -
    • - -
    • - -

      Term Vectors. For each field in each document, the term vector - (sometimes called document vector) may be stored. A term vector consists - of term text and term frequency. To add Term Vectors to your index see the - Field - constructors -

      - -
    • - -
    • - -

      Deleted documents. - An optional file indicating which documents are deleted. -

      - -
    • - -
    -

    Details on each of these are provided in subsequent sections. -

    -
    - - - -

    File Naming

    -
    -

    - All files belonging to a segment have the same name with varying - extensions. The extensions correspond to the different file formats - described below. When using the Compound File format (default in 1.4 and greater) these files are - collapsed into a single .cfs file (see below for details) -

    -

    - Typically, all segments - in an index are stored in a single directory, although this is not - required. -

    -

    - As of version 2.1 (lock-less commits), file names are - never re-used (there is one exception, "segments.gen", - see below). That is, when any file is saved to the - Directory it is given a never before used filename. - This is achieved using a simple generations approach. - For example, the first segments file is segments_1, - then segments_2, etc. The generation is a sequential - long integer represented in alpha-numeric (base 36) - form. -

    -
    - - -

    Summary of File Extensions

    -
    -

    The following table summarizes the names and extensions of the files in Lucene: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameExtensionBrief Description
    Segments Filesegments.gen, segments_NStores information about segments
    Lock Filewrite.lockThe Write lock prevents multiple IndexWriters from writing to the same file.
    Compound File.cfsAn optional "virtual" file consisting of all the other index files for systems - that frequently run out of file handles.
    Compound File Entry table.cfeThe "virtual" compound file's entry table holding all entries in the corresponding .cfs file (Since 3.4)
    Fields.fnmStores information about the fields
    Field Index.fdxContains pointers to field data
    Field Data.fdtThe stored fields for documents
    Term Infos.tisPart of the term dictionary, stores term info
    Term Info Index.tiiThe index into the Term Infos file
    Frequencies.frqContains the list of docs which contain each term along with frequency
    Positions.prxStores position information about where a term occurs in the index
    Norms.nrmEncodes length and boost factors for docs and fields
    Term Vector Index.tvxStores offset into the document data file
    Term Vector Documents.tvdContains information about each document that has term vectors
    Term Vector Fields.tvfThe field level info about term vectors
    Deleted Documents.delInfo about what files are deleted
    - - -

    -
    - - - -

    Primitive Types

    -
    - -

    Byte

    -

    - The most primitive type - is an eight-bit byte. Files are accessed as sequences of bytes. All - other data types are defined as sequences - of bytes, so file formats are byte-order independent. -

    - -

    UInt32

    -

    - 32-bit unsigned integers are written as four - bytes, high-order bytes first. -

    -

    - UInt32 --> <Byte>4 - -

    - -

    Uint64

    -

    - 64-bit unsigned integers are written as eight - bytes, high-order bytes first. -

    -

    UInt64 --> <Byte>8 - -

    - -

    VInt

    -

    - A variable-length format for positive integers is - defined where the high-order bit of each byte indicates whether more - bytes remain to be read. The low-order seven bits are appended as - increasingly more significant bits in the resulting integer value. - Thus values from zero to 127 may be stored in a single byte, values - from 128 to 16,383 may be stored in two bytes, and so on. -

    -

    - -VInt Encoding Example - -

    - - -- -- -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -

    - -Value - -

    - -
    - -

    - -First byte - -

    - -
    - -

    - -Second byte - -

    - -
    - -

    - -Third byte - -

    - -
    - -

    0 -

    - -
    - -

    - 00000000 -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    1 -

    - -
    - -

    - 00000001 -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    2 -

    - -
    - -

    - 00000010 -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    ... -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    127 -

    - -
    - -

    - 01111111 -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    128 -

    - -
    - -

    - 10000000 -

    - -
    - -

    - 00000001 -

    - -
    - -

    - -
    - - -

    - -
    - -

    129 -

    - -
    - -

    - 10000001 -

    - -
    - -

    - 00000001 -

    - -
    - -

    - -
    - - -

    - -
    - -

    130 -

    - -
    - -

    - 10000010 -

    - -
    - -

    - 00000001 -

    - -
    - -

    - -
    - - -

    - -
    - -

    ... -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    16,383 -

    - -
    - -

    - 11111111 -

    - -
    - -

    - 01111111 -

    - -
    - -

    - -
    - - -

    - -
    - -

    16,384 -

    - -
    - -

    - 10000000 -

    - -
    - -

    - 10000000 -

    - -
    - -

    - 00000001 -

    - -
    - -

    16,385 -

    - -
    - -

    - 10000001 -

    - -
    - -

    - 10000000 -

    - -
    - -

    - 00000001 -

    - -
    - -

    ... -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    -

    - This provides compression while still being - efficient to decode. -

    - -

    Chars

    -

    - Lucene writes unicode - character sequences as UTF-8 encoded bytes. -

    - -

    String

    -

    - Lucene writes strings as UTF-8 encoded bytes. - First the length, in bytes, is written as a VInt, - followed by the bytes. -

    -

    - String --> VInt, Chars -

    -
    - - - -

    Compound Types

    -
    - -

    Map<String,String>

    -

    - In a couple places Lucene stores a Map - String->String. -

    -

    - Map<String,String> --> Count<String,String>Count - -

    -
    - - - -

    Per-Index Files

    -
    -

    - The files in this section exist one-per-index. -

    - -

    Segments File

    -

    - The active segments in the index are stored in the - segment info file, - segments_N. - There may - be one or more - segments_N - files in the - index; however, the one with the largest - generation is the active one (when older - segments_N files are present it's because they - temporarily cannot be deleted, or, a writer is in - the process of committing, or a custom - IndexDeletionPolicy - is in use). This file lists each - segment by name, has details about the separate - norms and deletion files, and also contains the - size of each segment. -

    -

    - As of 2.1, there is also a file - segments.gen. - This file contains the - current generation (the - _N - in - segments_N) - of the index. This is - used only as a fallback in case the current - generation cannot be accurately determined by - directory listing alone (as is the case for some - NFS clients with time-based directory cache - expiraation). This file simply contains an Int32 - version header (SegmentInfos.FORMAT_LOCKLESS = - -2), followed by the generation recorded as Int64, - written twice. -

    -

    - -3.1 - Segments --> Format, Version, NameCounter, SegCount, <SegVersion, SegName, SegSize, DelGen, DocStoreOffset, [DocStoreSegment, DocStoreIsCompoundFile], HasSingleNormFile, NumField, - NormGenNumField, - IsCompoundFile, DeletionCount, HasProx, Diagnostics, HasVectors>SegCount, CommitUserData, Checksum -

    -

    - Format, NameCounter, SegCount, SegSize, NumField, - DocStoreOffset, DeletionCount --> Int32 -

    -

    - Version, DelGen, NormGen, Checksum --> Int64 -

    -

    - SegVersion, SegName, DocStoreSegment --> String -

    -

    - Diagnostics --> Map<String,String> -

    -

    - IsCompoundFile, HasSingleNormFile, - DocStoreIsCompoundFile, HasProx, HasVectors --> Int8 -

    -

    - CommitUserData --> Map<String,String> -

    -

    - Format is -9 (SegmentInfos.FORMAT_DIAGNOSTICS). -

    -

    - Version counts how often the index has been - changed by adding or deleting documents. -

    -

    - NameCounter is used to generate names for new segment files. -

    -

    - SegVersion is the code version that created the segment. -

    -

    - SegName is the name of the segment, and is used as the file name prefix - for all of the files that compose the segment's index. -

    -

    - SegSize is the number of documents contained in the segment index. -

    -

    - DelGen is the generation count of the separate - deletes file. If this is -1, there are no - separate deletes. If it is 0, this is a pre-2.1 - segment and you must check filesystem for the - existence of _X.del. Anything above zero means - there are separate deletes (_X_N.del). -

    -

    - NumField is the size of the array for NormGen, or - -1 if there are no NormGens stored. -

    -

    - NormGen records the generation of the separate - norms files. If NumField is -1, there are no - normGens stored and they are all assumed to be 0 - when the segment file was written pre-2.1 and all - assumed to be -1 when the segments file is 2.1 or - above. The generation then has the same meaning - as delGen (above). -

    -

    - IsCompoundFile records whether the segment is - written as a compound file or not. If this is -1, - the segment is not a compound file. If it is 1, - the segment is a compound file. Else it is 0, - which means we check filesystem to see if _X.cfs - exists. -

    -

    - If HasSingleNormFile is 1, then the field norms are - written as a single joined file (with extension - .nrm); if it is 0 then each field's norms - are stored as separate .fN files. See - "Normalization Factors" below for details. -

    -

    - DocStoreOffset, DocStoreSegment, - DocStoreIsCompoundFile: If DocStoreOffset is -1, - this segment has its own doc store (stored fields - values and term vectors) files and DocStoreSegment - and DocStoreIsCompoundFile are not stored. In - this case all files for stored field values - (*.fdt and *.fdx) and term - vectors (*.tvf, *.tvd and - *.tvx) will be stored with this segment. - Otherwise, DocStoreSegment is the name of the - segment that has the shared doc store files; - DocStoreIsCompoundFile is 1 if that segment is - stored in compound file format (as a .cfx - file); and DocStoreOffset is the starting document - in the shared doc store files where this segment's - documents begin. In this case, this segment does - not store its own doc store files but instead - shares a single set of these files with other - segments. -

    -

    - Checksum contains the CRC32 checksum of all bytes - in the segments_N file up until the checksum. - This is used to verify integrity of the file on - opening the index. -

    -

    - DeletionCount records the number of deleted - documents in this segment. -

    -

    - HasProx is 1 if any fields in this segment have - position data (IndexOptions.DOCS_AND_FREQS_AND_POSITIONS); else, it's 0. -

    -

    - CommitUserData stores an optional user-supplied - opaque Map<String,String> that was passed to - IndexWriter's commit or prepareCommit, or - IndexReader's flush methods. -

    -

    - The Diagnostics Map is privately written by - IndexWriter, as a debugging aid, for each segment - it creates. It includes metadata like the current - Lucene version, OS, Java version, why the segment - was created (merge, flush, addIndexes), etc. -

    -

    HasVectors is 1 if this segment stores term vectors, - else it's 0. -

    - -

    Lock File

    -

    - The write lock, which is stored in the index - directory by default, is named "write.lock". If - the lock directory is different from the index - directory then the write lock will be named - "XXXX-write.lock" where XXXX is a unique prefix - derived from the full path to the index directory. - When this file is present, a writer is currently - modifying the index (adding or removing - documents). This lock file ensures that only one - writer is modifying the index at a time. -

    - -

    Deletable File

    -

    - A writer dynamically computes - the files that are deletable, instead, so no file - is written. -

    - -

    Compound Files

    -

    Starting with Lucene 1.4 the compound file format became default. This - is simply a container for all files described in the next section - (except for the .del file).

    -

    Compound Entry Table (.cfe) --> Version, FileCount, <FileName, DataOffset, DataLength> - FileCount - -

    -

    Compound (.cfs) --> FileData FileCount - -

    -

    Version --> Int

    -

    FileCount --> VInt

    -

    DataOffset --> Long

    -

    DataLength --> Long

    -

    FileName --> String

    -

    FileData --> raw file data

    -

    The raw file data is the data from the individual files named above.

    -

    Starting with Lucene 2.3, doc store files (stored - field values and term vectors) can be shared in a - single set of files for more than one segment. When - compound file is enabled, these shared files will be - added into a single compound file (same format as - above) but with the extension .cfx. -

    -
    - - - -

    Per-Segment Files

    -
    -

    - The remaining files are all per-segment, and are - thus defined by suffix. -

    - -

    Fields

    -

    - -
    - -Field Info - -
    - -

    -

    - Field names are - stored in the field info file, with suffix .fnm. -

    -

    - FieldInfos - (.fnm) --> FNMVersion,FieldsCount, <FieldName, - FieldBits> - FieldsCount - -

    -

    - FNMVersion, FieldsCount --> VInt -

    -

    - FieldName --> String -

    -

    - FieldBits --> Byte -

    -

    - -

      - -
    • - The low-order bit is one for - indexed fields, and zero for non-indexed fields. -
    • - -
    • - The second lowest-order - bit is one for fields that have term vectors stored, and zero for fields - without term vectors. -
    • - -
    • If the fifth lowest-order bit is set (0x10), norms are omitted for the indexed field.
    • - -
    • If the sixth lowest-order bit is set (0x20), payloads are stored for the indexed field.
    • - -
    • If the seventh lowest-order bit is set (0x40), term frequencies and positions omitted for the indexed field.
    • - -
    • If the eighth lowest-order bit is set (0x80), positions are omitted for the indexed field.
    • - -
    - -

    -

    - FNMVersion (added in 2.9) is -2 for indexes from 2.9 - 3.3. It is -3 for indexes in Lucene 3.4+ -

    -

    - Fields are numbered by their order in this file. Thus field zero is - the - first field in the file, field one the next, and so on. Note that, - like document numbers, field numbers are segment relative. -

    -

    - -
    - -Stored Fields - -
    - -

    -

    - Stored fields are represented by two files: -

    -
      - -
    1. - - -

      - The field index, or .fdx file. -

      - - -

      - This contains, for each document, a pointer to - its field data, as follows: -

      - - -

      - FieldIndex - (.fdx) --> - <FieldValuesPosition> - SegSize - -

      - -

      FieldValuesPosition - --> Uint64 -

      - -

      This - is used to find the location within the field data file of the - fields of a particular document. Because it contains fixed-length - data, this file may be easily randomly accessed. The position of - document - n - 's - - field data is the Uint64 at - n*8 - in - this file. -

      - -
    2. - -
    3. - -

      - - The field data, or .fdt file. - -

      - - -

      - This contains the stored fields of each document, - as follows: -

      - - -

      - FieldData (.fdt) --> - <DocFieldData> - SegSize - -

      - -

      DocFieldData --> - FieldCount, <FieldNum, Bits, Value> - FieldCount - -

      - -

      FieldCount --> - VInt -

      - -

      FieldNum --> - VInt -

      - -

      Bits --> - Byte -

      - -

      - -

        - -
      • low order bit is one for tokenized fields
      • - -
      • second bit is one for fields containing binary data
      • - -
      • third bit is one for fields with compression option enabled - (if compression is enabled, the algorithm used is ZLIB), - only available for indexes until Lucene version 2.9.x
      • - -
      • 4th to 6th bit (mask: 0x7<<3) define the type of a - numeric field:
          - -
        • all bits in mask are cleared if no numeric field at all
        • - -
        • 1<<3: Value is Int
        • - -
        • 2<<3: Value is Long
        • - -
        • 3<<3: Value is Int as Float (as of Float.intBitsToFloat)
        • - -
        • 4<<3: Value is Long as Double (as of Double.longBitsToDouble)
        • - -
        -
      • - -
      - -

      - -

      Value --> - String | BinaryValue | Int | Long (depending on Bits) -

      - -

      BinaryValue --> - ValueSize, <Byte>^ValueSize -

      - -

      ValueSize --> - VInt -

      - - -
    4. - -
    - -

    Term Dictionary

    -

    - The term dictionary is represented as two files: -

    -
      - -
    1. - - -

      - The term infos, or tis file. -

      - - -

      - TermInfoFile (.tis)--> - TIVersion, TermCount, IndexInterval, SkipInterval, MaxSkipLevels, TermInfos -

      - -

      TIVersion --> - UInt32 -

      - -

      TermCount --> - UInt64 -

      - -

      IndexInterval --> - UInt32 -

      - -

      SkipInterval --> - UInt32 -

      - -

      MaxSkipLevels --> - UInt32 -

      - -

      TermInfos --> - <TermInfo> - TermCount - -

      - -

      TermInfo --> - <Term, DocFreq, FreqDelta, ProxDelta, SkipDelta> -

      - -

      Term --> - <PrefixLength, Suffix, FieldNum> -

      - -

      Suffix --> - String -

      - -

      PrefixLength, - DocFreq, FreqDelta, ProxDelta, SkipDelta -
      - --> VInt -

      - -

      - This file is sorted by Term. Terms are - ordered first lexicographically (by UTF16 - character code) by the term's field name, - and within that lexicographically (by - UTF16 character code) by the term's text. -

      - -

      TIVersion names the version of the format - of this file and is equal to TermInfosWriter.FORMAT_CURRENT. -

      - -

      Term - text prefixes are shared. The PrefixLength is the number of initial - characters from the previous term which must be pre-pended to a - term's suffix in order to form the term's text. Thus, if the - previous term's text was "bone" and the term is "boy", - the PrefixLength is two and the suffix is "y". -

      - -

      FieldNumber - determines the term's field, whose name is stored in the .fdt file. -

      - -

      DocFreq - is the count of documents which contain the term. -

      - -

      FreqDelta - determines the position of this term's TermFreqs within the .frq - file. In particular, it is the difference between the position of - this term's data in that file and the position of the previous - term's data (or zero, for the first term in the file). -

      - -

      ProxDelta - determines the position of this term's TermPositions within the .prx - file. In particular, it is the difference between the position of - this term's data in that file and the position of the previous - term's data (or zero, for the first term in the file. For fields - that omit position data, this will be 0 since - prox information is not stored. -

      - -

      SkipDelta determines the position of this - term's SkipData within the .frq file. In - particular, it is the number of bytes - after TermFreqs that the SkipData starts. - In other words, it is the length of the - TermFreq data. SkipDelta is only stored - if DocFreq is not smaller than SkipInterval. -

      - -
    2. - -
    3. - -

      - - The term info index, or .tii file. -

      - - -

      - This contains every IndexInterval - th - entry from the .tis - file, along with its location in the "tis" file. This is - designed to be read entirely into memory and used to provide random - access to the "tis" file. -

      - - -

      - The structure of this file is very similar to the - .tis file, with the addition of one item per record, the IndexDelta. -

      - - -

      - TermInfoIndex (.tii)--> - TIVersion, IndexTermCount, IndexInterval, SkipInterval, MaxSkipLevels, TermIndices -

      - -

      TIVersion --> - UInt32 -

      - -

      IndexTermCount --> - UInt64 -

      - -

      IndexInterval --> - UInt32 -

      - -

      SkipInterval --> - UInt32 -

      - -

      TermIndices --> - <TermInfo, IndexDelta> - IndexTermCount - -

      - -

      IndexDelta --> - VLong -

      - -

      IndexDelta - determines the position of this term's TermInfo within the .tis file. In - particular, it is the difference between the position of this term's - entry in that file and the position of the previous term's entry. -

      - -

      SkipInterval is the fraction of TermDocs stored in skip tables. It is used to accelerate TermDocs.skipTo(int). - Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while - smaller values result in bigger indexes, less acceleration (in case of a small value for MaxSkipLevels) and more - accelerable cases.

      - -

      MaxSkipLevels is the max. number of skip levels stored for each term in the .frq file. A low value results in - smaller indexes but less acceleration, a larger value results in slighly larger indexes but greater acceleration. - See format of .frq file for more information about skip levels.

      - -
    4. - -
    - -

    Frequencies

    -

    - The .frq file contains the lists of documents - which contain each term, along with the frequency of the term in that - document (except when frequencies are omitted: IndexOptions.DOCS_ONLY). -

    -

    FreqFile (.frq) --> - <TermFreqs, SkipData> - TermCount - -

    -

    TermFreqs --> - <TermFreq> - DocFreq - -

    -

    TermFreq --> - DocDelta[, Freq?] -

    -

    SkipData --> - <<SkipLevelLength, SkipLevel> - NumSkipLevels-1, SkipLevel> - <SkipDatum> -

    -

    SkipLevel --> - <SkipDatum> - DocFreq/(SkipInterval^(Level + 1)) - -

    -

    SkipDatum --> - DocSkip,PayloadLength?,FreqSkip,ProxSkip,SkipChildLevelPointer? -

    -

    DocDelta,Freq,DocSkip,PayloadLength,FreqSkip,ProxSkip --> - VInt -

    -

    SkipChildLevelPointer --> - VLong -

    -

    TermFreqs - are ordered by term (the term is implicit, from the .tis file). -

    -

    TermFreq - entries are ordered by increasing document number. -

    -

    DocDelta: if frequencies are indexed, this determines both - the document number and the frequency. In - particular, DocDelta/2 is the difference between - this document number and the previous document - number (or zero when this is the first document in - a TermFreqs). When DocDelta is odd, the frequency - is one. When DocDelta is even, the frequency is - read as another VInt. If frequencies are omitted, DocDelta - contains the gap (not multiplied by 2) between - document numbers and no frequency information is - stored. -

    -

    For example, the TermFreqs for a term which occurs - once in document seven and three times in document - eleven, with frequencies indexed, would be the following - sequence of VInts: -

    -

    15, 8, 3 -

    -

    If frequencies were omitted (IndexOptions.DOCS_ONLY) it would be this sequence - of VInts instead: -

    -

    - 7,4 -

    -

    DocSkip records the document number before every - SkipInterval - th - document in TermFreqs. - If payloads are disabled for the term's field, - then DocSkip represents the difference from the - previous value in the sequence. - If payloads are enabled for the term's field, - then DocSkip/2 represents the difference from the - previous value in the sequence. If payloads are enabled - and DocSkip is odd, - then PayloadLength is stored indicating the length - of the last payload before the SkipIntervalth - document in TermPositions. - FreqSkip and ProxSkip record the position of every - SkipInterval - th - entry in FreqFile and - ProxFile, respectively. File positions are - relative to the start of TermFreqs and Positions, - to the previous SkipDatum in the sequence. -

    -

    For example, if DocFreq=35 and SkipInterval=16, - then there are two SkipData entries, containing - the 15 - th - and 31 - st - document - numbers in TermFreqs. The first FreqSkip names - the number of bytes after the beginning of - TermFreqs that the 16 - th - SkipDatum - starts, and the second the number of bytes after - that that the 32 - nd - starts. The first - ProxSkip names the number of bytes after the - beginning of Positions that the 16 - th - SkipDatum starts, and the second the number of - bytes after that that the 32 - nd - starts. -

    -

    Each term can have multiple skip levels. - The amount of skip levels for a term is NumSkipLevels = Min(MaxSkipLevels, floor(log(DocFreq/log(SkipInterval)))). - The number of SkipData entries for a skip level is DocFreq/(SkipInterval^(Level + 1)), whereas the lowest skip - level is Level=0.
    - Example: SkipInterval = 4, MaxSkipLevels = 2, DocFreq = 35. Then skip level 0 has 8 SkipData entries, - containing the 3rd, 7th, 11th, 15th, 19th, 23rd, - 27th, and 31st document numbers in TermFreqs. Skip level 1 has 2 SkipData entries, containing the - 15th and 31st document numbers in TermFreqs.
    - The SkipData entries on all upper levels > 0 contain a SkipChildLevelPointer referencing the corresponding SkipData - entry in level-1. In the example has entry 15 on level 1 a pointer to entry 15 on level 0 and entry 31 on level 1 a pointer - to entry 31 on level 0. -

    - -

    Positions

    -

    - The .prx file contains the lists of positions that - each term occurs at within documents. Note that - fields omitting positional data do not store - anything into this file, and if all fields in the - index omit positional data then the .prx file will not - exist. -

    -

    ProxFile (.prx) --> - <TermPositions> - TermCount - -

    -

    TermPositions --> - <Positions> - DocFreq - -

    -

    Positions --> - <PositionDelta,Payload?> - Freq - -

    -

    Payload --> - <PayloadLength?,PayloadData> -

    -

    PositionDelta --> - VInt -

    -

    PayloadLength --> - VInt -

    -

    PayloadData --> - bytePayloadLength - -

    -

    TermPositions - are ordered by term (the term is implicit, from the .tis file). -

    -

    Positions - entries are ordered by increasing document number (the document - number is implicit from the .frq file). -

    -

    PositionDelta - is, if payloads are disabled for the term's field, the difference - between the position of the current occurrence in - the document and the previous occurrence (or zero, if this is the - first occurrence in this document). - If payloads are enabled for the term's field, then PositionDelta/2 - is the difference between the current and the previous position. If - payloads are enabled and PositionDelta is odd, then PayloadLength is - stored, indicating the length of the payload at the current term position. -

    -

    - For example, the TermPositions for a - term which occurs as the fourth term in one document, and as the - fifth and ninth term in a subsequent document, would be the following - sequence of VInts (payloads disabled): -

    -

    4, - 5, 4 -

    -

    PayloadData - is metadata associated with the current term position. If PayloadLength - is stored at the current position, then it indicates the length of this - Payload. If PayloadLength is not stored, then this Payload has the same - length as the Payload at the previous position. -

    - -

    Normalization Factors

    -

    There's a single .nrm file containing all norms: -

    -

    AllNorms - (.nrm) --> NormsHeader,<Norms> - NumFieldsWithNorms - -

    -

    Norms - --> <Byte> - SegSize - -

    -

    NormsHeader - --> 'N','R','M',Version -

    -

    Version - --> Byte -

    -

    NormsHeader - has 4 bytes, last of which is the format version for this file, currently -1. -

    -

    Each - byte encodes a floating point value. Bits 0-2 contain the 3-bit - mantissa, and bits 3-8 contain the 5-bit exponent. -

    -

    These - are converted to an IEEE single float value as follows: -

    -
      - -
    1. - -

      If - the byte is zero, use a zero float. -

      - -
    2. - -
    3. - -

      Otherwise, - set the sign bit of the float to zero; -

      - -
    4. - -
    5. - -

      add - 48 to the exponent and use this as the float's exponent; -

      - -
    6. - -
    7. - -

      map - the mantissa to the high-order 3 bits of the float's mantissa; and - -

      - -
    8. - -
    9. - -

      set - the low-order 21 bits of the float's mantissa to zero. -

      - -
    10. - -
    -

    A separate norm file is created when the norm values of an existing segment are modified. - When field N is modified, a separate norm file .sN - is created, to maintain the norm values for that field. -

    -

    Separate norm files are created (when adequate) for both compound and non compound segments. -

    - -

    Term Vectors

    -

    - Term Vector support is an optional on a field by - field basis. It consists of 3 files. -

    -
      - -
    1. - - -

      The Document Index or .tvx file.

      - -

      For each document, this stores the offset - into the document data (.tvd) and field - data (.tvf) files. -

      - -

      DocumentIndex (.tvx) --> TVXVersion<DocumentPosition,FieldPosition> - NumDocs - -

      - -

      TVXVersion --> Int (TermVectorsReader.CURRENT)

      - -

      DocumentPosition --> UInt64 (offset in - the .tvd file)

      - -

      FieldPosition --> UInt64 (offset in the - .tvf file)

      - -
    2. - -
    3. - - -

      The Document or .tvd file.

      - -

      This contains, for each document, the number of fields, a list of the fields with - term vector info and finally a list of pointers to the field information in the .tvf - (Term Vector Fields) file.

      - -

      - Document (.tvd) --> TVDVersion<NumFields, FieldNums, FieldPositions> - NumDocs - -

      - -

      TVDVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      - -

      NumFields --> VInt

      - -

      FieldNums --> <FieldNumDelta> - NumFields - -

      - -

      FieldNumDelta --> VInt

      - -

      FieldPositions --> <FieldPositionDelta> - NumFields-1 - -

      - -

      FieldPositionDelta --> VLong

      - -

      The .tvd file is used to map out the fields that have term vectors stored and - where the field information is in the .tvf file.

      - -
    4. - -
    5. - - -

      The Field or .tvf file.

      - -

      This file contains, for each field that has a term vector stored, a list of - the terms, their frequencies and, optionally, position and offest information.

      - -

      Field (.tvf) --> TVFVersion<NumTerms, Position/Offset, TermFreqs> - NumFields - -

      - -

      TVFVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      - -

      NumTerms --> VInt

      - -

      Position/Offset --> Byte

      - -

      TermFreqs --> <TermText, TermFreq, Positions?, Offsets?> - NumTerms - -

      - -

      TermText --> <PrefixLength, Suffix>

      - -

      PrefixLength --> VInt

      - -

      Suffix --> String

      - -

      TermFreq --> VInt

      - -

      Positions --> <VInt>TermFreq -

      - -

      Offsets --> <VInt, VInt>TermFreq -

      - -
      - -

      Notes:

      - -
        - -
      • Position/Offset byte stores whether this term vector has position or offset information stored.
      • - -
      • Term - text prefixes are shared. The PrefixLength is the number of initial - characters from the previous term which must be pre-pended to a - term's suffix in order to form the term's text. Thus, if the - previous term's text was "bone" and the term is "boy", - the PrefixLength is two and the suffix is "y". -
      • - -
      • Positions are stored as delta encoded VInts. This means we only store the difference of the current position from the last position
      • - -
      • Offsets are stored as delta encoded VInts. The first VInt is the startOffset, the second is the endOffset.
      • - -
      - - - -
    6. - -
    - -

    Deleted Documents

    -

    The .del file is - optional, and only exists when a segment contains deletions. -

    -

    Although per-segment, this file is maintained exterior to compound segment files. -

    -

    - Deletions - (.del) --> [Format],ByteCount,BitCount, Bits | DGaps (depending on Format) -

    -

    Format,ByteSize,BitCount --> - Uint32 -

    -

    Bits --> - <Byte> - ByteCount - -

    -

    DGaps --> - <DGap,NonzeroByte> - NonzeroBytesCount - -

    -

    DGap --> - VInt -

    -

    NonzeroByte --> - Byte -

    -

    Format - is Optional. -1 indicates DGaps. Non-negative value indicates Bits, and that Format is excluded. -

    -

    ByteCount - indicates the number of bytes in Bits. It is typically - (SegSize/8)+1. -

    -

    - BitCount - indicates the number of bits that are currently set in Bits. -

    -

    Bits - contains one bit for each document indexed. When the bit - corresponding to a document number is set, that document is marked as - deleted. Bit ordering is from least to most significant. Thus, if - Bits contains two bytes, 0x00 and 0x02, then document 9 is marked as - deleted. -

    -

    DGaps - represents sparse bit-vectors more efficiently than Bits. - It is made of DGaps on indexes of nonzero bytes in Bits, - and the nonzero bytes themselves. The number of nonzero bytes - in Bits (NonzeroBytesCount) is not stored. -

    -

    For example, - if there are 8000 bits and only bits 10,12,32 are set, - DGaps would be used: -

    -

    - (VInt) 1 , (byte) 20 , (VInt) 3 , (Byte) 1 -

    -
    - - - -

    Limitations

    -
    -

    - When referring to term numbers, Lucene's current - implementation uses a Java int to hold the - term index, which means the maximum number of unique - terms in any single index segment is ~2.1 billion times - the term index interval (default 128) = ~274 billion. - This is technically not a limitation of the index file - format, just of Lucene's current implementation. -

    -

    - Similarly, Lucene uses a Java int to refer - to document numbers, and the index file format uses an - Int32 on-disk to store document numbers. - This is a limitation of both the index file format and - the current implementation. Eventually these should be - replaced with either UInt64 values, or - better yet, VInt values which have no - limit. -

    -
    - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/.htaccess =================================================================== --- lucene/site/build/site/.htaccess (revision 1328746) +++ lucene/site/build/site/.htaccess (working copy) @@ -1,3 +0,0 @@ -#Forrest generates UTF-8 by default, but these httpd servers are -#ignoring the meta http-equiv charset tags -AddDefaultCharset off Index: lucene/site/build/site/broken-links.xml =================================================================== --- lucene/site/build/site/broken-links.xml (revision 1328746) +++ lucene/site/build/site/broken-links.xml (working copy) @@ -1,2 +0,0 @@ - - Index: lucene/site/build/site/contributions.html =================================================================== --- lucene/site/build/site/contributions.html (revision 1328746) +++ lucene/site/build/site/contributions.html (working copy) @@ -1,756 +0,0 @@ - - - - - - - - - Apache Lucene - Contributions - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Contributions -

    - - - -

    Overview

    -
    -

    This page lists external Lucene resources. If you have - written something that should be included, please post all - relevant information to one of the mailing lists. Nothing - listed here is directly supported by the Lucene - developers, so if you encounter any problems with any of - this software, please use the author's contact information - to get help.

    -

    If you are looking for information on contributing patches or other improvements to Lucene, see - How To Contribute on the Lucene Wiki.

    -
    - - - -

    Lucene Tools

    -
    -

    - Software that works with Lucene indices. -

    - -

    Luke

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.getopt.org/luke/ - -
    - author - - Andrzej Bialecki -
    - -

    LIMO (Lucene Index Monitor)

    - - - - - - - - - - - - - - - - -
    - URL - - - http://limo.sf.net/ - -
    - author - - Julien Nioche -
    -
    - - - -

    Lucene Document Converters

    -
    -

    - Lucene requires information you want to index to be - converted into a Document class. Here are - contributions for various solutions that convert different - content types to Lucene's Document classes. -

    - -

    XML Document #1

    - - - - - - - - - - - - - - - - -
    - URL - - - http://marc.theaimsgroup.com/?l=lucene-dev&m=100723333506246&w=2 - -
    - author - - Philip Ogren - ogren@mayo.edu -
    - -

    XML Document #2

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00346.html - -
    - author - - Peter Carlson - carlson@bookandhammer.com -
    - -

    PDF Box

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.pdfbox.org/ - -
    - author - - Ben Litchfield - ben@csh.rit.edu -
    - -

    XPDF - PDF Document Conversion

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.foolabs.com/xpdf - -
    - author - - N/A -
    - -

    PDFTextStream -- PDF text and metadata extraction

    - - - - - - - - - - - - - - - - -
    - URL - - - http://snowtide.com - -
    - author - - N/A -
    - -

    PJ Classic & PJ Professional - PDF Document Conversion

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.etymon.com/ - -
    - author - - N/A -
    -
    - - - -

    Miscellaneous

    -
    -

    - -

    - -

    Arabic Analyzer for Java

    - - - - - - - - - - - - - - - - -
    - URL - - - http://savannah.nongnu.org/projects/aramorph - -
    - author - - Pierrick Brihaye -
    - -

    Phonetix

    - - - - - - - - - - - - - - - - -
    - URL - - - http://www.companywebstore.de/tangentum/mirror/en/products/phonetix/index.html - -
    - author - - tangentum technologies -
    - -

    ejIndex - JBoss MBean for Lucene

    -

    - -

    - - - - - - - - - - - - - - - - -
    - URL - - - http://ejindex.sourceforge.net/ - -
    - author - - Andy Scholz -
    - -

    JavaCC

    - - - - - - - - - - - - - - - - -
    - URL - - - https://javacc.dev.java.net/ - -
    - author - - Sun Microsystems (java.net) -
    - -

    LuSQL - Index databases with Lucene

    - - - - - - - - - - - - - - - - -
    - URL - - - http://lab.cisti-icist.nrc-cnrc.gc.ca/cistilabswiki/index.php/LuSql - -
    - author - - Glen Newton -
    -
    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/demo.html =================================================================== --- lucene/site/build/site/demo.html (revision 1328746) +++ lucene/site/build/site/demo.html (working copy) @@ -1,372 +0,0 @@ - - - - - - - - - Apache Lucene - Building and Installing the Basic Demo - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Building and Installing the Basic Demo -

    - - - - -

    About this Document

    -
    -

    -This document is intended as a "getting started" guide to using and running the Lucene demos. -It walks you through some basic installation and configuration. -

    -
    - - - - -

    About the Demo

    -
    -

    -The Lucene command-line demo code consists of an application that demonstrates various -functionalities of Lucene and how you can add Lucene to your applications. -

    -
    - - - -

    Setting your CLASSPATH

    -
    -

    -First, you should download the -latest Lucene distribution and then extract it to a working directory. -

    -

    -You need three JARs: the Lucene JAR, the common analysis JAR, and the Lucene demo JAR. You should -see the Lucene JAR file in the core/ directory you created when you extracted the archive -- it -should be named something like lucene-core-{version}.jar. You should also see files -called lucene-analyzers-common-{version}.jar and lucene-demo-{version}.jar -under analysis/common/ and demo/, respectively. -

    -

    -Put all three of these files in your Java CLASSPATH. -

    -
    - - - -

    Indexing Files

    -
    -

    -Once you've gotten this far you're probably itching to go. Let's build an index! Assuming -you've set your CLASSPATH correctly, just type: - -

    -    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
    -
    - -This will produce a subdirectory called index which will contain an index of all of the -Lucene source code. -

    -

    -To search the index type: - -

    -    java org.apache.lucene.demo.SearchFiles
    -
    - -You'll be prompted for a query. Type in a swear word and press the enter key. You'll see that the -Lucene developers are very well mannered and get no results. Now try entering the word "string". -That should return a whole bunch of documents. The results will page at every tenth result and ask -you whether you want more results. -

    -
    - - - -

    About the code...

    -
    -

    - -read on>>> - -

    -
    - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/demo2.html =================================================================== --- lucene/site/build/site/demo2.html (revision 1328746) +++ lucene/site/build/site/demo2.html (working copy) @@ -1,421 +0,0 @@ - - - - - - - - - Apache Lucene - Basic Demo Sources Walk-through - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Basic Demo Sources Walk-through -

    - - - - -

    About the Code

    -
    -

    -In this section we walk through the sources behind the command-line Lucene demo: where to find them, -their parts and their function. This section is intended for Java developers wishing to understand -how to use Lucene in their applications. -

    -
    - - - - -

    Location of the source

    -
    -

    -NOTE: to examine the sources, you need to download and extract a source checkout of -Lucene: (lucene-{version}-src.zip). -

    -

    -Relative to the directory created when you extracted Lucene, you -should see a directory called lucene/demo/. This is the root for the Lucene -demo. Under this directory is src/java/org/apache/lucene/demo/. This is where all -the Java sources for the demo live. -

    -

    -Within this directory you should see the IndexFiles.java class we executed earlier. -Bring it up in vi or your editor of choice and let's take a look at it. -

    -
    - - - -

    IndexFiles

    -
    -

    -As we discussed in the previous walk-through, the IndexFiles class creates a Lucene -Index. Let's take a look at how it does this. -

    -

    -The main() method parses the command-line parameters, then in preparation for -instantiating IndexWriter, opens a -Directory and instantiates -StandardAnalyzer and -IndexWriterConfig. -

    -

    -The value of the -index command-line parameter is the name of the filesystem directory -where all index information should be stored. If IndexFiles is invoked with a -relative path given in the -index command-line parameter, or if the -index -command-line parameter is not given, causing the default relative index path "index" -to be used, the index path will be created as a subdirectory of the current working directory -(if it does not already exist). On some platforms, the index path may be created in a different -directory (such as the user's home directory). -

    -

    -The -docs command-line parameter value is the location of the directory containing -files to be indexed. -

    -

    -The -update command-line parameter tells IndexFiles not to delete the -index if it already exists. When -update is not given, IndexFiles will -first wipe the slate clean before indexing any documents. -

    -

    -Lucene Directorys are used by the -IndexWriter to store information in the index. In addition to the -FSDirectory implementation we are using, -there are several other Directory subclasses that can write to RAM, to databases, etc. -

    -

    -Lucene Analyzers are processing pipelines -that break up text into indexed tokens, a.k.a. terms, and optionally perform other operations on these -tokens, e.g. downcasing, synonym insertion, filtering out unwanted tokens, etc. The Analyzer -we are using is StandardAnalyzer, which creates tokens using the Word Break rules from the -Unicode Text Segmentation algorithm specified in Unicode -Standard Annex #29; converts tokens to lowercase; and then filters out stopwords. Stopwords are -common language words such as articles (a, an, the, etc.) and other tokens that may have less value for -searching. It should be noted that there are different rules for every language, and you should use the -proper analyzer for each. Lucene currently provides Analyzers for a number of different languages (see -the javadocs under -lucene/analysis/common/src/java/org/apache/lucene/analysis). -

    -

    -The IndexWriterConfig instance holds all configuration for IndexWriter. For -example, we set the OpenMode to use here based on the value of the -update -command-line parameter. -

    -

    -Looking further down in the file, after IndexWriter is instantiated, you should see the -indexDocs() code. This recursive function crawls the directories and creates -Document objects. The -Document is simply a data object to represent the text content from the file as well as -its creation time and location. These instances are added to the IndexWriter. If -the -update command-line parameter is given, the IndexWriter -OpenMode will be set to OpenMode.CREATE_OR_APPEND, and rather than -adding documents to the index, the IndexWriter will update them -in the index by attempting to find an already-indexed document with the same identifier (in our -case, the file path serves as the identifier); deleting it from the index if it exists; and then -adding the new document to the index. -

    -
    - - - -

    Searching Files

    -
    -

    -The SearchFiles class is -quite simple. It primarily collaborates with an -IndexSearcher, -StandardAnalyzer (which is used in the -IndexFiles class as well) -and a QueryParser. The -query parser is constructed with an analyzer used to interpret your query text in the same way the -documents are interpreted: finding word boundaries, downcasing, and removing useless words like -'a', 'an' and 'the'. The Query -object contains the results from the -QueryParser which is passed -to the searcher. Note that it's also possible to programmatically construct a rich -Query object without using the query -parser. The query parser just enables decoding the Lucene query -syntax into the corresponding Query -object. -

    -

    - -SearchFiles uses the IndexSearcher.search(query,n) method that returns -TopDocs with max n hits. -The results are printed in pages, sorted by score (i.e. relevance). -

    -
    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/fileformats.html =================================================================== --- lucene/site/build/site/fileformats.html (revision 1328746) +++ lucene/site/build/site/fileformats.html (working copy) @@ -1,2648 +0,0 @@ - - - - - - - - - Apache Lucene - Index File Formats - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Index File Formats -

    - - - -

    Index File Formats

    -
    -

    - This document defines the index file formats used - in this version of Lucene. If you are using a different - version of Lucene, please consult the copy of - docs/fileformats.html - that was distributed - with the version you are using. -

    -

    - Apache Lucene is written in Java, but several - efforts are underway to write - versions - of Lucene in other programming - languages. If these versions are to remain compatible with Apache - Lucene, then a language-independent definition of the Lucene index - format is required. This document thus attempts to provide a - complete and independent definition of the Apache Lucene file - formats. -

    -

    - As Lucene evolves, this document should evolve. - Versions of Lucene in different programming languages should endeavor - to agree on file formats, and generate new versions of this document. -

    -

    - Compatibility notes are provided in this document, - describing how file formats have changed from prior versions. -

    -

    - In version 2.1, the file format was changed to allow - lock-less commits (ie, no more commit lock). The - change is fully backwards compatible: you can open a - pre-2.1 index for searching or adding/deleting of - docs. When the new segments file is saved - (committed), it will be written in the new file format - (meaning no specific "upgrade" process is needed). - But note that once a commit has occurred, pre-2.1 - Lucene will not be able to read the index. -

    -

    - In version 2.3, the file format was changed to allow - segments to share a single set of doc store (vectors & - stored fields) files. This allows for faster indexing - in certain cases. The change is fully backwards - compatible (in the same way as the lock-less commits - change in 2.1). -

    -

    - In version 2.4, Strings are now written as true UTF-8 - byte sequence, not Java's modified UTF-8. See issue - LUCENE-510 for details. -

    -

    - In version 2.9, an optional opaque Map<String,String> - CommitUserData may be passed to IndexWriter's commit - methods (and later retrieved), which is recorded in - the segments_N file. See issue LUCENE-1382 for - details. Also, diagnostics were added to each segment - written recording details about why it was written - (due to flush, merge; which OS/JRE was used; etc.). - See issue LUCENE-1654 for details. -

    -

    - In version 3.0, compressed fields are no longer - written to the index (they can still be read, but on - merge the new segment will write them, - uncompressed). See issue LUCENE-1960 for details. -

    -

    - In version 3.1, segments records the code version - that created them. See LUCENE-2720 for details. - - Additionally segments track explicitly whether or - not they have term vectors. See LUCENE-2811 for details. -

    -

    - In version 3.2, numeric fields are written as natively - to stored fields file, previously they were stored in - text format only. -

    -

    - In version 3.4, fields can omit position data while - still indexing term frequencies. -

    -
    - - - -

    Definitions

    -
    -

    - The fundamental concepts in Lucene are index, - document, field and term. -

    -

    - An index contains a sequence of documents. -

    -
      - -
    • - -

      - A document is a sequence of fields. -

      - -
    • - - -
    • - -

      - A field is a named sequence of terms. -

      - -
    • - - -
    • - A term is a string. -
    • - -
    -

    - The same string in two different fields is - considered a different term. Thus terms are represented as a pair of - strings, the first naming the field, and the second naming text - within the field. -

    - -

    Inverted Indexing

    -

    - The index stores statistics about terms in order - to make term-based search more efficient. Lucene's - index falls into the family of indexes known as an inverted - index. This is because it can list, for a term, the documents that contain - it. This is the inverse of the natural relationship, in which - documents list terms. -

    - -

    Types of Fields

    -

    - In Lucene, fields may be stored, in which - case their text is stored in the index literally, in a non-inverted - manner. Fields that are inverted are called indexed. A field - may be both stored and indexed.

    -

    The text of a field may be tokenized into terms to be - indexed, or the text of a field may be used literally as a term to be indexed. - Most fields are - tokenized, but sometimes it is useful for certain identifier fields - to be indexed literally. -

    -

    See the Field java docs for more information on Fields.

    - -

    Segments

    -

    - Lucene indexes may be composed of multiple sub-indexes, or - segments. Each segment is a fully independent index, which could be searched - separately. Indexes evolve by: -

    -
      - -
    1. - -

      Creating new segments for newly added documents.

      - -
    2. - -
    3. - -

      Merging existing segments.

      - -
    4. - -
    -

    - Searches may involve multiple segments and/or multiple indexes, each - index potentially composed of a set of segments. -

    - -

    Document Numbers

    -

    - Internally, Lucene refers to documents by an integer document - number. The first document added to an index is numbered zero, and each - subsequent document added gets a number one greater than the previous. -

    -

    - -
    - -

    -

    - Note that a document's number may change, so caution should be taken - when storing these numbers outside of Lucene. In particular, numbers may - change in the following situations: -

    -
      - -
    • - -

      - The - numbers stored in each segment are unique only within the segment, - and must be converted before they can be used in a larger context. - The standard technique is to allocate each segment a range of - values, based on the range of numbers used in that segment. To - convert a document number from a segment to an external value, the - segment's base document - number is added. To convert an external value back to a - segment-specific value, the segment is identified by the range that - the external value is in, and the segment's base value is - subtracted. For example two five document segments might be - combined, so that the first segment has a base value of zero, and - the second of five. Document three from the second segment would - have an external value of eight. -

      - -
    • - -
    • - -

      - When documents are deleted, gaps are created - in the numbering. These are eventually removed as the index evolves - through merging. Deleted documents are dropped when segments are - merged. A freshly-merged segment thus has no gaps in its numbering. -

      - -
    • - -
    -
    - - - -

    Overview

    -
    -

    - Each segment index maintains the following: -

    -
      - -
    • - -

      Field names. This - contains the set of field names used in the index. - -

      - -
    • - -
    • - -

      Stored Field - values. This contains, for each document, a list of attribute-value - pairs, where the attributes are field names. These are used to - store auxiliary information about the document, such as its title, - url, or an identifier to access a - database. The set of stored fields are what is returned for each hit - when searching. This is keyed by document number. -

      - -
    • - -
    • - -

      Term dictionary. - A dictionary containing all of the terms used in all of the indexed - fields of all of the documents. The dictionary also contains the - number of documents which contain the term, and pointers to the - term's frequency and proximity data. -

      - -
    • - - -
    • - -

      Term Frequency - data. For each term in the dictionary, the numbers of all the - documents that contain that term, and the frequency of the term in - that document, unless frequencies are omitted (IndexOptions.DOCS_ONLY) -

      - -
    • - - -
    • - -

      Term Proximity - data. For each term in the dictionary, the positions that the term - occurs in each document. Note that this will - not exist if all fields in all documents omit position data. -

      - -
    • - - -
    • - -

      Normalization - factors. For each field in each document, a value is stored that is - multiplied into the score for hits on that field. -

      - -
    • - -
    • - -

      Term Vectors. For each field in each document, the term vector - (sometimes called document vector) may be stored. A term vector consists - of term text and term frequency. To add Term Vectors to your index see the - Field - constructors -

      - -
    • - -
    • - -

      Deleted documents. - An optional file indicating which documents are deleted. -

      - -
    • - -
    -

    Details on each of these are provided in subsequent sections. -

    -
    - - - -

    File Naming

    -
    -

    - All files belonging to a segment have the same name with varying - extensions. The extensions correspond to the different file formats - described below. When using the Compound File format (default in 1.4 and greater) these files are - collapsed into a single .cfs file (see below for details) -

    -

    - Typically, all segments - in an index are stored in a single directory, although this is not - required. -

    -

    - As of version 2.1 (lock-less commits), file names are - never re-used (there is one exception, "segments.gen", - see below). That is, when any file is saved to the - Directory it is given a never before used filename. - This is achieved using a simple generations approach. - For example, the first segments file is segments_1, - then segments_2, etc. The generation is a sequential - long integer represented in alpha-numeric (base 36) - form. -

    -
    - - -

    Summary of File Extensions

    -
    -

    The following table summarizes the names and extensions of the files in Lucene: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameExtensionBrief Description
    Segments Filesegments.gen, segments_NStores information about segments
    Lock Filewrite.lockThe Write lock prevents multiple IndexWriters from writing to the same file.
    Compound File.cfsAn optional "virtual" file consisting of all the other index files for systems - that frequently run out of file handles.
    Compound File Entry table.cfeThe "virtual" compound file's entry table holding all entries in the corresponding .cfs file (Since 3.4)
    Fields.fnmStores information about the fields
    Field Index.fdxContains pointers to field data
    Field Data.fdtThe stored fields for documents
    Term Infos.tisPart of the term dictionary, stores term info
    Term Info Index.tiiThe index into the Term Infos file
    Frequencies.frqContains the list of docs which contain each term along with frequency
    Positions.prxStores position information about where a term occurs in the index
    Norms.nrmEncodes length and boost factors for docs and fields
    Term Vector Index.tvxStores offset into the document data file
    Term Vector Documents.tvdContains information about each document that has term vectors
    Term Vector Fields.tvfThe field level info about term vectors
    Deleted Documents.delInfo about what files are deleted
    - - -

    -
    - - - -

    Primitive Types

    -
    - -

    Byte

    -

    - The most primitive type - is an eight-bit byte. Files are accessed as sequences of bytes. All - other data types are defined as sequences - of bytes, so file formats are byte-order independent. -

    - -

    UInt32

    -

    - 32-bit unsigned integers are written as four - bytes, high-order bytes first. -

    -

    - UInt32 --> <Byte>4 - -

    - -

    Uint64

    -

    - 64-bit unsigned integers are written as eight - bytes, high-order bytes first. -

    -

    UInt64 --> <Byte>8 - -

    - -

    VInt

    -

    - A variable-length format for positive integers is - defined where the high-order bit of each byte indicates whether more - bytes remain to be read. The low-order seven bits are appended as - increasingly more significant bits in the resulting integer value. - Thus values from zero to 127 may be stored in a single byte, values - from 128 to 16,383 may be stored in two bytes, and so on. -

    -

    - -VInt Encoding Example - -

    - - -- -- -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -

    - -Value - -

    - -
    - -

    - -First byte - -

    - -
    - -

    - -Second byte - -

    - -
    - -

    - -Third byte - -

    - -
    - -

    0 -

    - -
    - -

    - 00000000 -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    1 -

    - -
    - -

    - 00000001 -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    2 -

    - -
    - -

    - 00000010 -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    ... -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    127 -

    - -
    - -

    - 01111111 -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    128 -

    - -
    - -

    - 10000000 -

    - -
    - -

    - 00000001 -

    - -
    - -

    - -
    - - -

    - -
    - -

    129 -

    - -
    - -

    - 10000001 -

    - -
    - -

    - 00000001 -

    - -
    - -

    - -
    - - -

    - -
    - -

    130 -

    - -
    - -

    - 10000010 -

    - -
    - -

    - 00000001 -

    - -
    - -

    - -
    - - -

    - -
    - -

    ... -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    16,383 -

    - -
    - -

    - 11111111 -

    - -
    - -

    - 01111111 -

    - -
    - -

    - -
    - - -

    - -
    - -

    16,384 -

    - -
    - -

    - 10000000 -

    - -
    - -

    - 10000000 -

    - -
    - -

    - 00000001 -

    - -
    - -

    16,385 -

    - -
    - -

    - 10000001 -

    - -
    - -

    - 10000000 -

    - -
    - -

    - 00000001 -

    - -
    - -

    ... -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    - -

    - -
    - - -

    - -
    -

    - This provides compression while still being - efficient to decode. -

    - -

    Chars

    -

    - Lucene writes unicode - character sequences as UTF-8 encoded bytes. -

    - -

    String

    -

    - Lucene writes strings as UTF-8 encoded bytes. - First the length, in bytes, is written as a VInt, - followed by the bytes. -

    -

    - String --> VInt, Chars -

    -
    - - - -

    Compound Types

    -
    - -

    Map<String,String>

    -

    - In a couple places Lucene stores a Map - String->String. -

    -

    - Map<String,String> --> Count<String,String>Count - -

    -
    - - - -

    Per-Index Files

    -
    -

    - The files in this section exist one-per-index. -

    - -

    Segments File

    -

    - The active segments in the index are stored in the - segment info file, - segments_N. - There may - be one or more - segments_N - files in the - index; however, the one with the largest - generation is the active one (when older - segments_N files are present it's because they - temporarily cannot be deleted, or, a writer is in - the process of committing, or a custom - IndexDeletionPolicy - is in use). This file lists each - segment by name, has details about the separate - norms and deletion files, and also contains the - size of each segment. -

    -

    - As of 2.1, there is also a file - segments.gen. - This file contains the - current generation (the - _N - in - segments_N) - of the index. This is - used only as a fallback in case the current - generation cannot be accurately determined by - directory listing alone (as is the case for some - NFS clients with time-based directory cache - expiraation). This file simply contains an Int32 - version header (SegmentInfos.FORMAT_LOCKLESS = - -2), followed by the generation recorded as Int64, - written twice. -

    -

    - -3.1 - Segments --> Format, Version, NameCounter, SegCount, <SegVersion, SegName, SegSize, DelGen, DocStoreOffset, [DocStoreSegment, DocStoreIsCompoundFile], HasSingleNormFile, NumField, - NormGenNumField, - IsCompoundFile, DeletionCount, HasProx, Diagnostics, HasVectors>SegCount, CommitUserData, Checksum -

    -

    - Format, NameCounter, SegCount, SegSize, NumField, - DocStoreOffset, DeletionCount --> Int32 -

    -

    - Version, DelGen, NormGen, Checksum --> Int64 -

    -

    - SegVersion, SegName, DocStoreSegment --> String -

    -

    - Diagnostics --> Map<String,String> -

    -

    - IsCompoundFile, HasSingleNormFile, - DocStoreIsCompoundFile, HasProx, HasVectors --> Int8 -

    -

    - CommitUserData --> Map<String,String> -

    -

    - Format is -9 (SegmentInfos.FORMAT_DIAGNOSTICS). -

    -

    - Version counts how often the index has been - changed by adding or deleting documents. -

    -

    - NameCounter is used to generate names for new segment files. -

    -

    - SegVersion is the code version that created the segment. -

    -

    - SegName is the name of the segment, and is used as the file name prefix - for all of the files that compose the segment's index. -

    -

    - SegSize is the number of documents contained in the segment index. -

    -

    - DelGen is the generation count of the separate - deletes file. If this is -1, there are no - separate deletes. If it is 0, this is a pre-2.1 - segment and you must check filesystem for the - existence of _X.del. Anything above zero means - there are separate deletes (_X_N.del). -

    -

    - NumField is the size of the array for NormGen, or - -1 if there are no NormGens stored. -

    -

    - NormGen records the generation of the separate - norms files. If NumField is -1, there are no - normGens stored and they are all assumed to be 0 - when the segment file was written pre-2.1 and all - assumed to be -1 when the segments file is 2.1 or - above. The generation then has the same meaning - as delGen (above). -

    -

    - IsCompoundFile records whether the segment is - written as a compound file or not. If this is -1, - the segment is not a compound file. If it is 1, - the segment is a compound file. Else it is 0, - which means we check filesystem to see if _X.cfs - exists. -

    -

    - If HasSingleNormFile is 1, then the field norms are - written as a single joined file (with extension - .nrm); if it is 0 then each field's norms - are stored as separate .fN files. See - "Normalization Factors" below for details. -

    -

    - DocStoreOffset, DocStoreSegment, - DocStoreIsCompoundFile: If DocStoreOffset is -1, - this segment has its own doc store (stored fields - values and term vectors) files and DocStoreSegment - and DocStoreIsCompoundFile are not stored. In - this case all files for stored field values - (*.fdt and *.fdx) and term - vectors (*.tvf, *.tvd and - *.tvx) will be stored with this segment. - Otherwise, DocStoreSegment is the name of the - segment that has the shared doc store files; - DocStoreIsCompoundFile is 1 if that segment is - stored in compound file format (as a .cfx - file); and DocStoreOffset is the starting document - in the shared doc store files where this segment's - documents begin. In this case, this segment does - not store its own doc store files but instead - shares a single set of these files with other - segments. -

    -

    - Checksum contains the CRC32 checksum of all bytes - in the segments_N file up until the checksum. - This is used to verify integrity of the file on - opening the index. -

    -

    - DeletionCount records the number of deleted - documents in this segment. -

    -

    - HasProx is 1 if any fields in this segment have - position data (IndexOptions.DOCS_AND_FREQS_AND_POSITIONS); else, it's 0. -

    -

    - CommitUserData stores an optional user-supplied - opaque Map<String,String> that was passed to - IndexWriter's commit or prepareCommit, or - IndexReader's flush methods. -

    -

    - The Diagnostics Map is privately written by - IndexWriter, as a debugging aid, for each segment - it creates. It includes metadata like the current - Lucene version, OS, Java version, why the segment - was created (merge, flush, addIndexes), etc. -

    -

    HasVectors is 1 if this segment stores term vectors, - else it's 0. -

    - -

    Lock File

    -

    - The write lock, which is stored in the index - directory by default, is named "write.lock". If - the lock directory is different from the index - directory then the write lock will be named - "XXXX-write.lock" where XXXX is a unique prefix - derived from the full path to the index directory. - When this file is present, a writer is currently - modifying the index (adding or removing - documents). This lock file ensures that only one - writer is modifying the index at a time. -

    - -

    Deletable File

    -

    - A writer dynamically computes - the files that are deletable, instead, so no file - is written. -

    - -

    Compound Files

    -

    Starting with Lucene 1.4 the compound file format became default. This - is simply a container for all files described in the next section - (except for the .del file).

    -

    Compound Entry Table (.cfe) --> Version, FileCount, <FileName, DataOffset, DataLength> - FileCount - -

    -

    Compound (.cfs) --> FileData FileCount - -

    -

    Version --> Int

    -

    FileCount --> VInt

    -

    DataOffset --> Long

    -

    DataLength --> Long

    -

    FileName --> String

    -

    FileData --> raw file data

    -

    The raw file data is the data from the individual files named above.

    -

    Starting with Lucene 2.3, doc store files (stored - field values and term vectors) can be shared in a - single set of files for more than one segment. When - compound file is enabled, these shared files will be - added into a single compound file (same format as - above) but with the extension .cfx. -

    -
    - - - -

    Per-Segment Files

    -
    -

    - The remaining files are all per-segment, and are - thus defined by suffix. -

    - -

    Fields

    -

    - -
    - -Field Info - -
    - -

    -

    - Field names are - stored in the field info file, with suffix .fnm. -

    -

    - FieldInfos - (.fnm) --> FNMVersion,FieldsCount, <FieldName, - FieldBits> - FieldsCount - -

    -

    - FNMVersion, FieldsCount --> VInt -

    -

    - FieldName --> String -

    -

    - FieldBits --> Byte -

    -

    - -

      - -
    • - The low-order bit is one for - indexed fields, and zero for non-indexed fields. -
    • - -
    • - The second lowest-order - bit is one for fields that have term vectors stored, and zero for fields - without term vectors. -
    • - -
    • If the fifth lowest-order bit is set (0x10), norms are omitted for the indexed field.
    • - -
    • If the sixth lowest-order bit is set (0x20), payloads are stored for the indexed field.
    • - -
    • If the seventh lowest-order bit is set (0x40), term frequencies and positions omitted for the indexed field.
    • - -
    • If the eighth lowest-order bit is set (0x80), positions are omitted for the indexed field.
    • - -
    - -

    -

    - FNMVersion (added in 2.9) is -2 for indexes from 2.9 - 3.3. It is -3 for indexes in Lucene 3.4+ -

    -

    - Fields are numbered by their order in this file. Thus field zero is - the - first field in the file, field one the next, and so on. Note that, - like document numbers, field numbers are segment relative. -

    -

    - -
    - -Stored Fields - -
    - -

    -

    - Stored fields are represented by two files: -

    -
      - -
    1. - - -

      - The field index, or .fdx file. -

      - - -

      - This contains, for each document, a pointer to - its field data, as follows: -

      - - -

      - FieldIndex - (.fdx) --> - <FieldValuesPosition> - SegSize - -

      - -

      FieldValuesPosition - --> Uint64 -

      - -

      This - is used to find the location within the field data file of the - fields of a particular document. Because it contains fixed-length - data, this file may be easily randomly accessed. The position of - document - n - 's - - field data is the Uint64 at - n*8 - in - this file. -

      - -
    2. - -
    3. - -

      - - The field data, or .fdt file. - -

      - - -

      - This contains the stored fields of each document, - as follows: -

      - - -

      - FieldData (.fdt) --> - <DocFieldData> - SegSize - -

      - -

      DocFieldData --> - FieldCount, <FieldNum, Bits, Value> - FieldCount - -

      - -

      FieldCount --> - VInt -

      - -

      FieldNum --> - VInt -

      - -

      Bits --> - Byte -

      - -

      - -

        - -
      • low order bit is one for tokenized fields
      • - -
      • second bit is one for fields containing binary data
      • - -
      • third bit is one for fields with compression option enabled - (if compression is enabled, the algorithm used is ZLIB), - only available for indexes until Lucene version 2.9.x
      • - -
      • 4th to 6th bit (mask: 0x7<<3) define the type of a - numeric field:
          - -
        • all bits in mask are cleared if no numeric field at all
        • - -
        • 1<<3: Value is Int
        • - -
        • 2<<3: Value is Long
        • - -
        • 3<<3: Value is Int as Float (as of Float.intBitsToFloat)
        • - -
        • 4<<3: Value is Long as Double (as of Double.longBitsToDouble)
        • - -
        -
      • - -
      - -

      - -

      Value --> - String | BinaryValue | Int | Long (depending on Bits) -

      - -

      BinaryValue --> - ValueSize, <Byte>^ValueSize -

      - -

      ValueSize --> - VInt -

      - - -
    4. - -
    - -

    Term Dictionary

    -

    - The term dictionary is represented as two files: -

    -
      - -
    1. - - -

      - The term infos, or tis file. -

      - - -

      - TermInfoFile (.tis)--> - TIVersion, TermCount, IndexInterval, SkipInterval, MaxSkipLevels, TermInfos -

      - -

      TIVersion --> - UInt32 -

      - -

      TermCount --> - UInt64 -

      - -

      IndexInterval --> - UInt32 -

      - -

      SkipInterval --> - UInt32 -

      - -

      MaxSkipLevels --> - UInt32 -

      - -

      TermInfos --> - <TermInfo> - TermCount - -

      - -

      TermInfo --> - <Term, DocFreq, FreqDelta, ProxDelta, SkipDelta> -

      - -

      Term --> - <PrefixLength, Suffix, FieldNum> -

      - -

      Suffix --> - String -

      - -

      PrefixLength, - DocFreq, FreqDelta, ProxDelta, SkipDelta -
      - --> VInt -

      - -

      - This file is sorted by Term. Terms are - ordered first lexicographically (by UTF16 - character code) by the term's field name, - and within that lexicographically (by - UTF16 character code) by the term's text. -

      - -

      TIVersion names the version of the format - of this file and is equal to TermInfosWriter.FORMAT_CURRENT. -

      - -

      Term - text prefixes are shared. The PrefixLength is the number of initial - characters from the previous term which must be pre-pended to a - term's suffix in order to form the term's text. Thus, if the - previous term's text was "bone" and the term is "boy", - the PrefixLength is two and the suffix is "y". -

      - -

      FieldNumber - determines the term's field, whose name is stored in the .fdt file. -

      - -

      DocFreq - is the count of documents which contain the term. -

      - -

      FreqDelta - determines the position of this term's TermFreqs within the .frq - file. In particular, it is the difference between the position of - this term's data in that file and the position of the previous - term's data (or zero, for the first term in the file). -

      - -

      ProxDelta - determines the position of this term's TermPositions within the .prx - file. In particular, it is the difference between the position of - this term's data in that file and the position of the previous - term's data (or zero, for the first term in the file. For fields - that omit position data, this will be 0 since - prox information is not stored. -

      - -

      SkipDelta determines the position of this - term's SkipData within the .frq file. In - particular, it is the number of bytes - after TermFreqs that the SkipData starts. - In other words, it is the length of the - TermFreq data. SkipDelta is only stored - if DocFreq is not smaller than SkipInterval. -

      - -
    2. - -
    3. - -

      - - The term info index, or .tii file. -

      - - -

      - This contains every IndexInterval - th - entry from the .tis - file, along with its location in the "tis" file. This is - designed to be read entirely into memory and used to provide random - access to the "tis" file. -

      - - -

      - The structure of this file is very similar to the - .tis file, with the addition of one item per record, the IndexDelta. -

      - - -

      - TermInfoIndex (.tii)--> - TIVersion, IndexTermCount, IndexInterval, SkipInterval, MaxSkipLevels, TermIndices -

      - -

      TIVersion --> - UInt32 -

      - -

      IndexTermCount --> - UInt64 -

      - -

      IndexInterval --> - UInt32 -

      - -

      SkipInterval --> - UInt32 -

      - -

      TermIndices --> - <TermInfo, IndexDelta> - IndexTermCount - -

      - -

      IndexDelta --> - VLong -

      - -

      IndexDelta - determines the position of this term's TermInfo within the .tis file. In - particular, it is the difference between the position of this term's - entry in that file and the position of the previous term's entry. -

      - -

      SkipInterval is the fraction of TermDocs stored in skip tables. It is used to accelerate TermDocs.skipTo(int). - Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while - smaller values result in bigger indexes, less acceleration (in case of a small value for MaxSkipLevels) and more - accelerable cases.

      - -

      MaxSkipLevels is the max. number of skip levels stored for each term in the .frq file. A low value results in - smaller indexes but less acceleration, a larger value results in slighly larger indexes but greater acceleration. - See format of .frq file for more information about skip levels.

      - -
    4. - -
    - -

    Frequencies

    -

    - The .frq file contains the lists of documents - which contain each term, along with the frequency of the term in that - document (except when frequencies are omitted: IndexOptions.DOCS_ONLY). -

    -

    FreqFile (.frq) --> - <TermFreqs, SkipData> - TermCount - -

    -

    TermFreqs --> - <TermFreq> - DocFreq - -

    -

    TermFreq --> - DocDelta[, Freq?] -

    -

    SkipData --> - <<SkipLevelLength, SkipLevel> - NumSkipLevels-1, SkipLevel> - <SkipDatum> -

    -

    SkipLevel --> - <SkipDatum> - DocFreq/(SkipInterval^(Level + 1)) - -

    -

    SkipDatum --> - DocSkip,PayloadLength?,FreqSkip,ProxSkip,SkipChildLevelPointer? -

    -

    DocDelta,Freq,DocSkip,PayloadLength,FreqSkip,ProxSkip --> - VInt -

    -

    SkipChildLevelPointer --> - VLong -

    -

    TermFreqs - are ordered by term (the term is implicit, from the .tis file). -

    -

    TermFreq - entries are ordered by increasing document number. -

    -

    DocDelta: if frequencies are indexed, this determines both - the document number and the frequency. In - particular, DocDelta/2 is the difference between - this document number and the previous document - number (or zero when this is the first document in - a TermFreqs). When DocDelta is odd, the frequency - is one. When DocDelta is even, the frequency is - read as another VInt. If frequencies are omitted, DocDelta - contains the gap (not multiplied by 2) between - document numbers and no frequency information is - stored. -

    -

    For example, the TermFreqs for a term which occurs - once in document seven and three times in document - eleven, with frequencies indexed, would be the following - sequence of VInts: -

    -

    15, 8, 3 -

    -

    If frequencies were omitted (IndexOptions.DOCS_ONLY) it would be this sequence - of VInts instead: -

    -

    - 7,4 -

    -

    DocSkip records the document number before every - SkipInterval - th - document in TermFreqs. - If payloads are disabled for the term's field, - then DocSkip represents the difference from the - previous value in the sequence. - If payloads are enabled for the term's field, - then DocSkip/2 represents the difference from the - previous value in the sequence. If payloads are enabled - and DocSkip is odd, - then PayloadLength is stored indicating the length - of the last payload before the SkipIntervalth - document in TermPositions. - FreqSkip and ProxSkip record the position of every - SkipInterval - th - entry in FreqFile and - ProxFile, respectively. File positions are - relative to the start of TermFreqs and Positions, - to the previous SkipDatum in the sequence. -

    -

    For example, if DocFreq=35 and SkipInterval=16, - then there are two SkipData entries, containing - the 15 - th - and 31 - st - document - numbers in TermFreqs. The first FreqSkip names - the number of bytes after the beginning of - TermFreqs that the 16 - th - SkipDatum - starts, and the second the number of bytes after - that that the 32 - nd - starts. The first - ProxSkip names the number of bytes after the - beginning of Positions that the 16 - th - SkipDatum starts, and the second the number of - bytes after that that the 32 - nd - starts. -

    -

    Each term can have multiple skip levels. - The amount of skip levels for a term is NumSkipLevels = Min(MaxSkipLevels, floor(log(DocFreq/log(SkipInterval)))). - The number of SkipData entries for a skip level is DocFreq/(SkipInterval^(Level + 1)), whereas the lowest skip - level is Level=0.
    - Example: SkipInterval = 4, MaxSkipLevels = 2, DocFreq = 35. Then skip level 0 has 8 SkipData entries, - containing the 3rd, 7th, 11th, 15th, 19th, 23rd, - 27th, and 31st document numbers in TermFreqs. Skip level 1 has 2 SkipData entries, containing the - 15th and 31st document numbers in TermFreqs.
    - The SkipData entries on all upper levels > 0 contain a SkipChildLevelPointer referencing the corresponding SkipData - entry in level-1. In the example has entry 15 on level 1 a pointer to entry 15 on level 0 and entry 31 on level 1 a pointer - to entry 31 on level 0. -

    - -

    Positions

    -

    - The .prx file contains the lists of positions that - each term occurs at within documents. Note that - fields omitting positional data do not store - anything into this file, and if all fields in the - index omit positional data then the .prx file will not - exist. -

    -

    ProxFile (.prx) --> - <TermPositions> - TermCount - -

    -

    TermPositions --> - <Positions> - DocFreq - -

    -

    Positions --> - <PositionDelta,Payload?> - Freq - -

    -

    Payload --> - <PayloadLength?,PayloadData> -

    -

    PositionDelta --> - VInt -

    -

    PayloadLength --> - VInt -

    -

    PayloadData --> - bytePayloadLength - -

    -

    TermPositions - are ordered by term (the term is implicit, from the .tis file). -

    -

    Positions - entries are ordered by increasing document number (the document - number is implicit from the .frq file). -

    -

    PositionDelta - is, if payloads are disabled for the term's field, the difference - between the position of the current occurrence in - the document and the previous occurrence (or zero, if this is the - first occurrence in this document). - If payloads are enabled for the term's field, then PositionDelta/2 - is the difference between the current and the previous position. If - payloads are enabled and PositionDelta is odd, then PayloadLength is - stored, indicating the length of the payload at the current term position. -

    -

    - For example, the TermPositions for a - term which occurs as the fourth term in one document, and as the - fifth and ninth term in a subsequent document, would be the following - sequence of VInts (payloads disabled): -

    -

    4, - 5, 4 -

    -

    PayloadData - is metadata associated with the current term position. If PayloadLength - is stored at the current position, then it indicates the length of this - Payload. If PayloadLength is not stored, then this Payload has the same - length as the Payload at the previous position. -

    - -

    Normalization Factors

    -

    There's a single .nrm file containing all norms: -

    -

    AllNorms - (.nrm) --> NormsHeader,<Norms> - NumFieldsWithNorms - -

    -

    Norms - --> <Byte> - SegSize - -

    -

    NormsHeader - --> 'N','R','M',Version -

    -

    Version - --> Byte -

    -

    NormsHeader - has 4 bytes, last of which is the format version for this file, currently -1. -

    -

    Each - byte encodes a floating point value. Bits 0-2 contain the 3-bit - mantissa, and bits 3-8 contain the 5-bit exponent. -

    -

    These - are converted to an IEEE single float value as follows: -

    -
      - -
    1. - -

      If - the byte is zero, use a zero float. -

      - -
    2. - -
    3. - -

      Otherwise, - set the sign bit of the float to zero; -

      - -
    4. - -
    5. - -

      add - 48 to the exponent and use this as the float's exponent; -

      - -
    6. - -
    7. - -

      map - the mantissa to the high-order 3 bits of the float's mantissa; and - -

      - -
    8. - -
    9. - -

      set - the low-order 21 bits of the float's mantissa to zero. -

      - -
    10. - -
    -

    A separate norm file is created when the norm values of an existing segment are modified. - When field N is modified, a separate norm file .sN - is created, to maintain the norm values for that field. -

    -

    Separate norm files are created (when adequate) for both compound and non compound segments. -

    - -

    Term Vectors

    -

    - Term Vector support is an optional on a field by - field basis. It consists of 3 files. -

    -
      - -
    1. - - -

      The Document Index or .tvx file.

      - -

      For each document, this stores the offset - into the document data (.tvd) and field - data (.tvf) files. -

      - -

      DocumentIndex (.tvx) --> TVXVersion<DocumentPosition,FieldPosition> - NumDocs - -

      - -

      TVXVersion --> Int (TermVectorsReader.CURRENT)

      - -

      DocumentPosition --> UInt64 (offset in - the .tvd file)

      - -

      FieldPosition --> UInt64 (offset in the - .tvf file)

      - -
    2. - -
    3. - - -

      The Document or .tvd file.

      - -

      This contains, for each document, the number of fields, a list of the fields with - term vector info and finally a list of pointers to the field information in the .tvf - (Term Vector Fields) file.

      - -

      - Document (.tvd) --> TVDVersion<NumFields, FieldNums, FieldPositions> - NumDocs - -

      - -

      TVDVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      - -

      NumFields --> VInt

      - -

      FieldNums --> <FieldNumDelta> - NumFields - -

      - -

      FieldNumDelta --> VInt

      - -

      FieldPositions --> <FieldPositionDelta> - NumFields-1 - -

      - -

      FieldPositionDelta --> VLong

      - -

      The .tvd file is used to map out the fields that have term vectors stored and - where the field information is in the .tvf file.

      - -
    4. - -
    5. - - -

      The Field or .tvf file.

      - -

      This file contains, for each field that has a term vector stored, a list of - the terms, their frequencies and, optionally, position and offest information.

      - -

      Field (.tvf) --> TVFVersion<NumTerms, Position/Offset, TermFreqs> - NumFields - -

      - -

      TVFVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      - -

      NumTerms --> VInt

      - -

      Position/Offset --> Byte

      - -

      TermFreqs --> <TermText, TermFreq, Positions?, Offsets?> - NumTerms - -

      - -

      TermText --> <PrefixLength, Suffix>

      - -

      PrefixLength --> VInt

      - -

      Suffix --> String

      - -

      TermFreq --> VInt

      - -

      Positions --> <VInt>TermFreq -

      - -

      Offsets --> <VInt, VInt>TermFreq -

      - -
      - -

      Notes:

      - -
        - -
      • Position/Offset byte stores whether this term vector has position or offset information stored.
      • - -
      • Term - text prefixes are shared. The PrefixLength is the number of initial - characters from the previous term which must be pre-pended to a - term's suffix in order to form the term's text. Thus, if the - previous term's text was "bone" and the term is "boy", - the PrefixLength is two and the suffix is "y". -
      • - -
      • Positions are stored as delta encoded VInts. This means we only store the difference of the current position from the last position
      • - -
      • Offsets are stored as delta encoded VInts. The first VInt is the startOffset, the second is the endOffset.
      • - -
      - - - -
    6. - -
    - -

    Deleted Documents

    -

    The .del file is - optional, and only exists when a segment contains deletions. -

    -

    Although per-segment, this file is maintained exterior to compound segment files. -

    -

    - Deletions - (.del) --> [Format],ByteCount,BitCount, Bits | DGaps (depending on Format) -

    -

    Format,ByteSize,BitCount --> - Uint32 -

    -

    Bits --> - <Byte> - ByteCount - -

    -

    DGaps --> - <DGap,NonzeroByte> - NonzeroBytesCount - -

    -

    DGap --> - VInt -

    -

    NonzeroByte --> - Byte -

    -

    Format - is Optional. -1 indicates DGaps. Non-negative value indicates Bits, and that Format is excluded. -

    -

    ByteCount - indicates the number of bytes in Bits. It is typically - (SegSize/8)+1. -

    -

    - BitCount - indicates the number of bits that are currently set in Bits. -

    -

    Bits - contains one bit for each document indexed. When the bit - corresponding to a document number is set, that document is marked as - deleted. Bit ordering is from least to most significant. Thus, if - Bits contains two bytes, 0x00 and 0x02, then document 9 is marked as - deleted. -

    -

    DGaps - represents sparse bit-vectors more efficiently than Bits. - It is made of DGaps on indexes of nonzero bytes in Bits, - and the nonzero bytes themselves. The number of nonzero bytes - in Bits (NonzeroBytesCount) is not stored. -

    -

    For example, - if there are 8000 bits and only bits 10,12,32 are set, - DGaps would be used: -

    -

    - (VInt) 1 , (byte) 20 , (VInt) 3 , (Byte) 1 -

    -
    - - - -

    Limitations

    -
    -

    - When referring to term numbers, Lucene's current - implementation uses a Java int to hold the - term index, which means the maximum number of unique - terms in any single index segment is ~2.1 billion times - the term index interval (default 128) = ~274 billion. - This is technically not a limitation of the index file - format, just of Lucene's current implementation. -

    -

    - Similarly, Lucene uses a Java int to refer - to document numbers, and the index file format uses an - Int32 on-disk to store document numbers. - This is a limitation of both the index file format and - the current implementation. Eventually these should be - replaced with either UInt64 values, or - better yet, VInt values which have no - limit. -

    -
    - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/gettingstarted.html =================================================================== --- lucene/site/build/site/gettingstarted.html (revision 1328746) +++ lucene/site/build/site/gettingstarted.html (working copy) @@ -1,310 +0,0 @@ - - - - - - - - - Apache Lucene - Getting Started Guide - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Getting Started Guide -

    -
    - -
    - - - -

    Getting Started

    -
    -

    -This document is intended as a "getting started" guide. It has three audiences: first-time users -looking to install Apache Lucene in their application; developers looking to modify or base -the applications they develop on Lucene; and developers looking to become involved in and contribute -to the development of Lucene. This document is written in tutorial and walk-through format. The -goal is to help you "get started". It does not go into great depth on some of the conceptual or -inner details of Lucene. -

    -

    -Each section listed below builds on one another. More advanced users -may wish to skip sections. -

    - -
    - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/images/built-with-forrest-button.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/images/instruction_arrow.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/images/favicon.ico =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/x-icon Index: lucene/site/build/site/images/built-with-forrest-button.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/images/favicon.ico =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/x-icon Index: lucene/site/build/site/images/instruction_arrow.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/index.html =================================================================== --- lucene/site/build/site/index.html (revision 1328746) +++ lucene/site/build/site/index.html (working copy) @@ -1,280 +0,0 @@ - - - - - - - -Lucene Java Documentation - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    Lucene Java Documentation

    - -

    - This is the official documentation for Lucene Java
    - Please use the menu on the left to access the Javadocs and different documents. -

    - -

    - Additional documentation is available in the Wiki. -

    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/linkmap.html =================================================================== --- lucene/site/build/site/linkmap.html (revision 1328746) +++ lucene/site/build/site/linkmap.html (working copy) @@ -1,501 +0,0 @@ - - - - - - - -Site Linkmap Table of Contents - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    Site Linkmap Table of Contents

    -

    - This is a map of the complete site and its structure. -

    -
      -
    • -Lucene  ___________________  site -
    • -
        - - - - -
          -
        • -Documentation  ___________________  docs -
        • -
            - -
              -
            • -Overview  ___________________  overview -
            • -
            - -
              -
            • -Changes  ___________________  changes -
            • -
            - -
              -
            • -Javadocs  ___________________  javadoc -
            • -
                - -
                  -
                • -Core  ___________________  javadoc-core -
                • -
                - - - - - - - - - - - - - -
                  -
                • -Analysis: UIMA  ___________________  javadoc-analyzers-uima -
                • -
                - -
                  -
                • -Benchmark  ___________________  javadoc-benchmark -
                • -
                - -
                  -
                • -Demo  ___________________  javadoc-demo -
                • -
                - -
                  -
                • -Faceting  ___________________  javadoc-facet -
                • -
                - -
                  -
                • -Grouping  ___________________  javadoc-grouping -
                • -
                - -
                  -
                • -Highlighter  ___________________  javadoc-highlighter -
                • -
                - -
                  -
                • -Join  ___________________  javadoc-join -
                • -
                - -
                  -
                • -Memory  ___________________  javadoc-memory -
                • -
                - - - -
                  -
                • -Queries  ___________________  javadoc-queries -
                • -
                - -
                  -
                • -Query Parsers  ___________________  javadoc-queryparser -
                • -
                - -
                  -
                • -Sandbox  ___________________  javadoc-sandbox -
                • -
                - -
                  -
                • -Spatial  ___________________  javadoc-spatial -
                • -
                - - - -
                  -
                • -Test Framework  ___________________  javadoc-test-framework -
                • -
                - -
              -
            - - - - - -
              -
            • -FAQ  ___________________  faq -
            • -
            - - - - - - - -
              -
            • -Scoring  ___________________  scoring -
            • -
            - -
              -
            • -Wiki  ___________________  wiki -
            • -
            - - - -
          -
        - - - - - - -
      -
    -
    - -
     
    -
    - - - - Index: lucene/site/build/site/lucene-contrib/index.html =================================================================== --- lucene/site/build/site/lucene-contrib/index.html (revision 1328746) +++ lucene/site/build/site/lucene-contrib/index.html (working copy) @@ -1,420 +0,0 @@ - - - - - - - - - Apache Lucene - Lucene Contrib - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Lucene Contrib -

    -
    - -
    - - - -

    Lucene Contrib

    -
    -

    - The Lucene Java project also contains a workspace, Lucene Contrib - (formerly known as the Lucene Sandbox), that is open both to all Lucene - Java core committers and to developers whose commit rights are - restricted to the Contrib workspace; these developers are referred to - as "Contrib committers". The Lucene Contrib workspace hosts the - following types of packages: -

    -
      - -
    • Various third party contributions.
    • - -
    • - Contributions with third party dependencies - the Lucene Java core - distribution has no external runtime dependencies. -
    • - -
    • - New ideas that are intended for eventual inclusion into the Lucene - Java core. -
    • - -
    -

    - Users are free to experiment with the components developed in the - Contrib workspace, but Contrib packages will not necessarily be - maintained, particularly in their current state. The Lucene Java core - backwards compatibility commitments (see - http://wiki.apache.org/lucene-java/BackwardsCompatibility) - do not necessarily extend to the packages in the Contrib workspace. - See the README.txt file for each Contrib package for details. If the - README.txt file does not address its backwards compatibility - commitments, users should assume it does not make any compatibility - commitments. -

    -

    - See Contrib CHANGES for changes included in the current release. -

    -

    - You can access the current trunk Contrib repository at - http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/contrib/. -

    - -

    benchmark

    -

    The benchmark contribution contains tools for benchmarking Lucene using standard, freely available corpora.

    -

    See benchmark javadoc -

    - -

    demo

    -

    The demo contrib contains the Lucene demo: IndexFiles and SearchFiles, described under - Getting Started.

    -

    See demo javadoc -

    - -

    highlighter

    -

    A set of classes for highlighting matching terms in search results.

    -

    See highlighter javadoc -

    - -

    instantiated

    -

    RAM-based index that enables much faster searching than RAMDirectory in certain situations.

    -

    See instantiated javadoc -

    - -

    memory

    -

    High-performance single-document main memory index.

    -

    See memory javadoc -

    - -

    misc

    -

    A variety of miscellaneous files, including QueryParsers, and other alternate Lucene class implementations and tools.

    -

    See misc javadoc -

    - -

    queryparser

    -

    A new Lucene query parser implementation, which matches the syntax of the core QueryParser but offers a more modular architecture to enable customization.

    -

    See queryparser javadoc -

    - -

    queries

    -

    Additional queries for Lucene.

    -

    See queries javadoc -

    - -

    remote

    -

    Classes to help use Lucene with RMI.

    -

    See remote javadoc -

    - -

    spatial

    -

    Classes to help with efficient distance based sorting.

    -

    See spatial javadoc -

    - -

    spellchecker

    -

    Provides tools for spellchecking and suggestions with Lucene.

    -

    See spellchecker javadoc -

    - -

    xml-query-parser

    -

    A QueryParser that can read queries written in an XML format.

    -

    See xml-query-parser javadoc -

    -
    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/lucene-contrib/index.html =================================================================== --- lucene/site/build/site/lucene-contrib/index.html (revision 1328746) +++ lucene/site/build/site/lucene-contrib/index.html (working copy) @@ -1,420 +0,0 @@ - - - - - - - - - Apache Lucene - Lucene Contrib - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Lucene Contrib -

    -
    - -
    - - - -

    Lucene Contrib

    -
    -

    - The Lucene Java project also contains a workspace, Lucene Contrib - (formerly known as the Lucene Sandbox), that is open both to all Lucene - Java core committers and to developers whose commit rights are - restricted to the Contrib workspace; these developers are referred to - as "Contrib committers". The Lucene Contrib workspace hosts the - following types of packages: -

    -
      - -
    • Various third party contributions.
    • - -
    • - Contributions with third party dependencies - the Lucene Java core - distribution has no external runtime dependencies. -
    • - -
    • - New ideas that are intended for eventual inclusion into the Lucene - Java core. -
    • - -
    -

    - Users are free to experiment with the components developed in the - Contrib workspace, but Contrib packages will not necessarily be - maintained, particularly in their current state. The Lucene Java core - backwards compatibility commitments (see - http://wiki.apache.org/lucene-java/BackwardsCompatibility) - do not necessarily extend to the packages in the Contrib workspace. - See the README.txt file for each Contrib package for details. If the - README.txt file does not address its backwards compatibility - commitments, users should assume it does not make any compatibility - commitments. -

    -

    - See Contrib CHANGES for changes included in the current release. -

    -

    - You can access the current trunk Contrib repository at - http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/contrib/. -

    - -

    benchmark

    -

    The benchmark contribution contains tools for benchmarking Lucene using standard, freely available corpora.

    -

    See benchmark javadoc -

    - -

    demo

    -

    The demo contrib contains the Lucene demo: IndexFiles and SearchFiles, described under - Getting Started.

    -

    See demo javadoc -

    - -

    highlighter

    -

    A set of classes for highlighting matching terms in search results.

    -

    See highlighter javadoc -

    - -

    instantiated

    -

    RAM-based index that enables much faster searching than RAMDirectory in certain situations.

    -

    See instantiated javadoc -

    - -

    memory

    -

    High-performance single-document main memory index.

    -

    See memory javadoc -

    - -

    misc

    -

    A variety of miscellaneous files, including QueryParsers, and other alternate Lucene class implementations and tools.

    -

    See misc javadoc -

    - -

    queryparser

    -

    A new Lucene query parser implementation, which matches the syntax of the core QueryParser but offers a more modular architecture to enable customization.

    -

    See queryparser javadoc -

    - -

    queries

    -

    Additional queries for Lucene.

    -

    See queries javadoc -

    - -

    remote

    -

    Classes to help use Lucene with RMI.

    -

    See remote javadoc -

    - -

    spatial

    -

    Classes to help with efficient distance based sorting.

    -

    See spatial javadoc -

    - -

    spellchecker

    -

    Provides tools for spellchecking and suggestions with Lucene.

    -

    See spellchecker javadoc -

    - -

    xml-query-parser

    -

    A QueryParser that can read queries written in an XML format.

    -

    See xml-query-parser javadoc -

    -
    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/queryparsersyntax.html =================================================================== --- lucene/site/build/site/queryparsersyntax.html (revision 1328746) +++ lucene/site/build/site/queryparsersyntax.html (working copy) @@ -1,536 +0,0 @@ - - - - - - - - - Apache Lucene - Query Parser Syntax - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Query Parser Syntax -

    - - - -

    Overview

    -
    -

    Although Lucene provides the ability to create your own - queries through its API, it also provides a rich query - language through the Query Parser, a lexer which - interprets a string into a Lucene Query using JavaCC. -

    -

    Generally, the query parser syntax may change from - release to release. This page describes the syntax as of - the current release. If you are using a different - version of Lucene, please consult the copy of - docs/queryparsersyntax.html that was distributed - with the version you are using. -

    -

    - Before choosing to use the provided Query Parser, please consider the following: -

      - -
    1. If you are programmatically generating a query string and then - parsing it with the query parser then you should seriously consider building - your queries directly with the query API. In other words, the query - parser is designed for human-entered text, not for program-generated - text.
    2. - - -
    3. Untokenized fields are best added directly to queries, and not - through the query parser. If a field's values are generated programmatically - by the application, then so should query clauses for this field. - An analyzer, which the query parser uses, is designed to convert human-entered - text to terms. Program-generated values, like dates, keywords, etc., - should be consistently program-generated.
    4. - - -
    5. In a query form, fields which are general text should use the query - parser. All others, such as date ranges, keywords, etc. are better added - directly through the query API. A field with a limit set of values, - that can be specified with a pull-down menu should not be added to a - query string which is subsequently parsed, but rather added as a - TermQuery clause.
    6. - -
    - -

    -
    - - - -

    Terms

    -
    -

    A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.

    -

    A Single Term is a single word such as "test" or "hello".

    -

    A Phrase is a group of words surrounded by double quotes such as "hello dolly".

    -

    Multiple terms can be combined together with Boolean operators to form a more complex query (see below).

    -

    Note: The analyzer used to create the index will be used on the terms and phrases in the query string. - So it is important to choose an analyzer that will not interfere with the terms used in the query string.

    -
    - - - -

    Fields

    -
    -

    Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.

    -

    You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.

    -

    As an example, let's assume a Lucene index contains two fields, title and text and text is the default field. - If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:

    -
    title:"The Right Way" AND text:go
    -

    or

    -
    title:"Do it right" AND right
    -

    Since text is the default field, the field indicator is not required.

    -

    Note: The field is only valid for the term that it directly precedes, so the query

    -
    title:Do it right
    -

    Will only find "Do" in the title field. It will find "it" and "right" in the default field (in this case the text field).

    -
    - - - -

    Term Modifiers

    -
    -

    Lucene supports modifying query terms to provide a wide range of searching options.

    - -

    Wildcard Searches

    -

    Lucene supports single and multiple character wildcard searches within single terms - (not within phrase queries).

    -

    To perform a single character wildcard search use the "?" symbol.

    -

    To perform a multiple character wildcard search use the "*" symbol.

    -

    The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

    -
    te?t
    -

    Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

    -
    test*
    -

    You can also use the wildcard searches in the middle of a term.

    -
    te*t
    -

    Note: You cannot use a * or ? symbol as the first character of a search.

    - -

    Fuzzy Searches

    -

    Lucene supports fuzzy searches based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:

    -
    roam~
    -

    This search will find terms like foam and roams.

    -

    Starting with Lucene 1.9 an additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:

    -
    roam~0.8
    -

    The default that is used if the parameter is not given is 0.5.

    - -

    Proximity Searches

    -

    Lucene supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "apache" and "jakarta" within 10 words of each other in a document use the search:

    -
    "jakarta apache"~10
    - -

    Range Searches

    -

    Range Queries allow one to match documents whose field(s) values - are between the lower and upper bound specified by the Range Query. - Range Queries can be inclusive or exclusive of the upper and lower bounds. - Sorting is done lexicographically.

    -
    mod_date:[20020101 TO 20030101]
    -

    This will find documents whose mod_date fields have values between 20020101 and 20030101, inclusive. - Note that Range Queries are not reserved for date fields. You could also use range queries with non-date fields:

    -
    title:{Aida TO Carmen}
    -

    This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.

    -

    Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by - curly brackets.

    - -

    Boosting a Term

    -

    Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

    -

    Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for

    -
    jakarta apache
    -

    and you want the term "jakarta" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. - You would type:

    -
    jakarta^4 apache
    -

    This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example:

    -
    "jakarta apache"^4 "Apache Lucene"
    -

    By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)

    -
    - - - - -

    Boolean Operators

    -
    -

    Boolean operators allow terms to be combined through logic operators. - Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).

    - -

    -

    The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. - The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. - The symbol || can be used in place of the word OR.

    -

    To search for documents that contain either "jakarta apache" or just "jakarta" use the query:

    -
    "jakarta apache" jakarta
    -

    or

    -
    "jakarta apache" OR jakarta
    - -

    AND

    -

    The AND operator matches documents where both terms exist anywhere in the text of a single document. - This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

    -

    To search for documents that contain "jakarta apache" and "Apache Lucene" use the query:

    -
    "jakarta apache" AND "Apache Lucene"
    - -

    +

    -

    The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.

    -

    To search for documents that must contain "jakarta" and may contain "lucene" use the query:

    -
    +jakarta lucene
    - -

    NOT

    -

    The NOT operator excludes documents that contain the term after NOT. - This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.

    -

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    -
    "jakarta apache" NOT "Apache Lucene"
    -

    Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:

    -
    NOT "jakarta apache"
    - -

    -

    -

    The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.

    -

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    -
    "jakarta apache" -"Apache Lucene"
    -
    - - - -

    Grouping

    -
    -

    Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

    -

    To search for either "jakarta" or "apache" and "website" use the query:

    -
    (jakarta OR apache) AND website
    -

    This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.

    -
    - - - -

    Field Grouping

    -
    -

    Lucene supports using parentheses to group multiple clauses to a single field.

    -

    To search for a title that contains both the word "return" and the phrase "pink panther" use the query:

    -
    title:(+return +"pink panther")
    -
    - - - -

    Escaping Special Characters

    -
    -

    Lucene supports escaping special characters that are part of the query syntax. The current list special characters are

    -

    + - && || ! ( ) { } [ ] ^ " ~ * ? : \

    -

    To escape these character use the \ before the character. For example to search for (1+1):2 use the query:

    -
    \(1\+1\)\:2
    -
    - - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/scoring.html =================================================================== --- lucene/site/build/site/scoring.html (revision 1328746) +++ lucene/site/build/site/scoring.html (working copy) @@ -1,599 +0,0 @@ - - - - - - - - - Apache Lucene - Scoring - - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    - Apache Lucene - Scoring -

    - - - - -

    Introduction

    -
    -

    Lucene scoring is the heart of why we all love Lucene. It is blazingly fast and it hides almost all of the complexity from the user. - In a nutshell, it works. At least, that is, until it doesn't work, or doesn't work as one would expect it to - work. Then we are left digging into Lucene internals or asking for help on java-user@lucene.apache.org to figure out why a document with five of our query terms - scores lower than a different document with only one of the query terms.

    -

    While this document won't answer your specific scoring issues, it will, hopefully, point you to the places that can - help you figure out the what and why of Lucene scoring.

    -

    Lucene scoring uses a combination of the - Vector Space Model (VSM) of Information - Retrieval and the Boolean model - to determine - how relevant a given Document is to a User's query. In general, the idea behind the VSM is the more - times a query term appears in a document relative to - the number of times the term appears in all the documents in the collection, the more relevant that - document is to the query. It uses the Boolean model to first narrow down the documents that need to - be scored based on the use of boolean logic in the Query specification. Lucene also adds some - capabilities and refinements onto this model to support boolean and fuzzy searching, but it - essentially remains a VSM based system at the heart. - For some valuable references on VSM and IR in general refer to the - Lucene Wiki IR references. -

    -

    The rest of this document will cover Scoring basics and how to change your - Similarity. Next it will cover ways you can - customize the Lucene internals in Changing your Scoring - -- Expert Level which gives details on implementing your own - Query class and related functionality. Finally, we - will finish up with some reference material in the Appendix. -

    -
    - - -

    Scoring

    -
    -

    Scoring is very much dependent on the way documents are indexed, - so it is important to understand indexing (see - Apache Lucene - Getting Started Guide - and the Lucene - file formats - before continuing on with this section.) It is also assumed that readers know how to use the - Searcher.explain(Query query, int doc) functionality, - which can go a long way in informing why a score is returned. -

    - -

    Fields and Documents

    -

    In Lucene, the objects we are scoring are - Documents. A Document is a collection - of - Fields. Each Field has semantics about how - it is created and stored (i.e. tokenized, untokenized, raw data, compressed, etc.) It is important to - note that Lucene scoring works on Fields and then combines the results to return Documents. This is - important because two Documents with the exact same content, but one having the content in two Fields - and the other in one Field will return different scores for the same query due to length normalization - (assumming the - DefaultSimilarity - on the Fields). -

    - -

    Score Boosting

    -

    Lucene allows influencing search results by "boosting" in more than one level: -

      - -
    • -Document level boosting - - while indexing - by calling - document.setBoost() - before a document is added to the index. -
    • - -
    • -Document's Field level boosting - - while indexing - by calling - field.setBoost() - before adding a field to the document (and before adding the document to the index). -
    • - -
    • -Query level boosting - - during search, by setting a boost on a query clause, calling - Query.setBoost(). -
    • - -
    - -

    -

    Indexing time boosts are preprocessed for storage efficiency and written to - the directory (when writing the document) in a single byte (!) as follows: - For each field of a document, all boosts of that field - (i.e. all boosts under the same field name in that doc) are multiplied. - The result is multiplied by the boost of the document, - and also multiplied by a "field length norm" value - that represents the length of that field in that doc - (so shorter fields are automatically boosted up). - The result is decoded as a single byte - (with some precision loss of course) and stored in the directory. - The similarity object in effect at indexing computes the length-norm of the field. -

    -

    This composition of 1-byte representation of norms - (that is, indexing time multiplication of field boosts & doc boost & field-length-norm) - is nicely described in - Fieldable.setBoost(). -

    -

    Encoding and decoding of the resulted float norm in a single byte are done by the - static methods of the class Similarity: - encodeNorm() and - decodeNorm(). - Due to loss of precision, it is not guaranteed that decode(encode(x)) = x, - e.g. decode(encode(0.89)) = 0.75. - At scoring (search) time, this norm is brought into the score of document - as norm(t, d), as shown by the formula in - Similarity. -

    - -

    Understanding the Scoring Formula

    -

    - This scoring formula is described in the - Similarity class. Please take the time to study this formula, as it contains much of the information about how the - basics of Lucene scoring work, especially the - TermQuery. -

    - -

    The Big Picture

    -

    OK, so the tf-idf formula and the - Similarity - is great for understanding the basics of Lucene scoring, but what really drives Lucene scoring are - the use and interactions between the - Query classes, as created by each application in - response to a user's information need. -

    -

    In this regard, Lucene offers a wide variety of Query implementations, most of which are in the - org.apache.lucene.search package. - These implementations can be combined in a wide variety of ways to provide complex querying - capabilities along with - information about where matches took place in the document collection. The Query - section below - highlights some of the more important Query classes. For information on the other ones, see the - package summary. For details on implementing - your own Query class, see Changing your Scoring -- - Expert Level below. -

    -

    Once a Query has been created and submitted to the - IndexSearcher, the scoring process - begins. (See the Appendix Algorithm section for more notes on the process.) After some infrastructure setup, - control finally passes to the Weight implementation and its - Scorer instance. In the case of any type of - BooleanQuery, scoring is handled by the - BooleanWeight2 - (link goes to ViewVC BooleanQuery java code which contains the BooleanWeight2 inner class) or - BooleanWeight - (link goes to ViewVC BooleanQuery java code, which contains the BooleanWeight inner class). -

    -

    - Assuming the use of the BooleanWeight2, a - BooleanScorer2 is created by bringing together - all of the - Scorers from the sub-clauses of the BooleanQuery. - When the BooleanScorer2 is asked to score it delegates its work to an internal Scorer based on the type - of clauses in the Query. This internal Scorer essentially loops over the sub scorers and sums the scores - provided by each scorer while factoring in the coord() score. - -

    - -

    Query Classes

    -

    For information on the Query Classes, refer to the - search package javadocs - -

    - -

    Changing Similarity

    -

    One of the ways of changing the scoring characteristics of Lucene is to change the similarity factors. For information on - how to do this, see the - search package javadocs -

    -
    - - -

    Changing your Scoring -- Expert Level

    -
    -

    At a much deeper level, one can affect scoring by implementing their own Query classes (and related scoring classes.) To learn more - about how to do this, refer to the - search package javadocs - -

    -
    - - - -

    Appendix

    -
    - -

    Algorithm

    -

    This section is mostly notes on stepping through the Scoring process and serves as - fertilizer for the earlier sections.

    -

    In the typical search application, a - Query - is passed to the - Searcher - , beginning the scoring process. -

    -

    Once inside the Searcher, a - Collector - is used for the scoring and sorting of the search results. - These important objects are involved in a search: -

      - -
    1. The - Weight - object of the Query. The Weight object is an internal representation of the Query that - allows the Query to be reused by the Searcher. -
    2. - -
    3. The Searcher that initiated the call.
    4. - -
    5. A - Filter - for limiting the result set. Note, the Filter may be null. -
    6. - -
    7. A - Sort - object for specifying how to sort the results if the standard score based sort method is not - desired. -
    8. - -
    - -

    -

    Assuming we are not sorting (since sorting doesn't - effect the raw Lucene score), - we call one of the search methods of the Searcher, passing in the - Weight - object created by Searcher.createWeight(Query), - Filter - and the number of results we want. This method - returns a - TopDocs - object, which is an internal collection of search results. - The Searcher creates a - TopScoreDocCollector - and passes it along with the Weight, Filter to another expert search method (for more on the - Collector - mechanism, see - Searcher - .) The TopDocCollector uses a - PriorityQueue - to collect the top results for the search. -

    -

    If a Filter is being used, some initial setup is done to determine which docs to include. Otherwise, - we ask the Weight for - a - Scorer - for the - IndexReader - of the current searcher and we proceed by - calling the score method on the - Scorer - . -

    -

    At last, we are actually going to score some documents. The score method takes in the Collector - (most likely the TopScoreDocCollector or TopFieldCollector) and does its business. - Of course, here is where things get involved. The - Scorer - that is returned by the - Weight - object depends on what type of Query was submitted. In most real world applications with multiple - query terms, - the - Scorer - is going to be a - BooleanScorer2 - (see the section on customizing your scoring for info on changing this.) - -

    -

    Assuming a BooleanScorer2 scorer, we first initialize the Coordinator, which is used to apply the - coord() factor. We then - get a internal Scorer based on the required, optional and prohibited parts of the query. - Using this internal Scorer, the BooleanScorer2 then proceeds - into a while loop based on the Scorer#next() method. The next() method advances to the next document - matching the query. This is an - abstract method in the Scorer class and is thus overriden by all derived - implementations. If you have a simple OR query - your internal Scorer is most likely a DisjunctionSumScorer, which essentially combines the scorers - from the sub scorers of the OR'd terms.

    -
    - -
    - -
     
    -
    - - - - Index: lucene/site/build/site/skin/skinconf.xsl =================================================================== --- lucene/site/build/site/skin/skinconf.xsl (revision 1328746) +++ lucene/site/build/site/skin/skinconf.xsl (working copy) @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/build/site/skin/getMenu.js =================================================================== --- lucene/site/build/site/skin/getMenu.js (revision 1328746) +++ lucene/site/build/site/skin/getMenu.js (working copy) @@ -1,45 +0,0 @@ -/* -* 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 script, when included in a html file, can be used to make collapsible menus - * - * Typical usage: - * - */ - -if (document.getElementById){ - document.write('') -} - - -function SwitchMenu(obj, thePath) -{ -var open = 'url("'+thePath + 'images/chapter_open.gif")'; -var close = 'url("'+thePath + 'images/chapter.gif")'; - if(document.getElementById) { - var el = document.getElementById(obj); - var title = document.getElementById(obj+'Title'); - - if(el.style.display != "block"){ - title.style.backgroundImage = open; - el.style.display = "block"; - }else{ - title.style.backgroundImage = close; - el.style.display = "none"; - } - }// end - if(document.getElementById) -}//end - function SwitchMenu(obj) Index: lucene/site/build/site/skin/menu.js =================================================================== --- lucene/site/build/site/skin/menu.js (revision 1328746) +++ lucene/site/build/site/skin/menu.js (working copy) @@ -1,48 +0,0 @@ -/* -* 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 script, when included in a html file, can be used to make collapsible menus - * - * Typical usage: - * - */ - -if (document.getElementById){ - document.write('') -} - -function SwitchMenu(obj) -{ - if(document.getElementById) { - var el = document.getElementById(obj); - var title = document.getElementById(obj+'Title'); - - if(obj.indexOf("_selected_")==0&&el.style.display == ""){ - el.style.display = "block"; - title.className = "pagegroupselected"; - } - - if(el.style.display != "block"){ - el.style.display = "block"; - title.className = "pagegroupopen"; - } - else{ - el.style.display = "none"; - title.className = "pagegroup"; - } - }// end - if(document.getElementById) -}//end - function SwitchMenu(obj) Index: lucene/site/build/site/skin/prototype.js =================================================================== --- lucene/site/build/site/skin/prototype.js (revision 1328746) +++ lucene/site/build/site/skin/prototype.js (working copy) @@ -1,1257 +0,0 @@ -/* Prototype JavaScript framework, version 1.4.0_pre4 - * (c) 2005 Sam Stephenson - * - * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff - * against the source tree, available from the Prototype darcs repository. - * - * Prototype is freely distributable under the terms of an MIT-style license. - * - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.4.0_pre4', - - emptyFunction: function() {}, - K: function(x) {return x} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Function.prototype.bind = function(object) { - var __method = this; - return function() { - return __method.apply(object, arguments); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -} - -Number.prototype.toColorPart = function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; -} - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} - -if (!Array.prototype.push) { - Array.prototype.push = function() { - var startLength = this.length; - for (var i = 0; i < arguments.length; i++) - this[startLength + i] = arguments[i]; - return this.length; - } -} - -if (!Function.prototype.apply) { - // Based on code from http://www.youngpup.net/ - Function.prototype.apply = function(object, parameters) { - var parameterStrings = new Array(); - if (!object) object = window; - if (!parameters) parameters = new Array(); - - for (var i = 0; i < parameters.length; i++) - parameterStrings[i] = 'parameters[' + i + ']'; - - object.__apply__ = this; - var result = eval('object.__apply__(' + - parameterStrings.join(', ') + ')'); - object.__apply__ = null; - - return result; - } -} - -Object.extend(String.prototype, { - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0].nodeValue; - }, - - parseQuery: function() { - var str = this; - if (str.substring(0,1) == '?') { - str = this.substring(1); - } - var result = {}; - var pairs = str.split('&'); - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i].split('='); - result[pair[0]] = pair[1]; - } - return result; - } -}); - - -var _break = new Object(); -var _continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != _continue) throw e; - } - }); - } catch (e) { - if (e != _break) throw e; - } - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - if (!(result &= (iterator || Prototype.K)(value, index))) - throw _break; - }); - return result; - }, - - any: function(iterator) { - var result = true; - this.each(function(value, index) { - if (result &= (iterator || Prototype.K)(value, index)) - throw _break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function (iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw _break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw _break; - } - }); - return found; - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.collect(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.collect(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.collect(Prototype.K); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; - }); - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); - -$A = Array.from = function(iterable) { - var results = []; - for (var i = 0; i < iterable.length; i++) - results.push(iterable[i]); - return results; -} - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0; i < this.length; i++) - iterator(this[i]); - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - } -}); - -Object.extend(Array.prototype, Enumerable); - - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - } -} - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - Object.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - if (this.options.method == 'get') - url += '?' + parameters; - - this.transport.open(this.options.method, url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - - if (event == 'Complete') - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(this.transport); - - (this.options['on' + event] || Prototype.emptyFunction)(this.transport); - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = Prototype.emptyFunction; - } -}); - -Ajax.Updater = Class.create(); -Ajax.Updater.ScriptFragment = '(?:)((\n|.)*?)(?:<\/script>)'; - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function() { - this.updateContent(); - onComplete(this.transport); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - - var match = new RegExp(Ajax.Updater.ScriptFragment, 'img'); - var response = this.transport.responseText.replace(match, ''); - var scripts = this.transport.responseText.match(match); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - receiver.innerHTML = response; - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout((function() {this.onComplete( - this.transport)}).bind(this), 10); - } - - if (this.options.evalScripts && scripts) { - match = new RegExp(Ajax.Updater.ScriptFragment, 'im'); - setTimeout((function() { - for (var i = 0; i < scripts.length; i++) - eval(scripts[i].match(match)[1]); - }).bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = 1; - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Ajax.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); - -document.getElementsByClassName = function(className) { - var children = document.getElementsByTagName('*') || document.all; - var elements = new Array(); - - for (var i = 0; i < children.length; i++) { - var child = children[i]; - var classNames = child.className.split(' '); - for (var j = 0; j < classNames.length; j++) { - if (classNames[j] == className) { - elements.push(child); - break; - } - } - } - - return elements; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = - (element.style.display == 'none' ? '' : 'none'); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - hasClassName: function(element, className) { - element = $(element); - if (!element) - return; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] == className) - return true; - } - return false; - }, - - addClassName: function(element, className) { - element = $(element); - Element.removeClassName(element, className); - element.className += ' ' + className; - }, - - removeClassName: function(element, className) { - element = $(element); - if (!element) - return; - var newClassName = ''; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] != className) { - if (i > 0) - newClassName += ' '; - newClassName += a[i]; - } - } - element.className = newClassName; - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - var element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content; - - if (this.adjacency && this.element.insertAdjacentHTML) { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.fragment = this.range.createContextualFragment(this.content); - this.insertContent(); - } - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, this.element); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function() { - this.element.insertBefore(this.fragment, this.element.firstChild); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function() { - this.element.appendChild(this.fragment); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, - this.element.nextSibling); - } -}); - -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - $(element).focus(); - $(element).select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - var form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - var form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - focusFirstElement: function(form) { - var form = $(form); - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (element.type != 'hidden' && !element.disabled) { - Field.activate(element); - break; - } - } - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return encodeURIComponent(parameter[0]) + '=' + - encodeURIComponent(parameter[1]); - }, - - getValue: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - var value = ''; - if (element.type == 'select-one') { - var index = element.selectedIndex; - if (index >= 0) - value = element.options[index].value || element.options[index].text; - } else { - value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) - value.push(opt.value || opt.text); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - element.target = this; - element.prev_onclick = element.onclick || Prototype.emptyFunction; - element.onclick = function() { - this.prev_onclick(); - this.target.onElementEvent(); - } - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - element.target = this; - element.prev_onchange = element.onchange || Prototype.emptyFunction; - element.onchange = function() { - this.prev_onchange(); - this.target.onElementEvent(); - } - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - - -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - || element.attachEvent)) - name = 'keydown'; - - this._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } -}); - -/* prevent memory leaks in IE */ -Event.observe(window, 'unload', Event.unloadCache, false); - -var Position = { - - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - } -} Index: lucene/site/build/site/skin/note.txt =================================================================== --- lucene/site/build/site/skin/note.txt (revision 1328746) +++ lucene/site/build/site/skin/note.txt (working copy) @@ -1,50 +0,0 @@ -Notes for developer: - ---Legend------------------- -TODO -> blocker -DONE -> blocker -ToDo -> enhancement bug -done -> enhancement bug - ---Issues------------------- -- the corner images should be rendered through svg with the header color. --> DONE --> ToDo: get rid of the images and use only divs! - -- the menu points should be displayed "better". --> DONE --- Use the krysalis-site menu approach for the overall menu display. --> DONE --- Use the old lenya innermenu approch to further enhance the menu . --> DONE - -- the content area needs some attention. --> DONE --- introduce the heading scheme from krysalis () --> DONE --> ToDo: make box with round corners --> done: make underlined with variable border height --> ToDo: make underline with bottom round corner --- introduce the toc for each html-page --> DONE --- introduce the external-link-images. --> DONE - -- the publish note should be where now only a border is. -Like
    --> DONE -, but make it configurable. --> DONE -- footer needs some attention --> DONE --- the footer do not have the color profile! Enable it! --> DONE --- the footer should as well contain a feedback link. -See http://issues.apache.org/eyebrowse/ReadMsg?listName=forrest-user@xml.apache.org&msgNo=71 --> DONE - -- introduce credits alternativ location --> DONE - -- border for published / breadtrail / menu /tab divs --> ToDo \ No newline at end of file Index: lucene/site/build/site/skin/print.css =================================================================== --- lucene/site/build/site/skin/print.css (revision 1328746) +++ lucene/site/build/site/skin/print.css (working copy) @@ -1,54 +0,0 @@ -/* -* 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. -*/ -body { - font-family: Georgia, Palatino, serif; - font-size: 12pt; - background: white; -} - -#tabs, -#menu, -#content .toc { - display: none; -} - -#content { - width: auto; - padding: 0; - float: none !important; - color: black; - background: inherit; -} - -a:link, a:visited { - color: #336699; - background: inherit; - text-decoration: underline; -} - -#top .logo { - padding: 0; - margin: 0 0 2em 0; -} - -#footer { - margin-top: 4em; -} - -acronym { - border: 0; -} \ No newline at end of file Index: lucene/site/build/site/skin/CommonMessages_de.xml =================================================================== --- lucene/site/build/site/skin/CommonMessages_de.xml (revision 1328746) +++ lucene/site/build/site/skin/CommonMessages_de.xml (working copy) @@ -1,23 +0,0 @@ - - - - Schriftgrösse: - Zuletzt veröffentlicht: - Suche: - Suche auf der Seite mit - Index: lucene/site/build/site/skin/profile.css =================================================================== --- lucene/site/build/site/skin/profile.css (revision 1328746) +++ lucene/site/build/site/skin/profile.css (working copy) @@ -1,175 +0,0 @@ - - -/* ==================== aural ============================ */ - -@media aural { - h1, h2, h3, h4, h5, h6 { voice-family: paul, male; stress: 20; richness: 90 } - h1 { pitch: x-low; pitch-range: 90 } - h2 { pitch: x-low; pitch-range: 80 } - h3 { pitch: low; pitch-range: 70 } - h4 { pitch: medium; pitch-range: 60 } - h5 { pitch: medium; pitch-range: 50 } - h6 { pitch: medium; pitch-range: 40 } - li, dt, dd { pitch: medium; richness: 60 } - dt { stress: 80 } - pre, code, tt { pitch: medium; pitch-range: 0; stress: 0; richness: 80 } - em { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } - strong { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } - dfn { pitch: high; pitch-range: 60; stress: 60 } - s, strike { richness: 0 } - i { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } - b { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } - u { richness: 0 } - - :link { voice-family: harry, male } - :visited { voice-family: betty, female } - :active { voice-family: betty, female; pitch-range: 80; pitch: x-high } -} - -a.external { - padding: 0 20px 0px 0px; - display:inline; - background-repeat: no-repeat; - background-position: center right; - background-image: url(images/external-link.gif); -} - -#top { background-color: #FFFFFF;} - -#top .header .current { background-color: #4C6C8F;} -#top .header .current a:link { color: #ffffff; } -#top .header .current a:visited { color: #ffffff; } -#top .header .current a:hover { color: #ffffff; } - -#tabs li { background-color: #E5E4D9 ;} -#tabs li a:link { color: #000000; } -#tabs li a:visited { color: #000000; } -#tabs li a:hover { color: #000000; } - -#level2tabs a.selected { background-color: #4C6C8F ;} -#level2tabs a:link { color: #ffffff; } -#level2tabs a:visited { color: #ffffff; } -#level2tabs a:hover { color: #ffffff; } - -#level2tabs { background-color: #E5E4D9;} -#level2tabs a.unselected:link { color: #000000; } -#level2tabs a.unselected:visited { color: #000000; } -#level2tabs a.unselected:hover { color: #000000; } - -.heading { background-color: #E5E4D9;} - -.boxed { background-color: #E5E4D9;} -.underlined_5 {border-bottom: solid 5px #E5E4D9;} -.underlined_10 {border-bottom: solid 10px #E5E4D9;} -table caption { -background-color: #E5E4D9; -color: #000000; -} - -#feedback { -color: #FFFFFF; -background: #4C6C8F; -text-align: center; -} -#feedback #feedbackto { -color: #FFFFFF; -} - -#publishedStrip { -color: #FFFFFF; -background: #4C6C8F; -} - -#publishedStrip { -color: #000000; -background: #E5E4D9; -} - -#menu .menupagetitle { background-color: #CFDCED; - color: #000000;} - -#menu { border-color: #999999;} -#menu .menupagetitle { border-color: #999999;} -#menu .menupageitemgroup { border-color: #999999;} - -#menu { background-color: #4C6C8F;} -#menu { color: #ffffff;} -#menu a:link { color: #ffffff;} -#menu a:visited { color: #ffffff;} -#menu a:hover { -background-color: #4C6C8F; -color: #ffffff;} - -#menu h1 { -color: #000000; -background-color: #cfdced; -} - -#top .searchbox { -background-color: #E5E4D9 ; -color: #000000; -} - -#menu .menupageitemgroup { -background-color: #E5E4D9; -} -#menu .menupageitem { -color: #000000; -} -#menu .menupageitem a:link { color: #000000;} -#menu .menupageitem a:visited { color: #000000;} -#menu .menupageitem a:hover { -background-color: #E5E4D9; -color: #000000; -} - -body{ -background-color: #ffffff; -color: #000000; -} -a:link { color:#0000ff} -a:visited { color:#009999} -a:hover { color:#6587ff} - - -.ForrestTable { background-color: #ccc;} - -.ForrestTable td { background-color: #ffffff;} - -.highlight { background-color: #ffff00;} - -.fixme { border-color: #c60;} - -.note { border-color: #069;} - -.warning { border-color: #900;} - -.code { border-color: #a5b6c6;} - -#footer { background-color: #E5E4D9;} -/* extra-css */ - - p.quote { - margin-left: 2em; - padding: .5em; - background-color: #f0f0f0; - font-family: monospace; - } - img.float-right { - float: right; - margin-left: 2em; - padding: .5em; - } - - #footer a { color: #0F3660; } - #footer a:visited { color: #009999; } - - pre.code { - margin-left: 2em; - margin-right: 2em; - padding: 0.5em; - background-color: #f0f0f0; - } - - - \ No newline at end of file Index: lucene/site/build/site/skin/getBlank.js =================================================================== --- lucene/site/build/site/skin/getBlank.js (revision 1328746) +++ lucene/site/build/site/skin/getBlank.js (working copy) @@ -1,40 +0,0 @@ -/* -* 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. -*/ -/** - * getBlank script - when included in a html file and called from a form text field, will set the value of this field to "" - * if the text value is still the standard value. - * getPrompt script - when included in a html file and called from a form text field, will set the value of this field to the prompt - * if the text value is empty. - * - * Typical usage: - * - * - */ - Index: lucene/site/build/site/skin/breadcrumbs.js =================================================================== --- lucene/site/build/site/skin/breadcrumbs.js (revision 1328746) +++ lucene/site/build/site/skin/breadcrumbs.js (working copy) @@ -1,237 +0,0 @@ -/* -* 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 script, when included in a html file, builds a neat breadcrumb trail - * based on its url. That is, if it doesn't contains bugs (I'm relatively - * sure it does). - * - * Typical usage: - * - */ - -/** - * IE 5 on Mac doesn't know Array.push. - * - * Implement it - courtesy to fritz. - */ -var abc = new Array(); -if (!abc.push) { - Array.prototype.push = function(what){this[this.length]=what} -} - -/* ======================================================================== - CONSTANTS - ======================================================================== */ - -/** - * Two-dimensional array containing extra crumbs to place at the front of - * the trail. Specify first the name of the crumb, then the URI that belongs - * to it. You'll need to modify this for every domain or subdomain where - * you use this script (you can leave it as an empty array if you wish) - */ -var PREPREND_CRUMBS = new Array(); - -var link1 = "@skinconfig.trail.link1.name@"; -var link2 = "@skinconfig.trail.link2.name@"; -var link3 = "@skinconfig.trail.link3.name@"; - -var href1 = "@skinconfig.trail.link1.href@"; -var href2 = "@skinconfig.trail.link2.href@"; -var href3 = "@skinconfig.trail.link3.href@"; - - if(!(link1=="")&&!link1.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link1, href1 ) ); - } - if(!(link2=="")&&!link2.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link2, href2 ) ); - } - if(!(link3=="")&&!link3.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link3, href3 ) ); - } - -/** - * String to include between crumbs: - */ -var DISPLAY_SEPARATOR = " > "; -/** - * String to include at the beginning of the trail - */ -var DISPLAY_PREPREND = " > "; -/** - * String to include at the end of the trail - */ -var DISPLAY_POSTPREND = ""; - -/** - * CSS Class to use for a single crumb: - */ -var CSS_CLASS_CRUMB = "breadcrumb"; - -/** - * CSS Class to use for the complete trail: - */ -var CSS_CLASS_TRAIL = "breadcrumbTrail"; - -/** - * CSS Class to use for crumb separator: - */ -var CSS_CLASS_SEPARATOR = "crumbSeparator"; - -/** - * Array of strings containing common file extensions. We use this to - * determine what part of the url to ignore (if it contains one of the - * string specified here, we ignore it). - */ -var FILE_EXTENSIONS = new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" ); - -/** - * String that separates parts of the breadcrumb trail from each other. - * When this is no longer a slash, I'm sure I'll be old and grey. - */ -var PATH_SEPARATOR = "/"; - -/* ======================================================================== - UTILITY FUNCTIONS - ======================================================================== */ -/** - * Capitalize first letter of the provided string and return the modified - * string. - */ -function sentenceCase( string ) -{ return string; - //var lower = string.toLowerCase(); - //return lower.substr(0,1).toUpperCase() + lower.substr(1); -} - -/** - * Returns an array containing the names of all the directories in the - * current document URL - */ -function getDirectoriesInURL() -{ - var trail = document.location.pathname.split( PATH_SEPARATOR ); - - // check whether last section is a file or a directory - var lastcrumb = trail[trail.length-1]; - for( var i = 0; i < FILE_EXTENSIONS.length; i++ ) - { - if( lastcrumb.indexOf( FILE_EXTENSIONS[i] ) ) - { - // it is, remove it and send results - return trail.slice( 1, trail.length-1 ); - } - } - - // it's not; send the trail unmodified - return trail.slice( 1, trail.length ); -} - -/* ======================================================================== - BREADCRUMB FUNCTIONALITY - ======================================================================== */ -/** - * Return a two-dimensional array describing the breadcrumbs based on the - * array of directories passed in. - */ -function getBreadcrumbs( dirs ) -{ - var prefix = "/"; - var postfix = "/"; - - // the array we will return - var crumbs = new Array(); - - if( dirs != null ) - { - for( var i = 0; i < dirs.length; i++ ) - { - prefix += dirs[i] + postfix; - crumbs.push( new Array( dirs[i], prefix ) ); - } - } - - // preprend the PREPREND_CRUMBS - if(PREPREND_CRUMBS.length > 0 ) - { - return PREPREND_CRUMBS.concat( crumbs ); - } - - return crumbs; -} - -/** - * Return a string containing a simple text breadcrumb trail based on the - * two-dimensional array passed in. - */ -function getCrumbTrail( crumbs ) -{ - var xhtml = DISPLAY_PREPREND; - - for( var i = 0; i < crumbs.length; i++ ) - { - xhtml += ''; - xhtml += unescape( crumbs[i][0] ) + ''; - if( i != (crumbs.length-1) ) - { - xhtml += DISPLAY_SEPARATOR; - } - } - - xhtml += DISPLAY_POSTPREND; - - return xhtml; -} - -/** - * Return a string containing an XHTML breadcrumb trail based on the - * two-dimensional array passed in. - */ -function getCrumbTrailXHTML( crumbs ) -{ - var xhtml = ''; - xhtml += DISPLAY_PREPREND; - - for( var i = 0; i < crumbs.length; i++ ) - { - xhtml += ''; - xhtml += unescape( crumbs[i][0] ) + ''; - if( i != (crumbs.length-1) ) - { - xhtml += '' + DISPLAY_SEPARATOR + ''; - } - } - - xhtml += DISPLAY_POSTPREND; - xhtml += ''; - - return xhtml; -} - -/* ======================================================================== - PRINT BREADCRUMB TRAIL - ======================================================================== */ - -// check if we're local; if so, only print the PREPREND_CRUMBS -if( document.location.href.toLowerCase().indexOf( "http://" ) == -1 ) -{ - document.write( getCrumbTrail( getBreadcrumbs() ) ); -} -else -{ - document.write( getCrumbTrail( getBreadcrumbs( getDirectoriesInURL() ) ) ); -} - Index: lucene/site/build/site/skin/screen.css =================================================================== --- lucene/site/build/site/skin/screen.css (revision 1328746) +++ lucene/site/build/site/skin/screen.css (working copy) @@ -1,587 +0,0 @@ -/* -* 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. -*/ -body { margin: 0px 0px 0px 0px; font-family: Verdana, Helvetica, sans-serif; } - -h1 { font-size : 160%; margin: 0px 0px 0px 0px; padding: 0px; } -h2 { font-size : 140%; margin: 1em 0px 0.8em 0px; padding: 0px; font-weight : bold;} -h3 { font-size : 130%; margin: 0.8em 0px 0px 0px; padding: 0px; font-weight : bold; } -.h3 { margin: 22px 0px 3px 0px; } -h4 { font-size : 120%; margin: 0.7em 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } -.h4 { margin: 18px 0px 0px 0px; } -h4.faq { font-size : 120%; margin: 18px 0px 0px 0px; padding: 0px; font-weight : bold; text-align: left; } -h5 { font-size : 100%; margin: 14px 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } - -/** -* table -*/ -table .title { background-color: #000000; } -.ForrestTable { - color: #ffffff; - background-color: #7099C5; - width: 100%; - font-size : 100%; - empty-cells: show; -} -table caption { - padding-left: 5px; - color: white; - text-align: left; - font-weight: bold; - background-color: #000000; -} -.ForrestTable td { - color: black; - background-color: #f0f0ff; -} -.ForrestTable th { text-align: center; } -/** - * Page Header - */ - -#top { - position: relative; - float: left; - width: 100%; - background: #294563; /* if you want a background in the header, put it here */ -} - -#top .breadtrail { - background: #CFDCED; - color: black; - border-bottom: solid 1px white; - padding: 3px 10px; - font-size: 75%; -} -#top .breadtrail a { color: black; } - -#top .header { - float: left; - width: 100%; - background: url("images/header_white_line.gif") repeat-x bottom; -} - -#top .grouplogo { - padding: 7px 0 10px 10px; - float: left; - text-align: left; -} -#top .projectlogo { - padding: 7px 0 10px 10px; - float: left; - width: 33%; - text-align: right; -} -#top .projectlogoA1 { - padding: 7px 0 10px 10px; - float: right; -} -html>body #top .searchbox { - bottom: 0px; -} -#top .searchbox { - position: absolute; - right: 10px; - height: 42px; - font-size: 70%; - white-space: nowrap; - text-align: right; - color: white; - background-color: #000000; - z-index:0; - background-image: url(images/rc-t-l-5-1header-2searchbox-3searchbox.png); - background-repeat: no-repeat; - background-position: top left; - bottom: -1px; /* compensate for IE rendering issue */ -} - -#top .searchbox form { - padding: 5px 10px; - margin: 0; -} -#top .searchbox p { - padding: 0 0 2px 0; - margin: 0; -} -#top .searchbox input { - font-size: 100%; -} - -#tabs { - clear: both; - padding-left: 10px; - margin: 0; - list-style: none; -} -/* background: #CFDCED url("images/tab-right.gif") no-repeat right top;*/ -#tabs li { - float: left; - background-image: url(images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png); - background-repeat: no-repeat; - background-position: top right; - background-color: #000000; - margin: 0 3px 0 0; - padding: 0; -} - -/*background: url("images/tab-left.gif") no-repeat left top;*/ -#tabs li a { - float: left; - display: block; - font-family: verdana, arial, sans-serif; - text-decoration: none; - color: black; - white-space: nowrap; - background-image: url(images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png); - background-repeat: no-repeat; - background-position: top left; - padding: 5px 15px 4px; - width: .1em; /* IE/Win fix */ -} - -#tabs li a:hover { - - cursor: pointer; - text-decoration:underline; -} - -#tabs > li a { width: auto; } /* Rest of IE/Win fix */ - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -#tabs a { float: none; } -/* End IE5-Mac hack */ - -#top .header .current { - background-color: #4C6C8F; - background-image: url(images/rc-t-r-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top right; -} -#top .header .current a { - font-weight: bold; - padding-bottom: 5px; - color: white; - background-image: url(images/rc-t-l-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top left; -} -#publishedStrip { - padding-right: 10px; - padding-left: 20px; - padding-top: 3px; - padding-bottom:3px; - color: #ffffff; - font-size : 60%; - font-weight: bold; - background-color: #4C6C8F; - text-align:right; -} - -#level2tabs { -margin: 0; -float:left; -position:relative; - -} - - - -#level2tabs a:hover { - - cursor: pointer; - text-decoration:underline; - -} - -#level2tabs a{ - - cursor: pointer; - text-decoration:none; - background-image: url('images/chapter.gif'); - background-repeat: no-repeat; - background-position: center left; - padding-left: 6px; - margin-left: 6px; -} - -/* -* border-top: solid #4C6C8F 15px; -*/ -#main { - position: relative; - background: white; - clear:both; -} -#main .breadtrail { - clear:both; - position: relative; - background: #CFDCED; - color: black; - border-bottom: solid 1px black; - border-top: solid 1px black; - padding: 0px 180px; - font-size: 75%; - z-index:10; -} -/** -* Round corner -*/ -#roundtop { - background-image: url(images/rc-t-r-15-1body-2menu-3menu.png); - background-repeat: no-repeat; - background-position: top right; -} - -#roundbottom { - background-image: url(images/rc-b-r-15-1body-2menu-3menu.png); - background-repeat: no-repeat; - background-position: top right; -} - -img.corner { - width: 15px; - height: 15px; - border: none; - display: block !important; -} - -.roundtopsmall { - background-image: url(images/rc-t-r-5-1header-2searchbox-3searchbox.png); - background-repeat: no-repeat; - background-position: top right; -} - -#roundbottomsmall { - background-image: url(images/rc-b-r-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top right; -} - -img.cornersmall { - width: 5px; - height: 5px; - border: none; - display: block !important; -} -/** - * Side menu - */ -#menu a { font-weight: normal; text-decoration: none;} -#menu a:visited { font-weight: normal; } -#menu a:active { font-weight: normal; } -#menu a:hover { font-weight: normal; text-decoration:underline;} - -#menuarea { width:10em;} -#menu { - position: relative; - float: left; - width: 160px; - padding-top: 0px; - top:-18px; - left:10px; - z-index: 20; - background-color: #f90; - font-size : 70%; - -} - -.menutitle { - cursor:pointer; - padding: 3px 12px; - margin-left: 10px; - background-image: url('images/chapter.gif'); - background-repeat: no-repeat; - background-position: center left; - font-weight : bold; - - -} - -.menutitle:hover{text-decoration:underline;cursor: pointer;} - -#menu .menuitemgroup { - margin: 0px 0px 6px 8px; - padding: 0px; - font-weight : bold; } - -#menu .selectedmenuitemgroup{ - margin: 0px 0px 0px 8px; - padding: 0px; - font-weight : normal; - - } - -#menu .menuitem { - padding: 2px 0px 1px 13px; - background-image: url('images/page.gif'); - background-repeat: no-repeat; - background-position: center left; - font-weight : normal; - margin-left: 10px; -} - -#menu .menupage { - margin: 2px 0px 1px 10px; - padding: 0px 3px 0px 12px; - background-image: url('images/page.gif'); - background-repeat: no-repeat; - background-position: center left; - font-style : normal; -} -#menu .menupagetitle { - padding: 0px 0px 0px 1px; - font-style : normal; - border-style: solid; - border-width: 1px; - margin-right: 10px; - -} -#menu .menupageitemgroup { - padding: 3px 0px 4px 6px; - font-style : normal; - border-bottom: 1px solid ; - border-left: 1px solid ; - border-right: 1px solid ; - margin-right: 10px; -} -#menu .menupageitem { - font-style : normal; - font-weight : normal; - border-width: 0px; - font-size : 90%; -} -#menu #credit { - text-align: center; -} -#menu #credit2 { - text-align: center; - padding: 3px 3px 3px 3px; - background-color: #ffffff; -} -#menu .searchbox { - text-align: center; -} -#menu .searchbox form { - padding: 3px 3px; - margin: 0; -} -#menu .searchbox input { - font-size: 100%; -} - -#content { - padding: 20px 20px 20px 180px; - margin: 0; - font : small Verdana, Helvetica, sans-serif; - font-size : 80%; -} - -#content ul { - margin: 0; - padding: 0 25px; -} -#content li { - padding: 0 5px; -} -#feedback { - color: black; - background: #CFDCED; - text-align:center; - margin-top: 5px; -} -#feedback #feedbackto { - font-size: 90%; - color: black; -} -#footer { - clear: both; - position: relative; /* IE bugfix (http://www.dracos.co.uk/web/css/ie6floatbug/) */ - width: 100%; - background: #CFDCED; - border-top: solid 1px #4C6C8F; - color: black; -} -#footer .copyright { - position: relative; /* IE bugfix cont'd */ - padding: 5px; - margin: 0; - width: 45%; -} -#footer .lastmodified { - position: relative; /* IE bugfix cont'd */ - float: right; - width: 45%; - padding: 5px; - margin: 0; - text-align: right; -} -#footer a { color: white; } - -#footer #logos { - text-align: left; -} - - -/** - * Misc Styles - */ - -acronym { cursor: help; } -.boxed { background-color: #a5b6c6;} -.underlined_5 {border-bottom: solid 5px #4C6C8F;} -.underlined_10 {border-bottom: solid 10px #4C6C8F;} -/* ==================== snail trail ============================ */ - -.trail { - position: relative; /* IE bugfix cont'd */ - font-size: 70%; - text-align: right; - float: right; - margin: -10px 5px 0px 5px; - padding: 0; -} - -#motd-area { - position: relative; /* IE bugfix cont'd */ - float: right; - width: 35%; - background-color: #f0f0ff; - border-top: solid 1px #4C6C8F; - border-bottom: solid 1px #4C6C8F; - margin-bottom: 15px; - margin-left: 15px; - margin-right: 10%; - padding-bottom: 5px; - padding-top: 5px; -} - -#minitoc-area { - border-top: solid 1px #4C6C8F; - border-bottom: solid 1px #4C6C8F; - margin: 15px 10% 5px 15px; - /* margin-bottom: 15px; - margin-left: 15px; - margin-right: 10%;*/ - padding-bottom: 7px; - padding-top: 5px; -} -.minitoc { - list-style-image: url('images/current.gif'); - font-weight: normal; -} - -li p { - margin: 0; - padding: 0; -} - -.pdflink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.pdflink br { - margin-top: -10px; - padding-left: 1px; -} -.pdflink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.pdflink img { - display: block; - height: 16px; - width: 16px; -} -.xmllink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.xmllink br { - margin-top: -10px; - padding-left: 1px; -} -.xmllink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.xmllink img { - display: block; - height: 16px; - width: 16px; -} -.podlink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.podlink br { - margin-top: -10px; - padding-left: 1px; -} -.podlink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.podlink img { - display: block; - height: 16px; - width: 16px; -} - -.printlink { - position: relative; /* IE bugfix cont'd */ - float: right; -} -.printlink br { - margin-top: -10px; - padding-left: 1px; -} -.printlink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} -.printlink img { - display: block; - height: 16px; - width: 16px; -} - -p.instruction { - display: list-item; - list-style-image: url('../images/instruction_arrow.png'); - list-style-position: outside; - margin-left: 2em; -} \ No newline at end of file Index: lucene/site/build/site/skin/CommonMessages_es.xml =================================================================== --- lucene/site/build/site/skin/CommonMessages_es.xml (revision 1328746) +++ lucene/site/build/site/skin/CommonMessages_es.xml (working copy) @@ -1,23 +0,0 @@ - - - - Tamaño del texto: - Fecha de publicación: - Buscar - Buscar en - Index: lucene/site/build/site/skin/CommonMessages_fr.xml =================================================================== --- lucene/site/build/site/skin/CommonMessages_fr.xml (revision 1328746) +++ lucene/site/build/site/skin/CommonMessages_fr.xml (working copy) @@ -1,23 +0,0 @@ - - - - Taille : - Dernière publication : - Rechercher - Rechercher sur le site avec - Index: lucene/site/build/site/skin/breadcrumbs-optimized.js =================================================================== --- lucene/site/build/site/skin/breadcrumbs-optimized.js (revision 1328746) +++ lucene/site/build/site/skin/breadcrumbs-optimized.js (working copy) @@ -1,90 +0,0 @@ -/* -* 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. -*/ -var PREPREND_CRUMBS=new Array(); -var link1="@skinconfig.trail.link1.name@"; -var link2="@skinconfig.trail.link2.name@"; -var link3="@skinconfig.trail.link3.name@"; -if(!(link1=="")&&!link1.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link1, @skinconfig.trail.link1.href@ ) ); } -if(!(link2=="")&&!link2.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link2, @skinconfig.trail.link2.href@ ) ); } -if(!(link3=="")&&!link3.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link3, @skinconfig.trail.link3.href@ ) ); } -var DISPLAY_SEPARATOR=" > "; -var DISPLAY_PREPREND=" > "; -var DISPLAY_POSTPREND=":"; -var CSS_CLASS_CRUMB="breadcrumb"; -var CSS_CLASS_TRAIL="breadcrumbTrail"; -var CSS_CLASS_SEPARATOR="crumbSeparator"; -var FILE_EXTENSIONS=new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" ); -var PATH_SEPARATOR="/"; - -function sc(s) { - var l=s.toLowerCase(); - return l.substr(0,1).toUpperCase()+l.substr(1); -} -function getdirs() { - var t=document.location.pathname.split(PATH_SEPARATOR); - var lc=t[t.length-1]; - for(var i=0;i < FILE_EXTENSIONS.length;i++) - { - if(lc.indexOf(FILE_EXTENSIONS[i])) - return t.slice(1,t.length-1); } - return t.slice(1,t.length); -} -function getcrumbs( d ) -{ - var pre = "/"; - var post = "/"; - var c = new Array(); - if( d != null ) - { - for(var i=0;i < d.length;i++) { - pre+=d[i]+postfix; - c.push(new Array(d[i],pre)); } - } - if(PREPREND_CRUMBS.length > 0 ) - return PREPREND_CRUMBS.concat( c ); - return c; -} -function gettrail( c ) -{ - var h=DISPLAY_PREPREND; - for(var i=0;i < c.length;i++) - { - h+=''+sc(c[i][0])+''; - if(i!=(c.length-1)) - h+=DISPLAY_SEPARATOR; } - return h+DISPLAY_POSTPREND; -} - -function gettrailXHTML( c ) -{ - var h=''+DISPLAY_PREPREND; - for(var i=0;i < c.length;i++) - { - h+=''+sc(c[i][0])+''; - if(i!=(c.length-1)) - h+=''+DISPLAY_SEPARATOR+''; } - return h+DISPLAY_POSTPREND+''; -} - -if(document.location.href.toLowerCase().indexOf("http://")==-1) - document.write(gettrail(getcrumbs())); -else - document.write(gettrail(getcrumbs(getdirs()))); - Index: lucene/site/build/site/skin/CommonMessages_en_US.xml =================================================================== --- lucene/site/build/site/skin/CommonMessages_en_US.xml (revision 1328746) +++ lucene/site/build/site/skin/CommonMessages_en_US.xml (working copy) @@ -1,23 +0,0 @@ - - - - Font size: - Last Published: - Search - Search site with - Index: lucene/site/build/site/skin/basic.css =================================================================== --- lucene/site/build/site/skin/basic.css (revision 1328746) +++ lucene/site/build/site/skin/basic.css (working copy) @@ -1,166 +0,0 @@ -/* -* 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. -*/ -/** - * General - */ - -img { border: 0; } - -#content table { - border: 0; - width: 100%; -} -/*Hack to get IE to render the table at 100%*/ -* html #content table { margin-left: -3px; } - -#content th, -#content td { - margin: 0; - padding: 0; - vertical-align: top; -} - -.clearboth { - clear: both; -} - -.note, .warning, .fixme { - border: solid black 1px; - margin: 1em 3em; -} - -.note .label { - background: #369; - color: white; - font-weight: bold; - padding: 5px 10px; -} -.note .content { - background: #F0F0FF; - color: black; - line-height: 120%; - font-size: 90%; - padding: 5px 10px; -} -.warning .label { - background: #C00; - color: white; - font-weight: bold; - padding: 5px 10px; -} -.warning .content { - background: #FFF0F0; - color: black; - line-height: 120%; - font-size: 90%; - padding: 5px 10px; -} -.fixme .label { - background: #C6C600; - color: black; - font-weight: bold; - padding: 5px 10px; -} -.fixme .content { - padding: 5px 10px; -} - -/** - * Typography - */ - -body { - font-family: verdana, "Trebuchet MS", arial, helvetica, sans-serif; - font-size: 100%; -} - -#content { - font-family: Georgia, Palatino, Times, serif; - font-size: 95%; -} -#tabs { - font-size: 70%; -} -#menu { - font-size: 80%; -} -#footer { - font-size: 70%; -} - -h1, h2, h3, h4, h5, h6 { - font-family: "Trebuchet MS", verdana, arial, helvetica, sans-serif; - font-weight: bold; - margin-top: 1em; - margin-bottom: .5em; -} - -h1 { - margin-top: 0; - margin-bottom: 1em; - font-size: 1.4em; -} -#content h1 { - font-size: 160%; - margin-bottom: .5em; -} -#menu h1 { - margin: 0; - padding: 10px; - background: #336699; - color: white; -} -h2 { font-size: 120%; } -h3 { font-size: 100%; } -h4 { font-size: 90%; } -h5 { font-size: 80%; } -h6 { font-size: 75%; } - -p { - line-height: 120%; - text-align: left; - margin-top: .5em; - margin-bottom: 1em; -} - -#content li, -#content th, -#content td, -#content li ul, -#content li ol{ - margin-top: .5em; - margin-bottom: .5em; -} - - -#content li li, -#minitoc-area li{ - margin-top: 0em; - margin-bottom: 0em; -} - -#content .attribution { - text-align: right; - font-style: italic; - font-size: 85%; - margin-top: 1em; -} - -.codefrag { - font-family: "Courier New", Courier, monospace; - font-size: 110%; -} \ No newline at end of file Index: lucene/site/build/site/skin/fontsize.js =================================================================== --- lucene/site/build/site/skin/fontsize.js (revision 1328746) +++ lucene/site/build/site/skin/fontsize.js (working copy) @@ -1,166 +0,0 @@ -/* -* 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. -*/ -function init() -{ //embedded in the doc - //ndeSetTextSize(); -} - -function checkBrowser(){ - if (!document.getElementsByTagName){ - return true; - } - else{ - return false; - } -} - - -function ndeSetTextSize(chgsize,rs) -{ - var startSize; - var newSize; - - if (!checkBrowser) - { - return; - } - - startSize = parseInt(ndeGetDocTextSize()); - - if (!startSize) - { - startSize = 16; - } - - switch (chgsize) - { - case 'incr': - newSize = startSize + 2; - break; - - case 'decr': - newSize = startSize - 2; - break; - - case 'reset': - if (rs) {newSize = rs;} else {newSize = 16;} - break; - - default: - try{ - newSize = parseInt(ndeReadCookie("nde-textsize")); - } - catch(e){ - alert(e); - } - - if (!newSize || newSize == 'NaN') - { - newSize = startSize; - } - break; - - } - - if (newSize < 10) - { - newSize = 10; - } - - newSize += 'px'; - - document.getElementsByTagName('html')[0].style.fontSize = newSize; - document.getElementsByTagName('body')[0].style.fontSize = newSize; - - ndeCreateCookie("nde-textsize", newSize, 365); -} - -function ndeGetDocTextSize() -{ - if (!checkBrowser) - { - return 0; - } - - var size = 0; - var body = document.getElementsByTagName('body')[0]; - - if (body.style && body.style.fontSize) - { - size = body.style.fontSize; - } - else if (typeof(getComputedStyle) != 'undefined') - { - size = getComputedStyle(body,'').getPropertyValue('font-size'); - } - else if (body.currentStyle) - { - size = body.currentStyle.fontSize; - } - - //fix IE bug - if( isNaN(size)){ - if(size.substring(size.length-1)=="%"){ - return - } - - } - - return size; - -} - - - -function ndeCreateCookie(name,value,days) -{ - var cookie = name + "=" + value + ";"; - - if (days) - { - var date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - cookie += " expires=" + date.toGMTString() + ";"; - } - cookie += " path=/"; - - document.cookie = cookie; - -} - -function ndeReadCookie(name) -{ - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - - - for(var i = 0; i < ca.length; i++) - { - var c = ca[i]; - while (c.charAt(0) == ' ') - { - c = c.substring(1, c.length); - } - - ctest = c.substring(0,name.length); - - if(ctest == name){ - return c.substring(nameEQ.length,c.length); - } - } - return null; -} Index: lucene/site/build/site/skin/basic.css =================================================================== --- lucene/site/build/site/skin/basic.css (revision 1328746) +++ lucene/site/build/site/skin/basic.css (working copy) @@ -1,166 +0,0 @@ -/* -* 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. -*/ -/** - * General - */ - -img { border: 0; } - -#content table { - border: 0; - width: 100%; -} -/*Hack to get IE to render the table at 100%*/ -* html #content table { margin-left: -3px; } - -#content th, -#content td { - margin: 0; - padding: 0; - vertical-align: top; -} - -.clearboth { - clear: both; -} - -.note, .warning, .fixme { - border: solid black 1px; - margin: 1em 3em; -} - -.note .label { - background: #369; - color: white; - font-weight: bold; - padding: 5px 10px; -} -.note .content { - background: #F0F0FF; - color: black; - line-height: 120%; - font-size: 90%; - padding: 5px 10px; -} -.warning .label { - background: #C00; - color: white; - font-weight: bold; - padding: 5px 10px; -} -.warning .content { - background: #FFF0F0; - color: black; - line-height: 120%; - font-size: 90%; - padding: 5px 10px; -} -.fixme .label { - background: #C6C600; - color: black; - font-weight: bold; - padding: 5px 10px; -} -.fixme .content { - padding: 5px 10px; -} - -/** - * Typography - */ - -body { - font-family: verdana, "Trebuchet MS", arial, helvetica, sans-serif; - font-size: 100%; -} - -#content { - font-family: Georgia, Palatino, Times, serif; - font-size: 95%; -} -#tabs { - font-size: 70%; -} -#menu { - font-size: 80%; -} -#footer { - font-size: 70%; -} - -h1, h2, h3, h4, h5, h6 { - font-family: "Trebuchet MS", verdana, arial, helvetica, sans-serif; - font-weight: bold; - margin-top: 1em; - margin-bottom: .5em; -} - -h1 { - margin-top: 0; - margin-bottom: 1em; - font-size: 1.4em; -} -#content h1 { - font-size: 160%; - margin-bottom: .5em; -} -#menu h1 { - margin: 0; - padding: 10px; - background: #336699; - color: white; -} -h2 { font-size: 120%; } -h3 { font-size: 100%; } -h4 { font-size: 90%; } -h5 { font-size: 80%; } -h6 { font-size: 75%; } - -p { - line-height: 120%; - text-align: left; - margin-top: .5em; - margin-bottom: 1em; -} - -#content li, -#content th, -#content td, -#content li ul, -#content li ol{ - margin-top: .5em; - margin-bottom: .5em; -} - - -#content li li, -#minitoc-area li{ - margin-top: 0em; - margin-bottom: 0em; -} - -#content .attribution { - text-align: right; - font-style: italic; - font-size: 85%; - margin-top: 1em; -} - -.codefrag { - font-family: "Courier New", Courier, monospace; - font-size: 110%; -} \ No newline at end of file Index: lucene/site/build/site/skin/breadcrumbs-optimized.js =================================================================== --- lucene/site/build/site/skin/breadcrumbs-optimized.js (revision 1328746) +++ lucene/site/build/site/skin/breadcrumbs-optimized.js (working copy) @@ -1,90 +0,0 @@ -/* -* 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. -*/ -var PREPREND_CRUMBS=new Array(); -var link1="@skinconfig.trail.link1.name@"; -var link2="@skinconfig.trail.link2.name@"; -var link3="@skinconfig.trail.link3.name@"; -if(!(link1=="")&&!link1.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link1, @skinconfig.trail.link1.href@ ) ); } -if(!(link2=="")&&!link2.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link2, @skinconfig.trail.link2.href@ ) ); } -if(!(link3=="")&&!link3.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link3, @skinconfig.trail.link3.href@ ) ); } -var DISPLAY_SEPARATOR=" > "; -var DISPLAY_PREPREND=" > "; -var DISPLAY_POSTPREND=":"; -var CSS_CLASS_CRUMB="breadcrumb"; -var CSS_CLASS_TRAIL="breadcrumbTrail"; -var CSS_CLASS_SEPARATOR="crumbSeparator"; -var FILE_EXTENSIONS=new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" ); -var PATH_SEPARATOR="/"; - -function sc(s) { - var l=s.toLowerCase(); - return l.substr(0,1).toUpperCase()+l.substr(1); -} -function getdirs() { - var t=document.location.pathname.split(PATH_SEPARATOR); - var lc=t[t.length-1]; - for(var i=0;i < FILE_EXTENSIONS.length;i++) - { - if(lc.indexOf(FILE_EXTENSIONS[i])) - return t.slice(1,t.length-1); } - return t.slice(1,t.length); -} -function getcrumbs( d ) -{ - var pre = "/"; - var post = "/"; - var c = new Array(); - if( d != null ) - { - for(var i=0;i < d.length;i++) { - pre+=d[i]+postfix; - c.push(new Array(d[i],pre)); } - } - if(PREPREND_CRUMBS.length > 0 ) - return PREPREND_CRUMBS.concat( c ); - return c; -} -function gettrail( c ) -{ - var h=DISPLAY_PREPREND; - for(var i=0;i < c.length;i++) - { - h+=''+sc(c[i][0])+''; - if(i!=(c.length-1)) - h+=DISPLAY_SEPARATOR; } - return h+DISPLAY_POSTPREND; -} - -function gettrailXHTML( c ) -{ - var h=''+DISPLAY_PREPREND; - for(var i=0;i < c.length;i++) - { - h+=''+sc(c[i][0])+''; - if(i!=(c.length-1)) - h+=''+DISPLAY_SEPARATOR+''; } - return h+DISPLAY_POSTPREND+''; -} - -if(document.location.href.toLowerCase().indexOf("http://")==-1) - document.write(gettrail(getcrumbs())); -else - document.write(gettrail(getcrumbs(getdirs()))); - Index: lucene/site/build/site/skin/breadcrumbs.js =================================================================== --- lucene/site/build/site/skin/breadcrumbs.js (revision 1328746) +++ lucene/site/build/site/skin/breadcrumbs.js (working copy) @@ -1,237 +0,0 @@ -/* -* 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 script, when included in a html file, builds a neat breadcrumb trail - * based on its url. That is, if it doesn't contains bugs (I'm relatively - * sure it does). - * - * Typical usage: - * - */ - -/** - * IE 5 on Mac doesn't know Array.push. - * - * Implement it - courtesy to fritz. - */ -var abc = new Array(); -if (!abc.push) { - Array.prototype.push = function(what){this[this.length]=what} -} - -/* ======================================================================== - CONSTANTS - ======================================================================== */ - -/** - * Two-dimensional array containing extra crumbs to place at the front of - * the trail. Specify first the name of the crumb, then the URI that belongs - * to it. You'll need to modify this for every domain or subdomain where - * you use this script (you can leave it as an empty array if you wish) - */ -var PREPREND_CRUMBS = new Array(); - -var link1 = "@skinconfig.trail.link1.name@"; -var link2 = "@skinconfig.trail.link2.name@"; -var link3 = "@skinconfig.trail.link3.name@"; - -var href1 = "@skinconfig.trail.link1.href@"; -var href2 = "@skinconfig.trail.link2.href@"; -var href3 = "@skinconfig.trail.link3.href@"; - - if(!(link1=="")&&!link1.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link1, href1 ) ); - } - if(!(link2=="")&&!link2.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link2, href2 ) ); - } - if(!(link3=="")&&!link3.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link3, href3 ) ); - } - -/** - * String to include between crumbs: - */ -var DISPLAY_SEPARATOR = " > "; -/** - * String to include at the beginning of the trail - */ -var DISPLAY_PREPREND = " > "; -/** - * String to include at the end of the trail - */ -var DISPLAY_POSTPREND = ""; - -/** - * CSS Class to use for a single crumb: - */ -var CSS_CLASS_CRUMB = "breadcrumb"; - -/** - * CSS Class to use for the complete trail: - */ -var CSS_CLASS_TRAIL = "breadcrumbTrail"; - -/** - * CSS Class to use for crumb separator: - */ -var CSS_CLASS_SEPARATOR = "crumbSeparator"; - -/** - * Array of strings containing common file extensions. We use this to - * determine what part of the url to ignore (if it contains one of the - * string specified here, we ignore it). - */ -var FILE_EXTENSIONS = new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" ); - -/** - * String that separates parts of the breadcrumb trail from each other. - * When this is no longer a slash, I'm sure I'll be old and grey. - */ -var PATH_SEPARATOR = "/"; - -/* ======================================================================== - UTILITY FUNCTIONS - ======================================================================== */ -/** - * Capitalize first letter of the provided string and return the modified - * string. - */ -function sentenceCase( string ) -{ return string; - //var lower = string.toLowerCase(); - //return lower.substr(0,1).toUpperCase() + lower.substr(1); -} - -/** - * Returns an array containing the names of all the directories in the - * current document URL - */ -function getDirectoriesInURL() -{ - var trail = document.location.pathname.split( PATH_SEPARATOR ); - - // check whether last section is a file or a directory - var lastcrumb = trail[trail.length-1]; - for( var i = 0; i < FILE_EXTENSIONS.length; i++ ) - { - if( lastcrumb.indexOf( FILE_EXTENSIONS[i] ) ) - { - // it is, remove it and send results - return trail.slice( 1, trail.length-1 ); - } - } - - // it's not; send the trail unmodified - return trail.slice( 1, trail.length ); -} - -/* ======================================================================== - BREADCRUMB FUNCTIONALITY - ======================================================================== */ -/** - * Return a two-dimensional array describing the breadcrumbs based on the - * array of directories passed in. - */ -function getBreadcrumbs( dirs ) -{ - var prefix = "/"; - var postfix = "/"; - - // the array we will return - var crumbs = new Array(); - - if( dirs != null ) - { - for( var i = 0; i < dirs.length; i++ ) - { - prefix += dirs[i] + postfix; - crumbs.push( new Array( dirs[i], prefix ) ); - } - } - - // preprend the PREPREND_CRUMBS - if(PREPREND_CRUMBS.length > 0 ) - { - return PREPREND_CRUMBS.concat( crumbs ); - } - - return crumbs; -} - -/** - * Return a string containing a simple text breadcrumb trail based on the - * two-dimensional array passed in. - */ -function getCrumbTrail( crumbs ) -{ - var xhtml = DISPLAY_PREPREND; - - for( var i = 0; i < crumbs.length; i++ ) - { - xhtml += ''; - xhtml += unescape( crumbs[i][0] ) + ''; - if( i != (crumbs.length-1) ) - { - xhtml += DISPLAY_SEPARATOR; - } - } - - xhtml += DISPLAY_POSTPREND; - - return xhtml; -} - -/** - * Return a string containing an XHTML breadcrumb trail based on the - * two-dimensional array passed in. - */ -function getCrumbTrailXHTML( crumbs ) -{ - var xhtml = ''; - xhtml += DISPLAY_PREPREND; - - for( var i = 0; i < crumbs.length; i++ ) - { - xhtml += ''; - xhtml += unescape( crumbs[i][0] ) + ''; - if( i != (crumbs.length-1) ) - { - xhtml += '' + DISPLAY_SEPARATOR + ''; - } - } - - xhtml += DISPLAY_POSTPREND; - xhtml += ''; - - return xhtml; -} - -/* ======================================================================== - PRINT BREADCRUMB TRAIL - ======================================================================== */ - -// check if we're local; if so, only print the PREPREND_CRUMBS -if( document.location.href.toLowerCase().indexOf( "http://" ) == -1 ) -{ - document.write( getCrumbTrail( getBreadcrumbs() ) ); -} -else -{ - document.write( getCrumbTrail( getBreadcrumbs( getDirectoriesInURL() ) ) ); -} - Index: lucene/site/build/site/skin/CommonMessages_de.xml =================================================================== --- lucene/site/build/site/skin/CommonMessages_de.xml (revision 1328746) +++ lucene/site/build/site/skin/CommonMessages_de.xml (working copy) @@ -1,23 +0,0 @@ - - - - Schriftgrösse: - Zuletzt veröffentlicht: - Suche: - Suche auf der Seite mit - Index: lucene/site/build/site/skin/CommonMessages_en_US.xml =================================================================== --- lucene/site/build/site/skin/CommonMessages_en_US.xml (revision 1328746) +++ lucene/site/build/site/skin/CommonMessages_en_US.xml (working copy) @@ -1,23 +0,0 @@ - - - - Font size: - Last Published: - Search - Search site with - Index: lucene/site/build/site/skin/CommonMessages_es.xml =================================================================== --- lucene/site/build/site/skin/CommonMessages_es.xml (revision 1328746) +++ lucene/site/build/site/skin/CommonMessages_es.xml (working copy) @@ -1,23 +0,0 @@ - - - - Tamaño del texto: - Fecha de publicación: - Buscar - Buscar en - Index: lucene/site/build/site/skin/CommonMessages_fr.xml =================================================================== --- lucene/site/build/site/skin/CommonMessages_fr.xml (revision 1328746) +++ lucene/site/build/site/skin/CommonMessages_fr.xml (working copy) @@ -1,23 +0,0 @@ - - - - Taille : - Dernière publication : - Rechercher - Rechercher sur le site avec - Index: lucene/site/build/site/skin/fontsize.js =================================================================== --- lucene/site/build/site/skin/fontsize.js (revision 1328746) +++ lucene/site/build/site/skin/fontsize.js (working copy) @@ -1,166 +0,0 @@ -/* -* 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. -*/ -function init() -{ //embedded in the doc - //ndeSetTextSize(); -} - -function checkBrowser(){ - if (!document.getElementsByTagName){ - return true; - } - else{ - return false; - } -} - - -function ndeSetTextSize(chgsize,rs) -{ - var startSize; - var newSize; - - if (!checkBrowser) - { - return; - } - - startSize = parseInt(ndeGetDocTextSize()); - - if (!startSize) - { - startSize = 16; - } - - switch (chgsize) - { - case 'incr': - newSize = startSize + 2; - break; - - case 'decr': - newSize = startSize - 2; - break; - - case 'reset': - if (rs) {newSize = rs;} else {newSize = 16;} - break; - - default: - try{ - newSize = parseInt(ndeReadCookie("nde-textsize")); - } - catch(e){ - alert(e); - } - - if (!newSize || newSize == 'NaN') - { - newSize = startSize; - } - break; - - } - - if (newSize < 10) - { - newSize = 10; - } - - newSize += 'px'; - - document.getElementsByTagName('html')[0].style.fontSize = newSize; - document.getElementsByTagName('body')[0].style.fontSize = newSize; - - ndeCreateCookie("nde-textsize", newSize, 365); -} - -function ndeGetDocTextSize() -{ - if (!checkBrowser) - { - return 0; - } - - var size = 0; - var body = document.getElementsByTagName('body')[0]; - - if (body.style && body.style.fontSize) - { - size = body.style.fontSize; - } - else if (typeof(getComputedStyle) != 'undefined') - { - size = getComputedStyle(body,'').getPropertyValue('font-size'); - } - else if (body.currentStyle) - { - size = body.currentStyle.fontSize; - } - - //fix IE bug - if( isNaN(size)){ - if(size.substring(size.length-1)=="%"){ - return - } - - } - - return size; - -} - - - -function ndeCreateCookie(name,value,days) -{ - var cookie = name + "=" + value + ";"; - - if (days) - { - var date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - cookie += " expires=" + date.toGMTString() + ";"; - } - cookie += " path=/"; - - document.cookie = cookie; - -} - -function ndeReadCookie(name) -{ - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - - - for(var i = 0; i < ca.length; i++) - { - var c = ca[i]; - while (c.charAt(0) == ' ') - { - c = c.substring(1, c.length); - } - - ctest = c.substring(0,name.length); - - if(ctest == name){ - return c.substring(nameEQ.length,c.length); - } - } - return null; -} Index: lucene/site/build/site/skin/getBlank.js =================================================================== --- lucene/site/build/site/skin/getBlank.js (revision 1328746) +++ lucene/site/build/site/skin/getBlank.js (working copy) @@ -1,40 +0,0 @@ -/* -* 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. -*/ -/** - * getBlank script - when included in a html file and called from a form text field, will set the value of this field to "" - * if the text value is still the standard value. - * getPrompt script - when included in a html file and called from a form text field, will set the value of this field to the prompt - * if the text value is empty. - * - * Typical usage: - * - * - */ - Index: lucene/site/build/site/skin/getMenu.js =================================================================== --- lucene/site/build/site/skin/getMenu.js (revision 1328746) +++ lucene/site/build/site/skin/getMenu.js (working copy) @@ -1,45 +0,0 @@ -/* -* 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 script, when included in a html file, can be used to make collapsible menus - * - * Typical usage: - * - */ - -if (document.getElementById){ - document.write('') -} - - -function SwitchMenu(obj, thePath) -{ -var open = 'url("'+thePath + 'images/chapter_open.gif")'; -var close = 'url("'+thePath + 'images/chapter.gif")'; - if(document.getElementById) { - var el = document.getElementById(obj); - var title = document.getElementById(obj+'Title'); - - if(el.style.display != "block"){ - title.style.backgroundImage = open; - el.style.display = "block"; - }else{ - title.style.backgroundImage = close; - el.style.display = "none"; - } - }// end - if(document.getElementById) -}//end - function SwitchMenu(obj) Index: lucene/site/build/site/skin/images/page.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/chapter.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/apache-thanks.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/poddoc.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/vcss.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/update.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/pdfdoc.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/fix.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/built-with-forrest-button.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/add.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/rc-b-l-15-1body-2menu-3menu.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/valid-html401.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/corner-imports.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/corner-imports.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/corner-imports.svg.xslt (working copy) @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - 0 - - - - - - fill:; - - - fill:; - - - stroke:; - - - - - - - - - 1 - -1 - - - - - 1 - -1 - - - - - 0 - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/build/site/skin/images/remove.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/dc.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/dc.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/dc.svg.xslt (working copy) @@ -1,28 +0,0 @@ - - - - - - - - - - - - Index: lucene/site/build/site/skin/images/rc-b-r-15-1body-2menu-3menu.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/external-link.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/spacer.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/hack.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/current.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/printer.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/txtdoc.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/xmldoc.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/rss.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/rc.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/rc.svg.xslt (working copy) @@ -1,27 +0,0 @@ - - - - - - - - - - - Index: lucene/site/build/site/skin/images/txtdoc.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/txtdoc.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/txtdoc.svg.xslt (working copy) @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - TXT - - - Index: lucene/site/build/site/skin/images/poddoc.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/poddoc.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/poddoc.svg.xslt (working copy) @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - POD - - - Index: lucene/site/build/site/skin/images/rc-t-r-15-1body-2menu-3menu.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/built-with-cocoon.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/README.txt =================================================================== --- lucene/site/build/site/skin/images/README.txt (revision 1328746) +++ lucene/site/build/site/skin/images/README.txt (working copy) @@ -1 +0,0 @@ -The images in this directory are used if the current skin lacks them. Index: lucene/site/build/site/skin/images/forrest-credit-logo.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/add.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/apache-thanks.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/built-with-cocoon.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/built-with-forrest-button.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/chapter.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/corner-imports.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/corner-imports.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/corner-imports.svg.xslt (working copy) @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - 0 - - - - - - fill:; - - - fill:; - - - stroke:; - - - - - - - - - 1 - -1 - - - - - 1 - -1 - - - - - 0 - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/build/site/skin/images/current.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/dc.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/dc.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/dc.svg.xslt (working copy) @@ -1,28 +0,0 @@ - - - - - - - - - - - - Index: lucene/site/build/site/skin/images/external-link.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/fix.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/forrest-credit-logo.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/hack.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/page.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/pdfdoc.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/poddoc.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/poddoc.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/poddoc.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/poddoc.svg.xslt (working copy) @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - POD - - - Index: lucene/site/build/site/skin/images/printer.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/rc-b-l-15-1body-2menu-3menu.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-b-r-15-1body-2menu-3menu.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-r-15-1body-2menu-3menu.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/rc.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/rc.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/rc.svg.xslt (working copy) @@ -1,27 +0,0 @@ - - - - - - - - - - - Index: lucene/site/build/site/skin/images/README.txt =================================================================== --- lucene/site/build/site/skin/images/README.txt (revision 1328746) +++ lucene/site/build/site/skin/images/README.txt (working copy) @@ -1 +0,0 @@ -The images in this directory are used if the current skin lacks them. Index: lucene/site/build/site/skin/images/remove.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/rss.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/spacer.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/images/txtdoc.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/txtdoc.svg.xslt =================================================================== --- lucene/site/build/site/skin/images/txtdoc.svg.xslt (revision 1328746) +++ lucene/site/build/site/skin/images/txtdoc.svg.xslt (working copy) @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - TXT - - - Index: lucene/site/build/site/skin/images/update.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/jpeg Index: lucene/site/build/site/skin/images/valid-html401.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/vcss.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/build/site/skin/images/xmldoc.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/gif Index: lucene/site/build/site/skin/menu.js =================================================================== --- lucene/site/build/site/skin/menu.js (revision 1328746) +++ lucene/site/build/site/skin/menu.js (working copy) @@ -1,48 +0,0 @@ -/* -* 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 script, when included in a html file, can be used to make collapsible menus - * - * Typical usage: - * - */ - -if (document.getElementById){ - document.write('') -} - -function SwitchMenu(obj) -{ - if(document.getElementById) { - var el = document.getElementById(obj); - var title = document.getElementById(obj+'Title'); - - if(obj.indexOf("_selected_")==0&&el.style.display == ""){ - el.style.display = "block"; - title.className = "pagegroupselected"; - } - - if(el.style.display != "block"){ - el.style.display = "block"; - title.className = "pagegroupopen"; - } - else{ - el.style.display = "none"; - title.className = "pagegroup"; - } - }// end - if(document.getElementById) -}//end - function SwitchMenu(obj) Index: lucene/site/build/site/skin/note.txt =================================================================== --- lucene/site/build/site/skin/note.txt (revision 1328746) +++ lucene/site/build/site/skin/note.txt (working copy) @@ -1,50 +0,0 @@ -Notes for developer: - ---Legend------------------- -TODO -> blocker -DONE -> blocker -ToDo -> enhancement bug -done -> enhancement bug - ---Issues------------------- -- the corner images should be rendered through svg with the header color. --> DONE --> ToDo: get rid of the images and use only divs! - -- the menu points should be displayed "better". --> DONE --- Use the krysalis-site menu approach for the overall menu display. --> DONE --- Use the old lenya innermenu approch to further enhance the menu . --> DONE - -- the content area needs some attention. --> DONE --- introduce the heading scheme from krysalis () --> DONE --> ToDo: make box with round corners --> done: make underlined with variable border height --> ToDo: make underline with bottom round corner --- introduce the toc for each html-page --> DONE --- introduce the external-link-images. --> DONE - -- the publish note should be where now only a border is. -Like
    --> DONE -, but make it configurable. --> DONE -- footer needs some attention --> DONE --- the footer do not have the color profile! Enable it! --> DONE --- the footer should as well contain a feedback link. -See http://issues.apache.org/eyebrowse/ReadMsg?listName=forrest-user@xml.apache.org&msgNo=71 --> DONE - -- introduce credits alternativ location --> DONE - -- border for published / breadtrail / menu /tab divs --> ToDo \ No newline at end of file Index: lucene/site/build/site/skin/print.css =================================================================== --- lucene/site/build/site/skin/print.css (revision 1328746) +++ lucene/site/build/site/skin/print.css (working copy) @@ -1,54 +0,0 @@ -/* -* 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. -*/ -body { - font-family: Georgia, Palatino, serif; - font-size: 12pt; - background: white; -} - -#tabs, -#menu, -#content .toc { - display: none; -} - -#content { - width: auto; - padding: 0; - float: none !important; - color: black; - background: inherit; -} - -a:link, a:visited { - color: #336699; - background: inherit; - text-decoration: underline; -} - -#top .logo { - padding: 0; - margin: 0 0 2em 0; -} - -#footer { - margin-top: 4em; -} - -acronym { - border: 0; -} \ No newline at end of file Index: lucene/site/build/site/skin/profile.css =================================================================== --- lucene/site/build/site/skin/profile.css (revision 1328746) +++ lucene/site/build/site/skin/profile.css (working copy) @@ -1,175 +0,0 @@ - - -/* ==================== aural ============================ */ - -@media aural { - h1, h2, h3, h4, h5, h6 { voice-family: paul, male; stress: 20; richness: 90 } - h1 { pitch: x-low; pitch-range: 90 } - h2 { pitch: x-low; pitch-range: 80 } - h3 { pitch: low; pitch-range: 70 } - h4 { pitch: medium; pitch-range: 60 } - h5 { pitch: medium; pitch-range: 50 } - h6 { pitch: medium; pitch-range: 40 } - li, dt, dd { pitch: medium; richness: 60 } - dt { stress: 80 } - pre, code, tt { pitch: medium; pitch-range: 0; stress: 0; richness: 80 } - em { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } - strong { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } - dfn { pitch: high; pitch-range: 60; stress: 60 } - s, strike { richness: 0 } - i { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } - b { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } - u { richness: 0 } - - :link { voice-family: harry, male } - :visited { voice-family: betty, female } - :active { voice-family: betty, female; pitch-range: 80; pitch: x-high } -} - -a.external { - padding: 0 20px 0px 0px; - display:inline; - background-repeat: no-repeat; - background-position: center right; - background-image: url(images/external-link.gif); -} - -#top { background-color: #FFFFFF;} - -#top .header .current { background-color: #4C6C8F;} -#top .header .current a:link { color: #ffffff; } -#top .header .current a:visited { color: #ffffff; } -#top .header .current a:hover { color: #ffffff; } - -#tabs li { background-color: #E5E4D9 ;} -#tabs li a:link { color: #000000; } -#tabs li a:visited { color: #000000; } -#tabs li a:hover { color: #000000; } - -#level2tabs a.selected { background-color: #4C6C8F ;} -#level2tabs a:link { color: #ffffff; } -#level2tabs a:visited { color: #ffffff; } -#level2tabs a:hover { color: #ffffff; } - -#level2tabs { background-color: #E5E4D9;} -#level2tabs a.unselected:link { color: #000000; } -#level2tabs a.unselected:visited { color: #000000; } -#level2tabs a.unselected:hover { color: #000000; } - -.heading { background-color: #E5E4D9;} - -.boxed { background-color: #E5E4D9;} -.underlined_5 {border-bottom: solid 5px #E5E4D9;} -.underlined_10 {border-bottom: solid 10px #E5E4D9;} -table caption { -background-color: #E5E4D9; -color: #000000; -} - -#feedback { -color: #FFFFFF; -background: #4C6C8F; -text-align: center; -} -#feedback #feedbackto { -color: #FFFFFF; -} - -#publishedStrip { -color: #FFFFFF; -background: #4C6C8F; -} - -#publishedStrip { -color: #000000; -background: #E5E4D9; -} - -#menu .menupagetitle { background-color: #CFDCED; - color: #000000;} - -#menu { border-color: #999999;} -#menu .menupagetitle { border-color: #999999;} -#menu .menupageitemgroup { border-color: #999999;} - -#menu { background-color: #4C6C8F;} -#menu { color: #ffffff;} -#menu a:link { color: #ffffff;} -#menu a:visited { color: #ffffff;} -#menu a:hover { -background-color: #4C6C8F; -color: #ffffff;} - -#menu h1 { -color: #000000; -background-color: #cfdced; -} - -#top .searchbox { -background-color: #E5E4D9 ; -color: #000000; -} - -#menu .menupageitemgroup { -background-color: #E5E4D9; -} -#menu .menupageitem { -color: #000000; -} -#menu .menupageitem a:link { color: #000000;} -#menu .menupageitem a:visited { color: #000000;} -#menu .menupageitem a:hover { -background-color: #E5E4D9; -color: #000000; -} - -body{ -background-color: #ffffff; -color: #000000; -} -a:link { color:#0000ff} -a:visited { color:#009999} -a:hover { color:#6587ff} - - -.ForrestTable { background-color: #ccc;} - -.ForrestTable td { background-color: #ffffff;} - -.highlight { background-color: #ffff00;} - -.fixme { border-color: #c60;} - -.note { border-color: #069;} - -.warning { border-color: #900;} - -.code { border-color: #a5b6c6;} - -#footer { background-color: #E5E4D9;} -/* extra-css */ - - p.quote { - margin-left: 2em; - padding: .5em; - background-color: #f0f0f0; - font-family: monospace; - } - img.float-right { - float: right; - margin-left: 2em; - padding: .5em; - } - - #footer a { color: #0F3660; } - #footer a:visited { color: #009999; } - - pre.code { - margin-left: 2em; - margin-right: 2em; - padding: 0.5em; - background-color: #f0f0f0; - } - - - \ No newline at end of file Index: lucene/site/build/site/skin/prototype.js =================================================================== --- lucene/site/build/site/skin/prototype.js (revision 1328746) +++ lucene/site/build/site/skin/prototype.js (working copy) @@ -1,1257 +0,0 @@ -/* Prototype JavaScript framework, version 1.4.0_pre4 - * (c) 2005 Sam Stephenson - * - * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff - * against the source tree, available from the Prototype darcs repository. - * - * Prototype is freely distributable under the terms of an MIT-style license. - * - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.4.0_pre4', - - emptyFunction: function() {}, - K: function(x) {return x} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Function.prototype.bind = function(object) { - var __method = this; - return function() { - return __method.apply(object, arguments); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -} - -Number.prototype.toColorPart = function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; -} - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} - -if (!Array.prototype.push) { - Array.prototype.push = function() { - var startLength = this.length; - for (var i = 0; i < arguments.length; i++) - this[startLength + i] = arguments[i]; - return this.length; - } -} - -if (!Function.prototype.apply) { - // Based on code from http://www.youngpup.net/ - Function.prototype.apply = function(object, parameters) { - var parameterStrings = new Array(); - if (!object) object = window; - if (!parameters) parameters = new Array(); - - for (var i = 0; i < parameters.length; i++) - parameterStrings[i] = 'parameters[' + i + ']'; - - object.__apply__ = this; - var result = eval('object.__apply__(' + - parameterStrings.join(', ') + ')'); - object.__apply__ = null; - - return result; - } -} - -Object.extend(String.prototype, { - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0].nodeValue; - }, - - parseQuery: function() { - var str = this; - if (str.substring(0,1) == '?') { - str = this.substring(1); - } - var result = {}; - var pairs = str.split('&'); - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i].split('='); - result[pair[0]] = pair[1]; - } - return result; - } -}); - - -var _break = new Object(); -var _continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != _continue) throw e; - } - }); - } catch (e) { - if (e != _break) throw e; - } - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - if (!(result &= (iterator || Prototype.K)(value, index))) - throw _break; - }); - return result; - }, - - any: function(iterator) { - var result = true; - this.each(function(value, index) { - if (result &= (iterator || Prototype.K)(value, index)) - throw _break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function (iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw _break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw _break; - } - }); - return found; - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.collect(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.collect(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.collect(Prototype.K); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; - }); - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); - -$A = Array.from = function(iterable) { - var results = []; - for (var i = 0; i < iterable.length; i++) - results.push(iterable[i]); - return results; -} - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0; i < this.length; i++) - iterator(this[i]); - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - } -}); - -Object.extend(Array.prototype, Enumerable); - - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - } -} - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - Object.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - if (this.options.method == 'get') - url += '?' + parameters; - - this.transport.open(this.options.method, url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - - if (event == 'Complete') - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(this.transport); - - (this.options['on' + event] || Prototype.emptyFunction)(this.transport); - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = Prototype.emptyFunction; - } -}); - -Ajax.Updater = Class.create(); -Ajax.Updater.ScriptFragment = '(?:)((\n|.)*?)(?:<\/script>)'; - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function() { - this.updateContent(); - onComplete(this.transport); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - - var match = new RegExp(Ajax.Updater.ScriptFragment, 'img'); - var response = this.transport.responseText.replace(match, ''); - var scripts = this.transport.responseText.match(match); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - receiver.innerHTML = response; - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout((function() {this.onComplete( - this.transport)}).bind(this), 10); - } - - if (this.options.evalScripts && scripts) { - match = new RegExp(Ajax.Updater.ScriptFragment, 'im'); - setTimeout((function() { - for (var i = 0; i < scripts.length; i++) - eval(scripts[i].match(match)[1]); - }).bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = 1; - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Ajax.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); - -document.getElementsByClassName = function(className) { - var children = document.getElementsByTagName('*') || document.all; - var elements = new Array(); - - for (var i = 0; i < children.length; i++) { - var child = children[i]; - var classNames = child.className.split(' '); - for (var j = 0; j < classNames.length; j++) { - if (classNames[j] == className) { - elements.push(child); - break; - } - } - } - - return elements; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = - (element.style.display == 'none' ? '' : 'none'); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - hasClassName: function(element, className) { - element = $(element); - if (!element) - return; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] == className) - return true; - } - return false; - }, - - addClassName: function(element, className) { - element = $(element); - Element.removeClassName(element, className); - element.className += ' ' + className; - }, - - removeClassName: function(element, className) { - element = $(element); - if (!element) - return; - var newClassName = ''; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] != className) { - if (i > 0) - newClassName += ' '; - newClassName += a[i]; - } - } - element.className = newClassName; - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - var element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content; - - if (this.adjacency && this.element.insertAdjacentHTML) { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.fragment = this.range.createContextualFragment(this.content); - this.insertContent(); - } - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, this.element); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function() { - this.element.insertBefore(this.fragment, this.element.firstChild); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function() { - this.element.appendChild(this.fragment); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, - this.element.nextSibling); - } -}); - -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - $(element).focus(); - $(element).select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - var form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - var form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - focusFirstElement: function(form) { - var form = $(form); - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (element.type != 'hidden' && !element.disabled) { - Field.activate(element); - break; - } - } - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return encodeURIComponent(parameter[0]) + '=' + - encodeURIComponent(parameter[1]); - }, - - getValue: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - var value = ''; - if (element.type == 'select-one') { - var index = element.selectedIndex; - if (index >= 0) - value = element.options[index].value || element.options[index].text; - } else { - value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) - value.push(opt.value || opt.text); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - element.target = this; - element.prev_onclick = element.onclick || Prototype.emptyFunction; - element.onclick = function() { - this.prev_onclick(); - this.target.onElementEvent(); - } - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - element.target = this; - element.prev_onchange = element.onchange || Prototype.emptyFunction; - element.onchange = function() { - this.prev_onchange(); - this.target.onElementEvent(); - } - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - - -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - || element.attachEvent)) - name = 'keydown'; - - this._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } -}); - -/* prevent memory leaks in IE */ -Event.observe(window, 'unload', Event.unloadCache, false); - -var Position = { - - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - } -} Index: lucene/site/build/site/skin/screen.css =================================================================== --- lucene/site/build/site/skin/screen.css (revision 1328746) +++ lucene/site/build/site/skin/screen.css (working copy) @@ -1,587 +0,0 @@ -/* -* 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. -*/ -body { margin: 0px 0px 0px 0px; font-family: Verdana, Helvetica, sans-serif; } - -h1 { font-size : 160%; margin: 0px 0px 0px 0px; padding: 0px; } -h2 { font-size : 140%; margin: 1em 0px 0.8em 0px; padding: 0px; font-weight : bold;} -h3 { font-size : 130%; margin: 0.8em 0px 0px 0px; padding: 0px; font-weight : bold; } -.h3 { margin: 22px 0px 3px 0px; } -h4 { font-size : 120%; margin: 0.7em 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } -.h4 { margin: 18px 0px 0px 0px; } -h4.faq { font-size : 120%; margin: 18px 0px 0px 0px; padding: 0px; font-weight : bold; text-align: left; } -h5 { font-size : 100%; margin: 14px 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } - -/** -* table -*/ -table .title { background-color: #000000; } -.ForrestTable { - color: #ffffff; - background-color: #7099C5; - width: 100%; - font-size : 100%; - empty-cells: show; -} -table caption { - padding-left: 5px; - color: white; - text-align: left; - font-weight: bold; - background-color: #000000; -} -.ForrestTable td { - color: black; - background-color: #f0f0ff; -} -.ForrestTable th { text-align: center; } -/** - * Page Header - */ - -#top { - position: relative; - float: left; - width: 100%; - background: #294563; /* if you want a background in the header, put it here */ -} - -#top .breadtrail { - background: #CFDCED; - color: black; - border-bottom: solid 1px white; - padding: 3px 10px; - font-size: 75%; -} -#top .breadtrail a { color: black; } - -#top .header { - float: left; - width: 100%; - background: url("images/header_white_line.gif") repeat-x bottom; -} - -#top .grouplogo { - padding: 7px 0 10px 10px; - float: left; - text-align: left; -} -#top .projectlogo { - padding: 7px 0 10px 10px; - float: left; - width: 33%; - text-align: right; -} -#top .projectlogoA1 { - padding: 7px 0 10px 10px; - float: right; -} -html>body #top .searchbox { - bottom: 0px; -} -#top .searchbox { - position: absolute; - right: 10px; - height: 42px; - font-size: 70%; - white-space: nowrap; - text-align: right; - color: white; - background-color: #000000; - z-index:0; - background-image: url(images/rc-t-l-5-1header-2searchbox-3searchbox.png); - background-repeat: no-repeat; - background-position: top left; - bottom: -1px; /* compensate for IE rendering issue */ -} - -#top .searchbox form { - padding: 5px 10px; - margin: 0; -} -#top .searchbox p { - padding: 0 0 2px 0; - margin: 0; -} -#top .searchbox input { - font-size: 100%; -} - -#tabs { - clear: both; - padding-left: 10px; - margin: 0; - list-style: none; -} -/* background: #CFDCED url("images/tab-right.gif") no-repeat right top;*/ -#tabs li { - float: left; - background-image: url(images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png); - background-repeat: no-repeat; - background-position: top right; - background-color: #000000; - margin: 0 3px 0 0; - padding: 0; -} - -/*background: url("images/tab-left.gif") no-repeat left top;*/ -#tabs li a { - float: left; - display: block; - font-family: verdana, arial, sans-serif; - text-decoration: none; - color: black; - white-space: nowrap; - background-image: url(images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png); - background-repeat: no-repeat; - background-position: top left; - padding: 5px 15px 4px; - width: .1em; /* IE/Win fix */ -} - -#tabs li a:hover { - - cursor: pointer; - text-decoration:underline; -} - -#tabs > li a { width: auto; } /* Rest of IE/Win fix */ - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -#tabs a { float: none; } -/* End IE5-Mac hack */ - -#top .header .current { - background-color: #4C6C8F; - background-image: url(images/rc-t-r-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top right; -} -#top .header .current a { - font-weight: bold; - padding-bottom: 5px; - color: white; - background-image: url(images/rc-t-l-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top left; -} -#publishedStrip { - padding-right: 10px; - padding-left: 20px; - padding-top: 3px; - padding-bottom:3px; - color: #ffffff; - font-size : 60%; - font-weight: bold; - background-color: #4C6C8F; - text-align:right; -} - -#level2tabs { -margin: 0; -float:left; -position:relative; - -} - - - -#level2tabs a:hover { - - cursor: pointer; - text-decoration:underline; - -} - -#level2tabs a{ - - cursor: pointer; - text-decoration:none; - background-image: url('images/chapter.gif'); - background-repeat: no-repeat; - background-position: center left; - padding-left: 6px; - margin-left: 6px; -} - -/* -* border-top: solid #4C6C8F 15px; -*/ -#main { - position: relative; - background: white; - clear:both; -} -#main .breadtrail { - clear:both; - position: relative; - background: #CFDCED; - color: black; - border-bottom: solid 1px black; - border-top: solid 1px black; - padding: 0px 180px; - font-size: 75%; - z-index:10; -} -/** -* Round corner -*/ -#roundtop { - background-image: url(images/rc-t-r-15-1body-2menu-3menu.png); - background-repeat: no-repeat; - background-position: top right; -} - -#roundbottom { - background-image: url(images/rc-b-r-15-1body-2menu-3menu.png); - background-repeat: no-repeat; - background-position: top right; -} - -img.corner { - width: 15px; - height: 15px; - border: none; - display: block !important; -} - -.roundtopsmall { - background-image: url(images/rc-t-r-5-1header-2searchbox-3searchbox.png); - background-repeat: no-repeat; - background-position: top right; -} - -#roundbottomsmall { - background-image: url(images/rc-b-r-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top right; -} - -img.cornersmall { - width: 5px; - height: 5px; - border: none; - display: block !important; -} -/** - * Side menu - */ -#menu a { font-weight: normal; text-decoration: none;} -#menu a:visited { font-weight: normal; } -#menu a:active { font-weight: normal; } -#menu a:hover { font-weight: normal; text-decoration:underline;} - -#menuarea { width:10em;} -#menu { - position: relative; - float: left; - width: 160px; - padding-top: 0px; - top:-18px; - left:10px; - z-index: 20; - background-color: #f90; - font-size : 70%; - -} - -.menutitle { - cursor:pointer; - padding: 3px 12px; - margin-left: 10px; - background-image: url('images/chapter.gif'); - background-repeat: no-repeat; - background-position: center left; - font-weight : bold; - - -} - -.menutitle:hover{text-decoration:underline;cursor: pointer;} - -#menu .menuitemgroup { - margin: 0px 0px 6px 8px; - padding: 0px; - font-weight : bold; } - -#menu .selectedmenuitemgroup{ - margin: 0px 0px 0px 8px; - padding: 0px; - font-weight : normal; - - } - -#menu .menuitem { - padding: 2px 0px 1px 13px; - background-image: url('images/page.gif'); - background-repeat: no-repeat; - background-position: center left; - font-weight : normal; - margin-left: 10px; -} - -#menu .menupage { - margin: 2px 0px 1px 10px; - padding: 0px 3px 0px 12px; - background-image: url('images/page.gif'); - background-repeat: no-repeat; - background-position: center left; - font-style : normal; -} -#menu .menupagetitle { - padding: 0px 0px 0px 1px; - font-style : normal; - border-style: solid; - border-width: 1px; - margin-right: 10px; - -} -#menu .menupageitemgroup { - padding: 3px 0px 4px 6px; - font-style : normal; - border-bottom: 1px solid ; - border-left: 1px solid ; - border-right: 1px solid ; - margin-right: 10px; -} -#menu .menupageitem { - font-style : normal; - font-weight : normal; - border-width: 0px; - font-size : 90%; -} -#menu #credit { - text-align: center; -} -#menu #credit2 { - text-align: center; - padding: 3px 3px 3px 3px; - background-color: #ffffff; -} -#menu .searchbox { - text-align: center; -} -#menu .searchbox form { - padding: 3px 3px; - margin: 0; -} -#menu .searchbox input { - font-size: 100%; -} - -#content { - padding: 20px 20px 20px 180px; - margin: 0; - font : small Verdana, Helvetica, sans-serif; - font-size : 80%; -} - -#content ul { - margin: 0; - padding: 0 25px; -} -#content li { - padding: 0 5px; -} -#feedback { - color: black; - background: #CFDCED; - text-align:center; - margin-top: 5px; -} -#feedback #feedbackto { - font-size: 90%; - color: black; -} -#footer { - clear: both; - position: relative; /* IE bugfix (http://www.dracos.co.uk/web/css/ie6floatbug/) */ - width: 100%; - background: #CFDCED; - border-top: solid 1px #4C6C8F; - color: black; -} -#footer .copyright { - position: relative; /* IE bugfix cont'd */ - padding: 5px; - margin: 0; - width: 45%; -} -#footer .lastmodified { - position: relative; /* IE bugfix cont'd */ - float: right; - width: 45%; - padding: 5px; - margin: 0; - text-align: right; -} -#footer a { color: white; } - -#footer #logos { - text-align: left; -} - - -/** - * Misc Styles - */ - -acronym { cursor: help; } -.boxed { background-color: #a5b6c6;} -.underlined_5 {border-bottom: solid 5px #4C6C8F;} -.underlined_10 {border-bottom: solid 10px #4C6C8F;} -/* ==================== snail trail ============================ */ - -.trail { - position: relative; /* IE bugfix cont'd */ - font-size: 70%; - text-align: right; - float: right; - margin: -10px 5px 0px 5px; - padding: 0; -} - -#motd-area { - position: relative; /* IE bugfix cont'd */ - float: right; - width: 35%; - background-color: #f0f0ff; - border-top: solid 1px #4C6C8F; - border-bottom: solid 1px #4C6C8F; - margin-bottom: 15px; - margin-left: 15px; - margin-right: 10%; - padding-bottom: 5px; - padding-top: 5px; -} - -#minitoc-area { - border-top: solid 1px #4C6C8F; - border-bottom: solid 1px #4C6C8F; - margin: 15px 10% 5px 15px; - /* margin-bottom: 15px; - margin-left: 15px; - margin-right: 10%;*/ - padding-bottom: 7px; - padding-top: 5px; -} -.minitoc { - list-style-image: url('images/current.gif'); - font-weight: normal; -} - -li p { - margin: 0; - padding: 0; -} - -.pdflink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.pdflink br { - margin-top: -10px; - padding-left: 1px; -} -.pdflink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.pdflink img { - display: block; - height: 16px; - width: 16px; -} -.xmllink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.xmllink br { - margin-top: -10px; - padding-left: 1px; -} -.xmllink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.xmllink img { - display: block; - height: 16px; - width: 16px; -} -.podlink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.podlink br { - margin-top: -10px; - padding-left: 1px; -} -.podlink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.podlink img { - display: block; - height: 16px; - width: 16px; -} - -.printlink { - position: relative; /* IE bugfix cont'd */ - float: right; -} -.printlink br { - margin-top: -10px; - padding-left: 1px; -} -.printlink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} -.printlink img { - display: block; - height: 16px; - width: 16px; -} - -p.instruction { - display: list-item; - list-style-image: url('../images/instruction_arrow.png'); - list-style-position: outside; - margin-left: 2em; -} \ No newline at end of file Index: lucene/site/build/site/skin/skinconf.xsl =================================================================== --- lucene/site/build/site/skin/skinconf.xsl (revision 1328746) +++ lucene/site/build/site/skin/skinconf.xsl (working copy) @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/build/site/systemrequirements.html =================================================================== --- lucene/site/build/site/systemrequirements.html (revision 1328746) +++ lucene/site/build/site/systemrequirements.html (working copy) @@ -1,299 +0,0 @@ - - - - - - - -Apache Lucene - System Requirements - - - - - - - - - -
    - - - -
    - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    - -
    - -   -
    - - - - - -
    -

    Apache Lucene - System Requirements

    - - - - -

    System Requirements

    -
    -

    - Lucene Core has the following minimum requirements: -

      - -
    • Java 1.6.x or greater.
    • - -
    • ANT 1.7.0 or greater.
    • - -
    • CPU, Disk and Memory requirements are based on the many choices made in implementing Lucene (document size, number of documents, and number of hits retrieved to name a few.)
    • - -
    - -

    -

    Some modules may have other requirements, refer to their documentation and build files for information.

    -
    - - - -
    - -
     
    -
    - - - - Index: lucene/site/forrest.properties =================================================================== --- lucene/site/forrest.properties (revision 1328746) +++ lucene/site/forrest.properties (working copy) @@ -1,130 +0,0 @@ -# Copyright 2002-2005 The Apache Software Foundation or its licensors, -# as applicable. -# -# Licensed 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. - -############## -# Properties used by forrest.build.xml for building the website -# These are the defaults, un-comment them only if you need to change them. -############## - -# Prints out a summary of Forrest settings for this project -#forrest.echo=true - -# Project name (used to name .war file) -#project.name=my-project - -# Specifies name of Forrest skin to use -# See list at http://forrest.apache.org/docs/skins.html -project.skin=lucene - -# Descriptors for plugins and skins -# comma separated list, file:// is supported -#forrest.skins.descriptors=http://forrest.apache.org/skins/skins.xml,file:///c:/myskins/skins.xml -#forrest.plugins.descriptors=http://forrest.apache.org/plugins/plugins.xml,http://forrest.apache.org/plugins/whiteboard-plugins.xml - -############## -# behavioural properties -#project.menu-scheme=tab_attributes -#project.menu-scheme=directories - -############## -# layout properties - -# Properties that can be set to override the default locations -# -# Parent properties must be set. This usually means uncommenting -# project.content-dir if any other property using it is uncommented - -#project.status=status.xml -#project.content-dir=src/documentation -#project.raw-content-dir=${project.content-dir}/content -#project.conf-dir=${project.content-dir}/conf -#project.sitemap-dir=${project.content-dir} -#project.xdocs-dir=${project.content-dir}/content/xdocs -#project.resources-dir=${project.content-dir}/resources -#project.stylesheets-dir=${project.resources-dir}/stylesheets -#project.images-dir=${project.resources-dir}/images -#project.schema-dir=${project.resources-dir}/schema -#project.skins-dir=${project.content-dir}/skins -#project.skinconf=${project.content-dir}/skinconf.xml -#project.lib-dir=${project.content-dir}/lib -#project.classes-dir=${project.content-dir}/classes -#project.translations-dir=${project.content-dir}/translations -project.configfile=${project.home}/src/documentation/conf/cli.xconf - -############## -# validation properties - -# This set of properties determine if validation is performed -# Values are inherited unless overridden. -# e.g. if forrest.validate=false then all others are false unless set to true. -#forrest.validate=true -#forrest.validate.xdocs=${forrest.validate} -#forrest.validate.skinconf=${forrest.validate} -#forrest.validate.sitemap=${forrest.validate} -#forrest.validate.stylesheets=${forrest.validate} -#forrest.validate.skins=${forrest.validate} -#forrest.validate.skins.stylesheets=${forrest.validate.skins} - -# *.failonerror=(true|false) - stop when an XML file is invalid -#forrest.validate.failonerror=true - -# *.excludes=(pattern) - comma-separated list of path patterns to not validate -# e.g. -#forrest.validate.xdocs.excludes=samples/subdir/**, samples/faq.xml -#forrest.validate.xdocs.excludes= - - -############## -# General Forrest properties - -# The URL to start crawling from -#project.start-uri=linkmap.html - -# Set logging level for messages printed to the console -# (DEBUG, INFO, WARN, ERROR, FATAL_ERROR) -#project.debuglevel=ERROR - -# Max memory to allocate to Java -#forrest.maxmemory=64m - -# Any other arguments to pass to the JVM. For example, to run on an X-less -# server, set to -Djava.awt.headless=true -#forrest.jvmargs= - -# The bugtracking URL - the issue number will be appended -#project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id= -#project.bugtracking-url=http://issues.apache.org/jira/browse/ - -# The issues list as rss -#project.issues-rss-url= - -#I18n Property. Based on the locale request for the browser. -#If you want to use it for static site then modify the JVM system.language -# and run once per language -#project.i18n=true - -# The names of plugins that are required to build the project -# comma separated list (no spaces) -# You can request a specific version by appending "-VERSION" to the end of -# the plugin name. If you exclude a version number the latest released version -# will be used, however, be aware that this may be a development version. In -# a production environment it is recomended that you specify a known working -# version. -# Run "forrest available-plugins" for a list of plug-ins currently available -#project.required.plugins=org.apache.forrest.plugin.output.pdf - -# Proxy configuration -# proxy.host= -# proxy.port= Index: lucene/site/html/demo.html =================================================================== --- lucene/site/html/demo.html (revision 0) +++ lucene/site/html/demo.html (working copy) @@ -0,0 +1,72 @@ + + + +Apache Lucene - Building and Installing the Basic Demo + + +

    Apache Lucene - Building and Installing the Basic Demo

    + + +

    About this Document

    +
    +

    This document is intended as a "getting started" guide to using and running +the Lucene demos. It walks you through some basic installation and +configuration.

    +
    + +

    About the Demo

    +
    +

    The Lucene command-line demo code consists of an application that +demonstrates various functionalities of Lucene and how you can add Lucene to +your applications.

    +
    + +

    Setting your CLASSPATH

    +
    +

    First, you should download the latest +Lucene distribution and then extract it to a working directory.

    +

    You need three JARs: the Lucene JAR, the common analysis JAR, and the Lucene +demo JAR. You should see the Lucene JAR file in the core/ directory you created +when you extracted the archive -- it should be named something like +lucene-core-{version}.jar. You should also see +files called lucene-analyzers-common-{version}.jar and lucene-demo-{version}.jar under analysis/common/ and demo/, +respectively.

    +

    Put all three of these files in your Java CLASSPATH.

    +
    + +

    Indexing Files

    +
    +

    Once you've gotten this far you're probably itching to go. Let's build an +index! Assuming you've set your CLASSPATH correctly, just type:

    +
    +    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
    +
    +This will produce a subdirectory called index +which will contain an index of all of the Lucene source code. +

    To search the index type:

    +
    +    java org.apache.lucene.demo.SearchFiles
    +
    +You'll be prompted for a query. Type in a swear word and press the enter key. +You'll see that the Lucene developers are very well mannered and get no +results. Now try entering the word "string". That should return a whole bunch +of documents. The results will page at every tenth result and ask you whether +you want more results.
    + +

    About the code...

    + + + Index: lucene/site/html/demo.html =================================================================== --- lucene/site/html/demo.html (revision 0) +++ lucene/site/html/demo.html (working copy) Property changes on: lucene/site/html/demo.html ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Id Revision HeadURL \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: lucene/site/html/demo2.html =================================================================== --- lucene/site/html/demo2.html (revision 0) +++ lucene/site/html/demo2.html (working copy) @@ -0,0 +1,148 @@ + + + +Apache Lucene - Basic Demo Sources Walk-through + + +

    Apache Lucene - Basic Demo Sources Walk-through

    + + +

    About the Code

    +
    +

    In this section we walk through the sources behind the command-line Lucene +demo: where to find them, their parts and their function. This section is +intended for Java developers wishing to understand how to use Lucene in their +applications.

    +
    + +

    Location of the source

    +
    +

    NOTE: to examine the sources, you need to download and extract a source +checkout of Lucene: (lucene-{version}-src.zip).

    +

    Relative to the directory created when you extracted Lucene, you should see +a directory called lucene/demo/. This is the root +for the Lucene demo. Under this directory is src/java/org/apache/lucene/demo/. This is where all the Java +sources for the demo live.

    +

    Within this directory you should see the IndexFiles.java class we executed earlier. Bring it up in +vi or your editor of choice and let's take a look +at it.

    +
    + +

    IndexFiles

    +
    +

    As we discussed in the previous walk-through, the IndexFiles class creates +a Lucene Index. Let's take a look at how it does this.

    +

    The main() method parses the command-line +parameters, then in preparation for instantiating IndexWriter, opens a +Directory and +instantiates +StandardAnalyzer and IndexWriterConfig.

    +

    The value of the -index command-line parameter +is the name of the filesystem directory where all index information should be +stored. If IndexFiles is invoked with a relative +path given in the -index command-line parameter, +or if the -index command-line parameter is not +given, causing the default relative index path "index" to be used, the index path will be created as a +subdirectory of the current working directory (if it does not already exist). +On some platforms, the index path may be created in a different directory (such +as the user's home directory).

    +

    The -docs command-line parameter value is the +location of the directory containing files to be indexed.

    +

    The -update command-line parameter tells +IndexFiles not to delete the index if it already +exists. When -update is not given, IndexFiles will first wipe the slate clean before indexing +any documents.

    +

    Lucene Directorys are used by +the IndexWriter to store information in the +index. In addition to the FSDirectory +implementation we are using, there are several other Directory subclasses that can write to RAM, to databases, +etc.

    +

    Lucene Analyzers are +processing pipelines that break up text into indexed tokens, a.k.a. terms, and +optionally perform other operations on these tokens, e.g. downcasing, synonym +insertion, filtering out unwanted tokens, etc. The Analyzer we are using is StandardAnalyzer, which creates tokens using the Word Break +rules from the Unicode Text Segmentation algorithm specified in Unicode Standard Annex #29; converts +tokens to lowercase; and then filters out stopwords. Stopwords are common +language words such as articles (a, an, the, etc.) and other tokens that may +have less value for searching. It should be noted that there are different +rules for every language, and you should use the proper analyzer for each. +Lucene currently provides Analyzers for a number of different languages (see +the javadocs under lucene/analysis/common/src/java/org/apache/lucene/analysis).

    +

    The IndexWriterConfig instance holds all +configuration for IndexWriter. For example, we +set the OpenMode to use here based on the value +of the -update command-line parameter.

    +

    Looking further down in the file, after IndexWriter is instantiated, you should see the indexDocs() code. This recursive function crawls the +directories and creates Document objects. The +Document is simply a data object to represent the +text content from the file as well as its creation time and location. These +instances are added to the IndexWriter. If the +-update command-line parameter is given, the +IndexWriter OpenMode will be set to OpenMode.CREATE_OR_APPEND, and rather than adding documents +to the index, the IndexWriter will +update them in the index by attempting to find an +already-indexed document with the same identifier (in our case, the file path +serves as the identifier); deleting it from the index if it exists; and then +adding the new document to the index.

    +
    + +

    Searching Files

    +
    +

    The SearchFiles class is +quite simple. It primarily collaborates with an IndexSearcher, + +StandardAnalyzer (which is used in the IndexFiles class as well) +and a QueryParser. The +query parser is constructed with an analyzer used to interpret your query text +in the same way the documents are interpreted: finding word boundaries, +downcasing, and removing useless words like 'a', 'an' and 'the'. The Query object contains the +results from the QueryParser which +is passed to the searcher. Note that it's also possible to programmatically +construct a rich Query object without using +the query parser. The query parser just enables decoding the Lucene query syntax into the corresponding +Query object.

    +

    SearchFiles uses the IndexSearcher.search(query,n) method that returns TopDocs with max +n hits. The results are printed in pages, sorted +by score (i.e. relevance).

    +
    + + Index: lucene/site/html/demo2.html =================================================================== --- lucene/site/html/demo2.html (revision 0) +++ lucene/site/html/demo2.html (working copy) Property changes on: lucene/site/html/demo2.html ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Id Revision HeadURL \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: lucene/site/html/fileformats.html =================================================================== --- lucene/site/html/fileformats.html (revision 0) +++ lucene/site/html/fileformats.html (working copy) @@ -0,0 +1,1120 @@ + + + +Apache Lucene - Index File Formats + + + + +

    Apache Lucene - Index File Formats

    + + +

    Index File Formats

    +
    +

    This document defines the index file formats used in this version of Lucene. +If you are using a different version of Lucene, please consult the copy of +docs/fileformats.html that was distributed with +the version you are using.

    +

    Apache Lucene is written in Java, but several efforts are underway to write +versions of +Lucene in other programming languages. If these versions are to remain +compatible with Apache Lucene, then a language-independent definition of the +Lucene index format is required. This document thus attempts to provide a +complete and independent definition of the Apache Lucene file formats.

    +

    As Lucene evolves, this document should evolve. Versions of Lucene in +different programming languages should endeavor to agree on file formats, and +generate new versions of this document.

    +

    Compatibility notes are provided in this document, describing how file +formats have changed from prior versions.

    +

    In version 2.1, the file format was changed to allow lock-less commits (ie, +no more commit lock). The change is fully backwards compatible: you can open a +pre-2.1 index for searching or adding/deleting of docs. When the new segments +file is saved (committed), it will be written in the new file format (meaning +no specific "upgrade" process is needed). But note that once a commit has +occurred, pre-2.1 Lucene will not be able to read the index.

    +

    In version 2.3, the file format was changed to allow segments to share a +single set of doc store (vectors & stored fields) files. This allows for +faster indexing in certain cases. The change is fully backwards compatible (in +the same way as the lock-less commits change in 2.1).

    +

    In version 2.4, Strings are now written as true UTF-8 byte sequence, not +Java's modified UTF-8. See issue LUCENE-510 for details.

    +

    In version 2.9, an optional opaque Map<String,String> CommitUserData +may be passed to IndexWriter's commit methods (and later retrieved), which is +recorded in the segments_N file. See issue LUCENE-1382 for details. Also, +diagnostics were added to each segment written recording details about why it +was written (due to flush, merge; which OS/JRE was used; etc.). See issue +LUCENE-1654 for details.

    +

    In version 3.0, compressed fields are no longer written to the index (they +can still be read, but on merge the new segment will write them, uncompressed). +See issue LUCENE-1960 for details.

    +

    In version 3.1, segments records the code version that created them. See +LUCENE-2720 for details. Additionally segments track explicitly whether or not +they have term vectors. See LUCENE-2811 for details.

    +

    In version 3.2, numeric fields are written as natively to stored fields +file, previously they were stored in text format only.

    +

    In version 3.4, fields can omit position data while still indexing term +frequencies.

    +
    + +

    Definitions

    +
    +

    The fundamental concepts in Lucene are index, document, field and term.

    +

    An index contains a sequence of documents.

    +
      +
    • +

      A document is a sequence of fields.

      +
    • +
    • +

      A field is a named sequence of terms.

      +
    • +
    • A term is a string.
    • +
    +

    The same string in two different fields is considered a different term. Thus +terms are represented as a pair of strings, the first naming the field, and the +second naming text within the field.

    + +

    Inverted Indexing

    +

    The index stores statistics about terms in order to make term-based search +more efficient. Lucene's index falls into the family of indexes known as an +inverted index. This is because it can list, for a term, the documents +that contain it. This is the inverse of the natural relationship, in which +documents list terms.

    + +

    Types of Fields

    +

    In Lucene, fields may be stored, in which case their text is stored +in the index literally, in a non-inverted manner. Fields that are inverted are +called indexed. A field may be both stored and indexed.

    +

    The text of a field may be tokenized into terms to be indexed, or the +text of a field may be used literally as a term to be indexed. Most fields are +tokenized, but sometimes it is useful for certain identifier fields to be +indexed literally.

    +

    See the Field +java docs for more information on Fields.

    + +

    Segments

    +

    Lucene indexes may be composed of multiple sub-indexes, or segments. +Each segment is a fully independent index, which could be searched separately. +Indexes evolve by:

    +
      +
    1. +

      Creating new segments for newly added documents.

      +
    2. +
    3. +

      Merging existing segments.

      +
    4. +
    +

    Searches may involve multiple segments and/or multiple indexes, each index +potentially composed of a set of segments.

    + +

    Document Numbers

    +

    Internally, Lucene refers to documents by an integer document number. +The first document added to an index is numbered zero, and each subsequent +document added gets a number one greater than the previous.

    +


    +

    Note that a document's number may change, so caution should be taken when +storing these numbers outside of Lucene. In particular, numbers may change in +the following situations:

    +
      +
    • +

      The numbers stored in each segment are unique only within the segment, and +must be converted before they can be used in a larger context. The standard +technique is to allocate each segment a range of values, based on the range of +numbers used in that segment. To convert a document number from a segment to an +external value, the segment's base document number is added. To convert +an external value back to a segment-specific value, the segment is identified +by the range that the external value is in, and the segment's base value is +subtracted. For example two five document segments might be combined, so that +the first segment has a base value of zero, and the second of five. Document +three from the second segment would have an external value of eight.

      +
    • +
    • +

      When documents are deleted, gaps are created in the numbering. These are +eventually removed as the index evolves through merging. Deleted documents are +dropped when segments are merged. A freshly-merged segment thus has no gaps in +its numbering.

      +
    • +
    +
    + +

    Overview

    +
    +

    Each segment index maintains the following:

    +
      +
    • +

      Field names. This contains the set of field names used in the index.

      +
    • +
    • +

      Stored Field values. This contains, for each document, a list of +attribute-value pairs, where the attributes are field names. These are used to +store auxiliary information about the document, such as its title, url, or an +identifier to access a database. The set of stored fields are what is returned +for each hit when searching. This is keyed by document number.

      +
    • +
    • +

      Term dictionary. A dictionary containing all of the terms used in all of the +indexed fields of all of the documents. The dictionary also contains the number +of documents which contain the term, and pointers to the term's frequency and +proximity data.

      +
    • +
    • +

      Term Frequency data. For each term in the dictionary, the numbers of all the +documents that contain that term, and the frequency of the term in that +document, unless frequencies are omitted (IndexOptions.DOCS_ONLY)

      +
    • +
    • +

      Term Proximity data. For each term in the dictionary, the positions that the +term occurs in each document. Note that this will not exist if all fields in +all documents omit position data.

      +
    • +
    • +

      Normalization factors. For each field in each document, a value is stored +that is multiplied into the score for hits on that field.

      +
    • +
    • +

      Term Vectors. For each field in each document, the term vector (sometimes +called document vector) may be stored. A term vector consists of term text and +term frequency. To add Term Vectors to your index see the Field constructors

      +
    • +
    • +

      Deleted documents. An optional file indicating which documents are +deleted.

      +
    • +
    +

    Details on each of these are provided in subsequent sections.

    +
    + +

    File Naming

    +
    +

    All files belonging to a segment have the same name with varying extensions. +The extensions correspond to the different file formats described below. When +using the Compound File format (default in 1.4 and greater) these files are +collapsed into a single .cfs file (see below for details)

    +

    Typically, all segments in an index are stored in a single directory, +although this is not required.

    +

    As of version 2.1 (lock-less commits), file names are never re-used (there +is one exception, "segments.gen", see below). That is, when any file is saved +to the Directory it is given a never before used filename. This is achieved +using a simple generations approach. For example, the first segments file is +segments_1, then segments_2, etc. The generation is a sequential long integer +represented in alpha-numeric (base 36) form.

    +
    + +

    Summary of File Extensions

    +
    +

    The following table summarizes the names and extensions of the files in +Lucene:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameExtensionBrief Description
    Segments Filesegments.gen, segments_NStores information about segments
    Lock Filewrite.lockThe Write lock prevents multiple IndexWriters from writing to the same +file.
    Compound File.cfsAn optional "virtual" file consisting of all the other index files for +systems that frequently run out of file handles.
    Compound File Entry table.cfeThe "virtual" compound file's entry table holding all entries in the +corresponding .cfs file (Since 3.4)
    Fields.fnmStores information about the fields
    Field Index.fdxContains pointers to field data
    Field Data.fdtThe stored fields for documents
    Term Infos.tisPart of the term dictionary, stores term info
    Term Info Index.tiiThe index into the Term Infos file
    Frequencies.frqContains the list of docs which contain each term along with frequency
    Positions.prxStores position information about where a term occurs in the index
    Norms.nrmEncodes length and boost factors for docs and fields
    Term Vector Index.tvxStores offset into the document data file
    Term Vector Documents.tvdContains information about each document that has term vectors
    Term Vector Fields.tvfThe field level info about term vectors
    Deleted Documents.delInfo about what files are deleted
    +
    + +

    Primitive Types

    +
    +

    Byte

    +

    The most primitive type is an eight-bit byte. Files are accessed as +sequences of bytes. All other data types are defined as sequences of bytes, so +file formats are byte-order independent.

    + +

    UInt32

    +

    32-bit unsigned integers are written as four bytes, high-order bytes +first.

    +

    UInt32 --> <Byte>4

    + +

    Uint64

    +

    64-bit unsigned integers are written as eight bytes, high-order bytes +first.

    +

    UInt64 --> <Byte>8

    + +

    VInt

    +

    A variable-length format for positive integers is defined where the +high-order bit of each byte indicates whether more bytes remain to be read. The +low-order seven bits are appended as increasingly more significant bits in the +resulting integer value. Thus values from zero to 127 may be stored in a single +byte, values from 128 to 16,383 may be stored in two bytes, and so on.

    +

    VInt Encoding Example

    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    Value

    +
    +

    First byte

    +
    +

    Second byte

    +
    +

    Third byte

    +
    +

    0

    +
    +

    00000000

    +
    +


    +
    +


    +
    +

    1

    +
    +

    00000001

    +
    +


    +
    +


    +
    +

    2

    +
    +

    00000010

    +
    +


    +
    +


    +
    +

    ...

    +
    +


    +
    +


    +
    +


    +
    +

    127

    +
    +

    01111111

    +
    +


    +
    +


    +
    +

    128

    +
    +

    10000000

    +
    +

    00000001

    +
    +


    +
    +

    129

    +
    +

    10000001

    +
    +

    00000001

    +
    +


    +
    +

    130

    +
    +

    10000010

    +
    +

    00000001

    +
    +


    +
    +

    ...

    +
    +


    +
    +


    +
    +


    +
    +

    16,383

    +
    +

    11111111

    +
    +

    01111111

    +
    +


    +
    +

    16,384

    +
    +

    10000000

    +
    +

    10000000

    +
    +

    00000001

    +
    +

    16,385

    +
    +

    10000001

    +
    +

    10000000

    +
    +

    00000001

    +
    +

    ...

    +
    +


    +
    +


    +
    +


    +
    +

    This provides compression while still being efficient to decode.

    + +

    Chars

    +

    Lucene writes unicode character sequences as UTF-8 encoded bytes.

    + +

    String

    +

    Lucene writes strings as UTF-8 encoded bytes. First the length, in bytes, is +written as a VInt, followed by the bytes.

    +

    String --> VInt, Chars

    +
    + +

    Compound Types

    +
    +

    Map<String,String>

    +

    In a couple places Lucene stores a Map String->String.

    +

    Map<String,String> --> +Count<String,String>Count

    +
    + +

    Per-Index Files

    +
    +

    The files in this section exist one-per-index.

    + +

    Segments File

    +

    The active segments in the index are stored in the segment info file, +segments_N. There may be one or more segments_N files in the +index; however, the one with the largest generation is the active one (when +older segments_N files are present it's because they temporarily cannot be +deleted, or, a writer is in the process of committing, or a custom IndexDeletionPolicy +is in use). This file lists each segment by name, has details about the +separate norms and deletion files, and also contains the size of each +segment.

    +

    As of 2.1, there is also a file segments.gen. This file contains +the current generation (the _N in segments_N) of the index. +This is used only as a fallback in case the current generation cannot be +accurately determined by directory listing alone (as is the case for some NFS +clients with time-based directory cache expiraation). This file simply contains +an Int32 version header (SegmentInfos.FORMAT_LOCKLESS = -2), followed by the +generation recorded as Int64, written twice.

    +

    3.1 Segments --> Format, Version, NameCounter, SegCount, +<SegVersion, SegName, SegSize, DelGen, DocStoreOffset, [DocStoreSegment, +DocStoreIsCompoundFile], HasSingleNormFile, NumField, +NormGenNumField, IsCompoundFile, DeletionCount, HasProx, +Diagnostics, HasVectors>SegCount, CommitUserData, Checksum

    +

    Format, NameCounter, SegCount, SegSize, NumField, DocStoreOffset, +DeletionCount --> Int32

    +

    Version, DelGen, NormGen, Checksum --> Int64

    +

    SegVersion, SegName, DocStoreSegment --> String

    +

    Diagnostics --> Map<String,String>

    +

    IsCompoundFile, HasSingleNormFile, DocStoreIsCompoundFile, HasProx, +HasVectors --> Int8

    +

    CommitUserData --> Map<String,String>

    +

    Format is -9 (SegmentInfos.FORMAT_DIAGNOSTICS).

    +

    Version counts how often the index has been changed by adding or deleting +documents.

    +

    NameCounter is used to generate names for new segment files.

    +

    SegVersion is the code version that created the segment.

    +

    SegName is the name of the segment, and is used as the file name prefix for +all of the files that compose the segment's index.

    +

    SegSize is the number of documents contained in the segment index.

    +

    DelGen is the generation count of the separate deletes file. If this is -1, +there are no separate deletes. If it is 0, this is a pre-2.1 segment and you +must check filesystem for the existence of _X.del. Anything above zero means +there are separate deletes (_X_N.del).

    +

    NumField is the size of the array for NormGen, or -1 if there are no +NormGens stored.

    +

    NormGen records the generation of the separate norms files. If NumField is +-1, there are no normGens stored and they are all assumed to be 0 when the +segment file was written pre-2.1 and all assumed to be -1 when the segments +file is 2.1 or above. The generation then has the same meaning as delGen +(above).

    +

    IsCompoundFile records whether the segment is written as a compound file or +not. If this is -1, the segment is not a compound file. If it is 1, the segment +is a compound file. Else it is 0, which means we check filesystem to see if +_X.cfs exists.

    +

    If HasSingleNormFile is 1, then the field norms are written as a single +joined file (with extension .nrm); if it is 0 then each field's norms +are stored as separate .fN files. See "Normalization Factors" below +for details.

    +

    DocStoreOffset, DocStoreSegment, DocStoreIsCompoundFile: If DocStoreOffset +is -1, this segment has its own doc store (stored fields values and term +vectors) files and DocStoreSegment and DocStoreIsCompoundFile are not stored. +In this case all files for stored field values (*.fdt and +*.fdx) and term vectors (*.tvf, *.tvd and +*.tvx) will be stored with this segment. Otherwise, DocStoreSegment is +the name of the segment that has the shared doc store files; +DocStoreIsCompoundFile is 1 if that segment is stored in compound file format +(as a .cfx file); and DocStoreOffset is the starting document in the +shared doc store files where this segment's documents begin. In this case, this +segment does not store its own doc store files but instead shares a single set +of these files with other segments.

    +

    Checksum contains the CRC32 checksum of all bytes in the segments_N file up +until the checksum. This is used to verify integrity of the file on opening the +index.

    +

    DeletionCount records the number of deleted documents in this segment.

    +

    HasProx is 1 if any fields in this segment have position data +(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS); else, it's 0.

    +

    CommitUserData stores an optional user-supplied opaque +Map<String,String> that was passed to IndexWriter's commit or +prepareCommit, or IndexReader's flush methods.

    +

    The Diagnostics Map is privately written by IndexWriter, as a debugging aid, +for each segment it creates. It includes metadata like the current Lucene +version, OS, Java version, why the segment was created (merge, flush, +addIndexes), etc.

    +

    HasVectors is 1 if this segment stores term vectors, else it's 0.

    + +

    Lock File

    +

    The write lock, which is stored in the index directory by default, is named +"write.lock". If the lock directory is different from the index directory then +the write lock will be named "XXXX-write.lock" where XXXX is a unique prefix +derived from the full path to the index directory. When this file is present, a +writer is currently modifying the index (adding or removing documents). This +lock file ensures that only one writer is modifying the index at a time.

    + +

    Deletable File

    +

    A writer dynamically computes the files that are deletable, instead, so no +file is written.

    + +

    Compound Files

    +

    Starting with Lucene 1.4 the compound file format became default. This is +simply a container for all files described in the next section (except for the +.del file).

    +

    Compound Entry Table (.cfe) --> Version, FileCount, <FileName, +DataOffset, DataLength> FileCount

    +

    Compound (.cfs) --> FileData FileCount

    +

    Version --> Int

    +

    FileCount --> VInt

    +

    DataOffset --> Long

    +

    DataLength --> Long

    +

    FileName --> String

    +

    FileData --> raw file data

    +

    The raw file data is the data from the individual files named above.

    +

    Starting with Lucene 2.3, doc store files (stored field values and term +vectors) can be shared in a single set of files for more than one segment. When +compound file is enabled, these shared files will be added into a single +compound file (same format as above) but with the extension .cfx.

    +
    + +

    Per-Segment Files

    +
    +

    The remaining files are all per-segment, and are thus defined by suffix.

    + +

    Fields

    +


    +Field Info

    +

    Field names are stored in the field info file, with suffix .fnm.

    +

    FieldInfos (.fnm) --> FNMVersion,FieldsCount, <FieldName, +FieldBits> FieldsCount

    +

    FNMVersion, FieldsCount --> VInt

    +

    FieldName --> String

    +

    FieldBits --> Byte

    +
      +
    • The low-order bit is one for indexed fields, and zero for non-indexed +fields.
    • +
    • The second lowest-order bit is one for fields that have term vectors +stored, and zero for fields without term vectors.
    • +
    • If the fifth lowest-order bit is set (0x10), norms are omitted for the +indexed field.
    • +
    • If the sixth lowest-order bit is set (0x20), payloads are stored for the +indexed field.
    • +
    • If the seventh lowest-order bit is set (0x40), term frequencies and +positions omitted for the indexed field.
    • +
    • If the eighth lowest-order bit is set (0x80), positions are omitted for the +indexed field.
    • +
    +

    FNMVersion (added in 2.9) is -2 for indexes from 2.9 - 3.3. It is -3 for +indexes in Lucene 3.4+

    +

    Fields are numbered by their order in this file. Thus field zero is the +first field in the file, field one the next, and so on. Note that, like +document numbers, field numbers are segment relative.

    +


    +Stored Fields

    +

    Stored fields are represented by two files:

    +
      +
    1. +

      The field index, or .fdx file.

      +

      This contains, for each document, a pointer to its field data, as +follows:

      +

      FieldIndex (.fdx) --> <FieldValuesPosition> SegSize

      +

      FieldValuesPosition --> Uint64

      +

      This is used to find the location within the field data file of the fields +of a particular document. Because it contains fixed-length data, this file may +be easily randomly accessed. The position of document n 's field data is +the Uint64 at n*8 in this file.

      +
    2. +
    3. +

      The field data, or .fdt file.

      +

      This contains the stored fields of each document, as follows:

      +

      FieldData (.fdt) --> <DocFieldData> SegSize

      +

      DocFieldData --> FieldCount, <FieldNum, Bits, Value> +FieldCount

      +

      FieldCount --> VInt

      +

      FieldNum --> VInt

      +

      Bits --> Byte

      +
        +
      • low order bit is one for tokenized fields
      • +
      • second bit is one for fields containing binary data
      • +
      • third bit is one for fields with compression option enabled (if compression +is enabled, the algorithm used is ZLIB), only available for indexes until +Lucene version 2.9.x
      • +
      • 4th to 6th bit (mask: 0x7<<3) define the type of a numeric field: +
          +
        • all bits in mask are cleared if no numeric field at all
        • +
        • 1<<3: Value is Int
        • +
        • 2<<3: Value is Long
        • +
        • 3<<3: Value is Int as Float (as of Float.intBitsToFloat)
        • +
        • 4<<3: Value is Long as Double (as of Double.longBitsToDouble)
        • +
        +
      • +
      +

      Value --> String | BinaryValue | Int | Long (depending on Bits)

      +

      BinaryValue --> ValueSize, <Byte>^ValueSize

      +

      ValueSize --> VInt

      +
    4. +
    + +

    Term Dictionary

    +

    The term dictionary is represented as two files:

    +
      +
    1. +

      The term infos, or tis file.

      +

      TermInfoFile (.tis)--> TIVersion, TermCount, IndexInterval, SkipInterval, +MaxSkipLevels, TermInfos

      +

      TIVersion --> UInt32

      +

      TermCount --> UInt64

      +

      IndexInterval --> UInt32

      +

      SkipInterval --> UInt32

      +

      MaxSkipLevels --> UInt32

      +

      TermInfos --> <TermInfo> TermCount

      +

      TermInfo --> <Term, DocFreq, FreqDelta, ProxDelta, SkipDelta>

      +

      Term --> <PrefixLength, Suffix, FieldNum>

      +

      Suffix --> String

      +

      PrefixLength, DocFreq, FreqDelta, ProxDelta, SkipDelta
      +--> VInt

      +

      This file is sorted by Term. Terms are ordered first lexicographically (by +UTF16 character code) by the term's field name, and within that +lexicographically (by UTF16 character code) by the term's text.

      +

      TIVersion names the version of the format of this file and is equal to +TermInfosWriter.FORMAT_CURRENT.

      +

      Term text prefixes are shared. The PrefixLength is the number of initial +characters from the previous term which must be pre-pended to a term's suffix +in order to form the term's text. Thus, if the previous term's text was "bone" +and the term is "boy", the PrefixLength is two and the suffix is "y".

      +

      FieldNumber determines the term's field, whose name is stored in the .fdt +file.

      +

      DocFreq is the count of documents which contain the term.

      +

      FreqDelta determines the position of this term's TermFreqs within the .frq +file. In particular, it is the difference between the position of this term's +data in that file and the position of the previous term's data (or zero, for +the first term in the file).

      +

      ProxDelta determines the position of this term's TermPositions within the +.prx file. In particular, it is the difference between the position of this +term's data in that file and the position of the previous term's data (or zero, +for the first term in the file. For fields that omit position data, this will +be 0 since prox information is not stored.

      +

      SkipDelta determines the position of this term's SkipData within the .frq +file. In particular, it is the number of bytes after TermFreqs that the +SkipData starts. In other words, it is the length of the TermFreq data. +SkipDelta is only stored if DocFreq is not smaller than SkipInterval.

      +
    2. +
    3. +

      The term info index, or .tii file.

      +

      This contains every IndexInterval th entry from the .tis file, +along with its location in the "tis" file. This is designed to be read entirely +into memory and used to provide random access to the "tis" file.

      +

      The structure of this file is very similar to the .tis file, with the +addition of one item per record, the IndexDelta.

      +

      TermInfoIndex (.tii)--> TIVersion, IndexTermCount, IndexInterval, +SkipInterval, MaxSkipLevels, TermIndices

      +

      TIVersion --> UInt32

      +

      IndexTermCount --> UInt64

      +

      IndexInterval --> UInt32

      +

      SkipInterval --> UInt32

      +

      TermIndices --> <TermInfo, IndexDelta> +IndexTermCount

      +

      IndexDelta --> VLong

      +

      IndexDelta determines the position of this term's TermInfo within the .tis +file. In particular, it is the difference between the position of this term's +entry in that file and the position of the previous term's entry.

      +

      SkipInterval is the fraction of TermDocs stored in skip tables. It is used +to accelerate TermDocs.skipTo(int). Larger values result in smaller indexes, +greater acceleration, but fewer accelerable cases, while smaller values result +in bigger indexes, less acceleration (in case of a small value for +MaxSkipLevels) and more accelerable cases.

      +

      MaxSkipLevels is the max. number of skip levels stored for each term in the +.frq file. A low value results in smaller indexes but less acceleration, a +larger value results in slighly larger indexes but greater acceleration. See +format of .frq file for more information about skip levels.

      +
    4. +
    + +

    Frequencies

    +

    The .frq file contains the lists of documents which contain each term, along +with the frequency of the term in that document (except when frequencies are +omitted: IndexOptions.DOCS_ONLY).

    +

    FreqFile (.frq) --> <TermFreqs, SkipData> TermCount

    +

    TermFreqs --> <TermFreq> DocFreq

    +

    TermFreq --> DocDelta[, Freq?]

    +

    SkipData --> <<SkipLevelLength, SkipLevel> +NumSkipLevels-1, SkipLevel> <SkipDatum>

    +

    SkipLevel --> <SkipDatum> DocFreq/(SkipInterval^(Level + +1))

    +

    SkipDatum --> +DocSkip,PayloadLength?,FreqSkip,ProxSkip,SkipChildLevelPointer?

    +

    DocDelta,Freq,DocSkip,PayloadLength,FreqSkip,ProxSkip --> VInt

    +

    SkipChildLevelPointer --> VLong

    +

    TermFreqs are ordered by term (the term is implicit, from the .tis +file).

    +

    TermFreq entries are ordered by increasing document number.

    +

    DocDelta: if frequencies are indexed, this determines both the document +number and the frequency. In particular, DocDelta/2 is the difference between +this document number and the previous document number (or zero when this is the +first document in a TermFreqs). When DocDelta is odd, the frequency is one. +When DocDelta is even, the frequency is read as another VInt. If frequencies +are omitted, DocDelta contains the gap (not multiplied by 2) between document +numbers and no frequency information is stored.

    +

    For example, the TermFreqs for a term which occurs once in document seven +and three times in document eleven, with frequencies indexed, would be the +following sequence of VInts:

    +

    15, 8, 3

    +

    If frequencies were omitted (IndexOptions.DOCS_ONLY) it would be this +sequence of VInts instead:

    +

    7,4

    +

    DocSkip records the document number before every SkipInterval th +document in TermFreqs. If payloads are disabled for the term's field, then +DocSkip represents the difference from the previous value in the sequence. If +payloads are enabled for the term's field, then DocSkip/2 represents the +difference from the previous value in the sequence. If payloads are enabled and +DocSkip is odd, then PayloadLength is stored indicating the length of the last +payload before the SkipIntervalth document in TermPositions. +FreqSkip and ProxSkip record the position of every SkipInterval th +entry in FreqFile and ProxFile, respectively. File positions are relative to +the start of TermFreqs and Positions, to the previous SkipDatum in the +sequence.

    +

    For example, if DocFreq=35 and SkipInterval=16, then there are two SkipData +entries, containing the 15 th and 31 st document numbers +in TermFreqs. The first FreqSkip names the number of bytes after the beginning +of TermFreqs that the 16 th SkipDatum starts, and the second the +number of bytes after that that the 32 nd starts. The first ProxSkip +names the number of bytes after the beginning of Positions that the 16 +th SkipDatum starts, and the second the number of bytes after that +that the 32 nd starts.

    +

    Each term can have multiple skip levels. The amount of skip levels for a +term is NumSkipLevels = Min(MaxSkipLevels, +floor(log(DocFreq/log(SkipInterval)))). The number of SkipData entries for a +skip level is DocFreq/(SkipInterval^(Level + 1)), whereas the lowest skip level +is Level=0.
    +Example: SkipInterval = 4, MaxSkipLevels = 2, DocFreq = 35. Then skip level 0 +has 8 SkipData entries, containing the 3rd, 7th, +11th, 15th, 19th, 23rd, +27th, and 31st document numbers in TermFreqs. Skip level +1 has 2 SkipData entries, containing the 15th and 31st +document numbers in TermFreqs.
    +The SkipData entries on all upper levels > 0 contain a SkipChildLevelPointer +referencing the corresponding SkipData entry in level-1. In the example has +entry 15 on level 1 a pointer to entry 15 on level 0 and entry 31 on level 1 a +pointer to entry 31 on level 0.

    + +

    Positions

    +

    The .prx file contains the lists of positions that each term occurs at +within documents. Note that fields omitting positional data do not store +anything into this file, and if all fields in the index omit positional data +then the .prx file will not exist.

    +

    ProxFile (.prx) --> <TermPositions> TermCount

    +

    TermPositions --> <Positions> DocFreq

    +

    Positions --> <PositionDelta,Payload?> Freq

    +

    Payload --> <PayloadLength?,PayloadData>

    +

    PositionDelta --> VInt

    +

    PayloadLength --> VInt

    +

    PayloadData --> bytePayloadLength

    +

    TermPositions are ordered by term (the term is implicit, from the .tis +file).

    +

    Positions entries are ordered by increasing document number (the document +number is implicit from the .frq file).

    +

    PositionDelta is, if payloads are disabled for the term's field, the +difference between the position of the current occurrence in the document and +the previous occurrence (or zero, if this is the first occurrence in this +document). If payloads are enabled for the term's field, then PositionDelta/2 +is the difference between the current and the previous position. If payloads +are enabled and PositionDelta is odd, then PayloadLength is stored, indicating +the length of the payload at the current term position.

    +

    For example, the TermPositions for a term which occurs as the fourth term in +one document, and as the fifth and ninth term in a subsequent document, would +be the following sequence of VInts (payloads disabled):

    +

    4, 5, 4

    +

    PayloadData is metadata associated with the current term position. If +PayloadLength is stored at the current position, then it indicates the length +of this Payload. If PayloadLength is not stored, then this Payload has the same +length as the Payload at the previous position.

    + +

    Normalization Factors

    +

    There's a single .nrm file containing all norms:

    +

    AllNorms (.nrm) --> NormsHeader,<Norms> +NumFieldsWithNorms

    +

    Norms --> <Byte> SegSize

    +

    NormsHeader --> 'N','R','M',Version

    +

    Version --> Byte

    +

    NormsHeader has 4 bytes, last of which is the format version for this file, +currently -1.

    +

    Each byte encodes a floating point value. Bits 0-2 contain the 3-bit +mantissa, and bits 3-8 contain the 5-bit exponent.

    +

    These are converted to an IEEE single float value as follows:

    +
      +
    1. +

      If the byte is zero, use a zero float.

      +
    2. +
    3. +

      Otherwise, set the sign bit of the float to zero;

      +
    4. +
    5. +

      add 48 to the exponent and use this as the float's exponent;

      +
    6. +
    7. +

      map the mantissa to the high-order 3 bits of the float's mantissa; and

      +
    8. +
    9. +

      set the low-order 21 bits of the float's mantissa to zero.

      +
    10. +
    +

    A separate norm file is created when the norm values of an existing segment +are modified. When field N is modified, a separate norm file +.sN is created, to maintain the norm values for that field.

    +

    Separate norm files are created (when adequate) for both compound and non +compound segments.

    + +

    Term Vectors

    +

    Term Vector support is an optional on a field by field basis. It consists of +3 files.

    +
      +
    1. +

      The Document Index or .tvx file.

      +

      For each document, this stores the offset into the document data (.tvd) and +field data (.tvf) files.

      +

      DocumentIndex (.tvx) --> TVXVersion<DocumentPosition,FieldPosition> +NumDocs

      +

      TVXVersion --> Int (TermVectorsReader.CURRENT)

      +

      DocumentPosition --> UInt64 (offset in the .tvd file)

      +

      FieldPosition --> UInt64 (offset in the .tvf file)

      +
    2. +
    3. +

      The Document or .tvd file.

      +

      This contains, for each document, the number of fields, a list of the fields +with term vector info and finally a list of pointers to the field information +in the .tvf (Term Vector Fields) file.

      +

      Document (.tvd) --> TVDVersion<NumFields, FieldNums, +FieldPositions> NumDocs

      +

      TVDVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      +

      NumFields --> VInt

      +

      FieldNums --> <FieldNumDelta> NumFields

      +

      FieldNumDelta --> VInt

      +

      FieldPositions --> <FieldPositionDelta> NumFields-1

      +

      FieldPositionDelta --> VLong

      +

      The .tvd file is used to map out the fields that have term vectors stored +and where the field information is in the .tvf file.

      +
    4. +
    5. +

      The Field or .tvf file.

      +

      This file contains, for each field that has a term vector stored, a list of +the terms, their frequencies and, optionally, position and offest +information.

      +

      Field (.tvf) --> TVFVersion<NumTerms, Position/Offset, TermFreqs> +NumFields

      +

      TVFVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      +

      NumTerms --> VInt

      +

      Position/Offset --> Byte

      +

      TermFreqs --> <TermText, TermFreq, Positions?, Offsets?> +NumTerms

      +

      TermText --> <PrefixLength, Suffix>

      +

      PrefixLength --> VInt

      +

      Suffix --> String

      +

      TermFreq --> VInt

      +

      Positions --> <VInt>TermFreq

      +

      Offsets --> <VInt, VInt>TermFreq

      +
      +

      Notes:

      +
        +
      • Position/Offset byte stores whether this term vector has position or offset +information stored.
      • +
      • Term text prefixes are shared. The PrefixLength is the number of initial +characters from the previous term which must be pre-pended to a term's suffix +in order to form the term's text. Thus, if the previous term's text was "bone" +and the term is "boy", the PrefixLength is two and the suffix is "y".
      • +
      • Positions are stored as delta encoded VInts. This means we only store the +difference of the current position from the last position
      • +
      • Offsets are stored as delta encoded VInts. The first VInt is the +startOffset, the second is the endOffset.
      • +
      +
    6. +
    + +

    Deleted Documents

    +

    The .del file is optional, and only exists when a segment contains +deletions.

    +

    Although per-segment, this file is maintained exterior to compound segment +files.

    +

    Deletions (.del) --> [Format],ByteCount,BitCount, Bits | DGaps (depending +on Format)

    +

    Format,ByteSize,BitCount --> Uint32

    +

    Bits --> <Byte> ByteCount

    +

    DGaps --> <DGap,NonzeroByte> NonzeroBytesCount

    +

    DGap --> VInt

    +

    NonzeroByte --> Byte

    +

    Format is Optional. -1 indicates DGaps. Non-negative value indicates Bits, +and that Format is excluded.

    +

    ByteCount indicates the number of bytes in Bits. It is typically +(SegSize/8)+1.

    +

    BitCount indicates the number of bits that are currently set in Bits.

    +

    Bits contains one bit for each document indexed. When the bit corresponding +to a document number is set, that document is marked as deleted. Bit ordering +is from least to most significant. Thus, if Bits contains two bytes, 0x00 and +0x02, then document 9 is marked as deleted.

    +

    DGaps represents sparse bit-vectors more efficiently than Bits. It is made +of DGaps on indexes of nonzero bytes in Bits, and the nonzero bytes themselves. +The number of nonzero bytes in Bits (NonzeroBytesCount) is not stored.

    +

    For example, if there are 8000 bits and only bits 10,12,32 are set, DGaps +would be used:

    +

    (VInt) 1 , (byte) 20 , (VInt) 3 , (Byte) 1

    +
    + +

    Limitations

    +
    +

    When referring to term numbers, Lucene's current implementation uses a Java +int to hold the term index, which means the +maximum number of unique terms in any single index segment is ~2.1 billion +times the term index interval (default 128) = ~274 billion. This is technically +not a limitation of the index file format, just of Lucene's current +implementation.

    +

    Similarly, Lucene uses a Java int to refer to +document numbers, and the index file format uses an Int32 on-disk to store document numbers. This is a limitation +of both the index file format and the current implementation. Eventually these +should be replaced with either UInt64 values, or +better yet, VInt values which have no limit.

    +
    + + Index: lucene/site/html/fileformats.html =================================================================== --- lucene/site/html/fileformats.html (revision 0) +++ lucene/site/html/fileformats.html (working copy) Property changes on: lucene/site/html/fileformats.html ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Id Revision HeadURL \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: lucene/site/html/lucene_green_300.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/html/lucene_green_300.gif =================================================================== --- lucene/site/html/lucene_green_300.gif (revision 0) +++ lucene/site/html/lucene_green_300.gif (working copy) Property changes on: lucene/site/html/lucene_green_300.gif ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: lucene/site/html/scoring.html =================================================================== --- lucene/site/html/scoring.html (revision 0) +++ lucene/site/html/scoring.html (working copy) @@ -0,0 +1,338 @@ + + + +Apache Lucene - Scoring + + +

    Apache Lucene - Scoring

    + + + + +

    Introduction

    +
    +

    Lucene scoring is the heart of why we all love Lucene. It is blazingly fast and it hides almost all of the complexity from the user. + In a nutshell, it works. At least, that is, until it doesn't work, or doesn't work as one would expect it to + work. Then we are left digging into Lucene internals or asking for help on java-user@lucene.apache.org to figure out why a document with five of our query terms + scores lower than a different document with only one of the query terms.

    +

    While this document won't answer your specific scoring issues, it will, hopefully, point you to the places that can + help you figure out the what and why of Lucene scoring.

    +

    Lucene scoring uses a combination of the + Vector Space Model (VSM) of Information + Retrieval and the Boolean model + to determine + how relevant a given Document is to a User's query. In general, the idea behind the VSM is the more + times a query term appears in a document relative to + the number of times the term appears in all the documents in the collection, the more relevant that + document is to the query. It uses the Boolean model to first narrow down the documents that need to + be scored based on the use of boolean logic in the Query specification. Lucene also adds some + capabilities and refinements onto this model to support boolean and fuzzy searching, but it + essentially remains a VSM based system at the heart. + For some valuable references on VSM and IR in general refer to the + Lucene Wiki IR references. +

    +

    The rest of this document will cover Scoring basics and how to change your + Similarity. Next it will cover ways you can + customize the Lucene internals in Changing your Scoring + -- Expert Level which gives details on implementing your own + Query class and related functionality. Finally, we + will finish up with some reference material in the Appendix. +

    +
    + + +

    Scoring

    +
    +

    Scoring is very much dependent on the way documents are indexed, + so it is important to understand indexing (see + Apache Lucene - Getting Started Guide + and the Lucene + file formats + before continuing on with this section.) It is also assumed that readers know how to use the + Searcher.explain(Query query, int doc) functionality, + which can go a long way in informing why a score is returned. +

    + +

    Fields and Documents

    +

    In Lucene, the objects we are scoring are + Documents. A Document is a collection + of + Fields. Each Field has semantics about how + it is created and stored (i.e. tokenized, untokenized, raw data, compressed, etc.) It is important to + note that Lucene scoring works on Fields and then combines the results to return Documents. This is + important because two Documents with the exact same content, but one having the content in two Fields + and the other in one Field will return different scores for the same query due to length normalization + (assumming the + DefaultSimilarity + on the Fields). +

    + +

    Score Boosting

    +

    Lucene allows influencing search results by "boosting" in more than one level: +

      + +
    • +Document level boosting + - while indexing - by calling + document.setBoost() + before a document is added to the index. +
    • + +
    • +Document's Field level boosting + - while indexing - by calling + field.setBoost() + before adding a field to the document (and before adding the document to the index). +
    • + +
    • +Query level boosting + - during search, by setting a boost on a query clause, calling + Query.setBoost(). +
    • + +
    + +

    +

    Indexing time boosts are preprocessed for storage efficiency and written to + the directory (when writing the document) in a single byte (!) as follows: + For each field of a document, all boosts of that field + (i.e. all boosts under the same field name in that doc) are multiplied. + The result is multiplied by the boost of the document, + and also multiplied by a "field length norm" value + that represents the length of that field in that doc + (so shorter fields are automatically boosted up). + The result is decoded as a single byte + (with some precision loss of course) and stored in the directory. + The similarity object in effect at indexing computes the length-norm of the field. +

    +

    This composition of 1-byte representation of norms + (that is, indexing time multiplication of field boosts & doc boost & field-length-norm) + is nicely described in + Fieldable.setBoost(). +

    +

    Encoding and decoding of the resulted float norm in a single byte are done by the + static methods of the class Similarity: + encodeNorm() and + decodeNorm(). + Due to loss of precision, it is not guaranteed that decode(encode(x)) = x, + e.g. decode(encode(0.89)) = 0.75. + At scoring (search) time, this norm is brought into the score of document + as norm(t, d), as shown by the formula in + Similarity. +

    + +

    Understanding the Scoring Formula

    +

    + This scoring formula is described in the + Similarity class. Please take the time to study this formula, as it contains much of the information about how the + basics of Lucene scoring work, especially the + TermQuery. +

    + +

    The Big Picture

    +

    OK, so the tf-idf formula and the + Similarity + is great for understanding the basics of Lucene scoring, but what really drives Lucene scoring are + the use and interactions between the + Query classes, as created by each application in + response to a user's information need. +

    +

    In this regard, Lucene offers a wide variety of Query implementations, most of which are in the + org.apache.lucene.search package. + These implementations can be combined in a wide variety of ways to provide complex querying + capabilities along with + information about where matches took place in the document collection. The Query + section below + highlights some of the more important Query classes. For information on the other ones, see the + package summary. For details on implementing + your own Query class, see Changing your Scoring -- + Expert Level below. +

    +

    Once a Query has been created and submitted to the + IndexSearcher, the scoring process + begins. (See the Appendix Algorithm section for more notes on the process.) After some infrastructure setup, + control finally passes to the Weight implementation and its + Scorer instance. In the case of any type of + BooleanQuery, scoring is handled by the + BooleanWeight2 + (link goes to ViewVC BooleanQuery java code which contains the BooleanWeight2 inner class) or + BooleanWeight + (link goes to ViewVC BooleanQuery java code, which contains the BooleanWeight inner class). +

    +

    + Assuming the use of the BooleanWeight2, a + BooleanScorer2 is created by bringing together + all of the + Scorers from the sub-clauses of the BooleanQuery. + When the BooleanScorer2 is asked to score it delegates its work to an internal Scorer based on the type + of clauses in the Query. This internal Scorer essentially loops over the sub scorers and sums the scores + provided by each scorer while factoring in the coord() score. + +

    + +

    Query Classes

    +

    For information on the Query Classes, refer to the + search package javadocs + +

    + +

    Changing Similarity

    +

    One of the ways of changing the scoring characteristics of Lucene is to change the similarity factors. For information on + how to do this, see the + search package javadocs +

    +
    + + +

    Changing your Scoring -- Expert Level

    +
    +

    At a much deeper level, one can affect scoring by implementing their own Query classes (and related scoring classes.) To learn more + about how to do this, refer to the + search package javadocs + +

    +
    + + + +

    Appendix

    +
    + +

    Algorithm

    +

    This section is mostly notes on stepping through the Scoring process and serves as + fertilizer for the earlier sections.

    +

    In the typical search application, a + Query + is passed to the + Searcher + , beginning the scoring process. +

    +

    Once inside the Searcher, a + Collector + is used for the scoring and sorting of the search results. + These important objects are involved in a search: +

      + +
    1. The + Weight + object of the Query. The Weight object is an internal representation of the Query that + allows the Query to be reused by the Searcher. +
    2. + +
    3. The Searcher that initiated the call.
    4. + +
    5. A + Filter + for limiting the result set. Note, the Filter may be null. +
    6. + +
    7. A + Sort + object for specifying how to sort the results if the standard score based sort method is not + desired. +
    8. + +
    + +

    +

    Assuming we are not sorting (since sorting doesn't + effect the raw Lucene score), + we call one of the search methods of the Searcher, passing in the + Weight + object created by Searcher.createWeight(Query), + Filter + and the number of results we want. This method + returns a + TopDocs + object, which is an internal collection of search results. + The Searcher creates a + TopScoreDocCollector + and passes it along with the Weight, Filter to another expert search method (for more on the + Collector + mechanism, see + Searcher + .) The TopDocCollector uses a + PriorityQueue + to collect the top results for the search. +

    +

    If a Filter is being used, some initial setup is done to determine which docs to include. Otherwise, + we ask the Weight for + a + Scorer + for the + IndexReader + of the current searcher and we proceed by + calling the score method on the + Scorer + . +

    +

    At last, we are actually going to score some documents. The score method takes in the Collector + (most likely the TopScoreDocCollector or TopFieldCollector) and does its business. + Of course, here is where things get involved. The + Scorer + that is returned by the + Weight + object depends on what type of Query was submitted. In most real world applications with multiple + query terms, + the + Scorer + is going to be a + BooleanScorer2 + (see the section on customizing your scoring for info on changing this.) + +

    +

    Assuming a BooleanScorer2 scorer, we first initialize the Coordinator, which is used to apply the + coord() factor. We then + get a internal Scorer based on the required, optional and prohibited parts of the query. + Using this internal Scorer, the BooleanScorer2 then proceeds + into a while loop based on the Scorer#next() method. The next() method advances to the next document + matching the query. This is an + abstract method in the Scorer class and is thus overriden by all derived + implementations. If you have a simple OR query + your internal Scorer is most likely a DisjunctionSumScorer, which essentially combines the scorers + from the sub scorers of the OR'd terms.

    +
    + + + Index: lucene/site/html/scoring.html =================================================================== --- lucene/site/html/scoring.html (revision 0) +++ lucene/site/html/scoring.html (working copy) Property changes on: lucene/site/html/scoring.html ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Date Author Id Revision HeadURL \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Index: lucene/site/src/documentation/skinconf.xml =================================================================== --- lucene/site/src/documentation/skinconf.xml (revision 1328746) +++ lucene/site/src/documentation/skinconf.xml (working copy) @@ -1,404 +0,0 @@ - - - - - - - - - - - - true - - true - - true - - true - - - true - - - true - - - true - - - false - ... - - - true - - - Lucene - Apache Lucene is a high-performance, full-featured text search engine library written entirely in - Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform. - http://lucene.apache.org/java/ - http://lucene.apache.org/images/lucene_green_300.gif - - - - - - Lucene - Apache Lucene - http://lucene.apache.org/ - http://www.apache.org/images/asf_logo_simple.png - - - - - - - - - images/favicon.ico - - - 2006 - The Apache Software Foundation. - http://www.apache.org/licenses/ - - - - - - - - - - - - - - - - - - - - - - - - p.quote { - margin-left: 2em; - padding: .5em; - background-color: #f0f0f0; - font-family: monospace; - } - img.float-right { - float: right; - margin-left: 2em; - padding: .5em; - } - - #footer a { color: #0F3660; } - #footer a:visited { color: #009999; } - - pre.code { - margin-left: 2em; - margin-right: 2em; - padding: 0.5em; - background-color: #f0f0f0; - } - - - - - - - - - - - - - - - - - - - - - - - Built with Apache Forrest - http://forrest.apache.org/ - images/built-with-forrest-button.png - 88 - 31 - - - - - - Index: lucene/site/src/documentation/classes/CatalogManager.properties =================================================================== --- lucene/site/src/documentation/classes/CatalogManager.properties (revision 1328746) +++ lucene/site/src/documentation/classes/CatalogManager.properties (working copy) @@ -1,57 +0,0 @@ -# Copyright 2002-2005 The Apache Software Foundation or its licensors, -# as applicable. -# -# Licensed 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. - -#======================================================================= -# CatalogManager.properties for Catalog Entity Resolver. -# -# This is the default properties file for your project. -# This facilitates local configuration of application-specific catalogs. -# If you have defined any local catalogs, then they will be loaded -# before Forrest's core catalogs. -# -# See the Apache Forrest documentation: -# http://forrest.apache.org/docs/your-project.html -# http://forrest.apache.org/docs/validation.html - -# verbosity: -# The level of messages for status/debug (messages go to standard output). -# The setting here is for your own local catalogs. -# The verbosity of Forrest's core catalogs is controlled via -# main/webapp/WEB-INF/cocoon.xconf -# -# The following messages are provided ... -# 0 = none -# 1 = ? (... not sure yet) -# 2 = 1+, Loading catalog, Resolved public, Resolved system -# 3 = 2+, Catalog does not exist, resolvePublic, resolveSystem -# 10 = 3+, List all catalog entries when loading a catalog -# (Cocoon also logs the "Resolved public" messages.) -verbosity=1 - -# catalogs ... list of additional catalogs to load -# (Note that Apache Forrest will automatically load its own default catalog -# from main/webapp/resources/schema/catalog.xcat) -# Use either full pathnames or relative pathnames. -# pathname separator is always semi-colon (;) regardless of operating system -# directory separator is always slash (/) regardless of operating system -catalogs=../resources/schema/catalog.xcat - -# relative-catalogs -# If false, relative catalog URIs are made absolute with respect to the -# base URI of the CatalogManager.properties file. This setting only -# applies to catalog URIs obtained from the catalogs property in the -# CatalogManager.properties file -# Example: relative-catalogs=[yes|no] -relative-catalogs=no Index: lucene/site/src/documentation/classes/CatalogManager.properties =================================================================== --- lucene/site/src/documentation/classes/CatalogManager.properties (revision 1328746) +++ lucene/site/src/documentation/classes/CatalogManager.properties (working copy) @@ -1,57 +0,0 @@ -# Copyright 2002-2005 The Apache Software Foundation or its licensors, -# as applicable. -# -# Licensed 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. - -#======================================================================= -# CatalogManager.properties for Catalog Entity Resolver. -# -# This is the default properties file for your project. -# This facilitates local configuration of application-specific catalogs. -# If you have defined any local catalogs, then they will be loaded -# before Forrest's core catalogs. -# -# See the Apache Forrest documentation: -# http://forrest.apache.org/docs/your-project.html -# http://forrest.apache.org/docs/validation.html - -# verbosity: -# The level of messages for status/debug (messages go to standard output). -# The setting here is for your own local catalogs. -# The verbosity of Forrest's core catalogs is controlled via -# main/webapp/WEB-INF/cocoon.xconf -# -# The following messages are provided ... -# 0 = none -# 1 = ? (... not sure yet) -# 2 = 1+, Loading catalog, Resolved public, Resolved system -# 3 = 2+, Catalog does not exist, resolvePublic, resolveSystem -# 10 = 3+, List all catalog entries when loading a catalog -# (Cocoon also logs the "Resolved public" messages.) -verbosity=1 - -# catalogs ... list of additional catalogs to load -# (Note that Apache Forrest will automatically load its own default catalog -# from main/webapp/resources/schema/catalog.xcat) -# Use either full pathnames or relative pathnames. -# pathname separator is always semi-colon (;) regardless of operating system -# directory separator is always slash (/) regardless of operating system -catalogs=../resources/schema/catalog.xcat - -# relative-catalogs -# If false, relative catalog URIs are made absolute with respect to the -# base URI of the CatalogManager.properties file. This setting only -# applies to catalog URIs obtained from the catalogs property in the -# CatalogManager.properties file -# Example: relative-catalogs=[yes|no] -relative-catalogs=no Index: lucene/site/src/documentation/conf/cli.xconf =================================================================== --- lucene/site/src/documentation/conf/cli.xconf (revision 1328746) +++ lucene/site/src/documentation/conf/cli.xconf (working copy) @@ -1,322 +0,0 @@ - - - - - - - - . - WEB-INF/cocoon.xconf - ../tmp/cocoon-work - ../site - - - - - - - - - - - - - - - index.html - - - - - - - */* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/conf/cli.xconf =================================================================== --- lucene/site/src/documentation/conf/cli.xconf (revision 1328746) +++ lucene/site/src/documentation/conf/cli.xconf (working copy) @@ -1,322 +0,0 @@ - - - - - - - - . - WEB-INF/cocoon.xconf - ../tmp/cocoon-work - ../site - - - - - - - - - - - - - - - index.html - - - - - - - */* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/content/.htaccess =================================================================== --- lucene/site/src/documentation/content/.htaccess (revision 1328746) +++ lucene/site/src/documentation/content/.htaccess (working copy) @@ -1,3 +0,0 @@ -#Forrest generates UTF-8 by default, but these httpd servers are -#ignoring the meta http-equiv charset tags -AddDefaultCharset off Index: lucene/site/src/documentation/content/.htaccess =================================================================== --- lucene/site/src/documentation/content/.htaccess (revision 1328746) +++ lucene/site/src/documentation/content/.htaccess (working copy) @@ -1,3 +0,0 @@ -#Forrest generates UTF-8 by default, but these httpd servers are -#ignoring the meta http-equiv charset tags -AddDefaultCharset off Index: lucene/site/src/documentation/content/xdocs/contributions.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/contributions.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/contributions.xml (working copy) @@ -1,350 +0,0 @@ - - -
    - - Apache Lucene - Contributions - -
    - - - Peter Carlson - - - -
    - Overview -

    This page lists external Lucene resources. If you have - written something that should be included, please post all - relevant information to one of the mailing lists. Nothing - listed here is directly supported by the Lucene - developers, so if you encounter any problems with any of - this software, please use the author's contact information - to get help.

    -

    If you are looking for information on contributing patches or other improvements to Lucene, see - How To Contribute on the Lucene Wiki.

    -
    - -
    - Lucene Tools -

    - Software that works with Lucene indices. -

    -
    Luke - - - - - - - - - -
    - URL - - - http://www.getopt.org/luke/ - -
    - author - - Andrzej Bialecki -
    -
    -
    - LIMO (Lucene Index Monitor) - - - - - - - - - -
    - URL - - - http://limo.sf.net/ - -
    - author - - Julien Nioche -
    -
    -
    - -
    - Lucene Document Converters -

    - Lucene requires information you want to index to be - converted into a Document class. Here are - contributions for various solutions that convert different - content types to Lucene's Document classes. -

    -
    - XML Document #1 - - - - - - - - - -
    - URL - - - http://marc.theaimsgroup.com/?l=lucene-dev&m=100723333506246&w=2 - -
    - author - - Philip Ogren - ogren@mayo.edu -
    -
    -
    - XML Document #2 - - - - - - - - - -
    - URL - - - http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00346.html - -
    - author - - Peter Carlson - carlson@bookandhammer.com -
    -
    -
    - PDF Box - - - - - - - - - -
    - URL - - - http://www.pdfbox.org/ - -
    - author - - Ben Litchfield - ben@csh.rit.edu -
    -
    -
    - XPDF - PDF Document Conversion - - - - - - - - - -
    - URL - - - http://www.foolabs.com/xpdf - -
    - author - - N/A -
    -
    -
    - PDFTextStream -- PDF text and metadata extraction - - - - - - - - - -
    - URL - - - http://snowtide.com - -
    - author - - N/A -
    -
    -
    - PJ Classic & PJ Professional - PDF Document Conversion - - - - - - - - - -
    - URL - - - http://www.etymon.com/ - -
    - author - - N/A -
    -
    -
    - -
    - Miscellaneous -

    -

    -
    - Arabic Analyzer for Java - - - - - - - - - -
    - URL - - - http://savannah.nongnu.org/projects/aramorph - -
    - author - - Pierrick Brihaye -
    -
    -
    - Phonetix - - - - - - - - - -
    - URL - - - http://www.companywebstore.de/tangentum/mirror/en/products/phonetix/index.html - -
    - author - - tangentum technologies -
    -
    -
    - ejIndex - JBoss MBean for Lucene -

    -

    - - - - - - - - - -
    - URL - - - http://ejindex.sourceforge.net/ - -
    - author - - Andy Scholz -
    -
    -
    - JavaCC - - - - - - - - - -
    - URL - - - https://javacc.dev.java.net/ - -
    - author - - Sun Microsystems (java.net) -
    -
    -
    - LuSQL - Index databases with Lucene - - - - - - - - - -
    - URL - - - http://lab.cisti-icist.nrc-cnrc.gc.ca/cistilabswiki/index.php/LuSql - -
    - author - - Glen Newton -
    -
    -
    - -
    Index: lucene/site/src/documentation/content/xdocs/site.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/site.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/site.xml (working copy) @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/content/xdocs/demo.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/demo.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/demo.xml (working copy) @@ -1,79 +0,0 @@ - - -
    - - Apache Lucene - Building and Installing the Basic Demo - -
    - -Andrew C. Oliver - - - -
    About this Document -

    -This document is intended as a "getting started" guide to using and running the Lucene demos. -It walks you through some basic installation and configuration. -

    -
    - - -
    About the Demo -

    -The Lucene command-line demo code consists of an application that demonstrates various -functionalities of Lucene and how you can add Lucene to your applications. -

    -
    - -
    Setting your CLASSPATH -

    -First, you should download the -latest Lucene distribution and then extract it to a working directory. -

    -

    -You need three JARs: the Lucene JAR, the common analysis JAR, and the Lucene demo JAR. You should -see the Lucene JAR file in the core/ directory you created when you extracted the archive -- it -should be named something like lucene-core-{version}.jar. You should also see files -called lucene-analyzers-common-{version}.jar and lucene-demo-{version}.jar -under analysis/common/ and demo/, respectively. -

    -

    -Put all three of these files in your Java CLASSPATH. -

    -
    - -
    Indexing Files -

    -Once you've gotten this far you're probably itching to go. Let's build an index! Assuming -you've set your CLASSPATH correctly, just type: - -

    -    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
    -
    - -This will produce a subdirectory called index which will contain an index of all of the -Lucene source code. -

    -

    -To search the index type: - -

    -    java org.apache.lucene.demo.SearchFiles
    -
    - -You'll be prompted for a query. Type in a swear word and press the enter key. You'll see that the -Lucene developers are very well mannered and get no results. Now try entering the word "string". -That should return a whole bunch of documents. The results will page at every tenth result and ask -you whether you want more results. -

    -
    - -
    About the code... -

    -read on>>> -

    -
    - - -
    - Index: lucene/site/src/documentation/content/xdocs/scoring.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/scoring.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/scoring.xml (working copy) @@ -1,277 +0,0 @@ - - - -
    - - Apache Lucene - Scoring - -
    - - Grant Ingersoll - - - - -
    Introduction -

    Lucene scoring is the heart of why we all love Lucene. It is blazingly fast and it hides almost all of the complexity from the user. - In a nutshell, it works. At least, that is, until it doesn't work, or doesn't work as one would expect it to - work. Then we are left digging into Lucene internals or asking for help on java-user@lucene.apache.org to figure out why a document with five of our query terms - scores lower than a different document with only one of the query terms.

    -

    While this document won't answer your specific scoring issues, it will, hopefully, point you to the places that can - help you figure out the what and why of Lucene scoring.

    -

    Lucene scoring uses a combination of the - Vector Space Model (VSM) of Information - Retrieval and the Boolean model - to determine - how relevant a given Document is to a User's query. In general, the idea behind the VSM is the more - times a query term appears in a document relative to - the number of times the term appears in all the documents in the collection, the more relevant that - document is to the query. It uses the Boolean model to first narrow down the documents that need to - be scored based on the use of boolean logic in the Query specification. Lucene also adds some - capabilities and refinements onto this model to support boolean and fuzzy searching, but it - essentially remains a VSM based system at the heart. - For some valuable references on VSM and IR in general refer to the - Lucene Wiki IR references. -

    -

    The rest of this document will cover Scoring basics and how to change your - Similarity. Next it will cover ways you can - customize the Lucene internals in Changing your Scoring - -- Expert Level which gives details on implementing your own - Query class and related functionality. Finally, we - will finish up with some reference material in the Appendix. -

    -
    -
    Scoring -

    Scoring is very much dependent on the way documents are indexed, - so it is important to understand indexing (see - Apache Lucene - Getting Started Guide - and the Lucene - file formats - before continuing on with this section.) It is also assumed that readers know how to use the - Searcher.explain(Query query, int doc) functionality, - which can go a long way in informing why a score is returned. -

    -
    Fields and Documents -

    In Lucene, the objects we are scoring are - Documents. A Document is a collection - of - Fields. Each Field has semantics about how - it is created and stored (i.e. tokenized, untokenized, raw data, compressed, etc.) It is important to - note that Lucene scoring works on Fields and then combines the results to return Documents. This is - important because two Documents with the exact same content, but one having the content in two Fields - and the other in one Field will return different scores for the same query due to length normalization - (assumming the - DefaultSimilarity - on the Fields). -

    -
    -
    Score Boosting -

    Lucene allows influencing search results by "boosting" in more than one level: -

      -
    • Document level boosting - - while indexing - by calling - document.setBoost() - before a document is added to the index. -
    • -
    • Document's Field level boosting - - while indexing - by calling - field.setBoost() - before adding a field to the document (and before adding the document to the index). -
    • -
    • Query level boosting - - during search, by setting a boost on a query clause, calling - Query.setBoost(). -
    • -
    -

    -

    Indexing time boosts are preprocessed for storage efficiency and written to - the directory (when writing the document) in a single byte (!) as follows: - For each field of a document, all boosts of that field - (i.e. all boosts under the same field name in that doc) are multiplied. - The result is multiplied by the boost of the document, - and also multiplied by a "field length norm" value - that represents the length of that field in that doc - (so shorter fields are automatically boosted up). - The result is decoded as a single byte - (with some precision loss of course) and stored in the directory. - The similarity object in effect at indexing computes the length-norm of the field. -

    -

    This composition of 1-byte representation of norms - (that is, indexing time multiplication of field boosts & doc boost & field-length-norm) - is nicely described in - Fieldable.setBoost(). -

    -

    Encoding and decoding of the resulted float norm in a single byte are done by the - static methods of the class Similarity: - encodeNorm() and - decodeNorm(). - Due to loss of precision, it is not guaranteed that decode(encode(x)) = x, - e.g. decode(encode(0.89)) = 0.75. - At scoring (search) time, this norm is brought into the score of document - as norm(t, d), as shown by the formula in - Similarity. -

    -
    -
    Understanding the Scoring Formula - -

    - This scoring formula is described in the - Similarity class. Please take the time to study this formula, as it contains much of the information about how the - basics of Lucene scoring work, especially the - TermQuery. -

    -
    -
    The Big Picture -

    OK, so the tf-idf formula and the - Similarity - is great for understanding the basics of Lucene scoring, but what really drives Lucene scoring are - the use and interactions between the - Query classes, as created by each application in - response to a user's information need. -

    -

    In this regard, Lucene offers a wide variety of Query implementations, most of which are in the - org.apache.lucene.search package. - These implementations can be combined in a wide variety of ways to provide complex querying - capabilities along with - information about where matches took place in the document collection. The Query - section below - highlights some of the more important Query classes. For information on the other ones, see the - package summary. For details on implementing - your own Query class, see Changing your Scoring -- - Expert Level below. -

    -

    Once a Query has been created and submitted to the - IndexSearcher, the scoring process - begins. (See the Appendix Algorithm section for more notes on the process.) After some infrastructure setup, - control finally passes to the Weight implementation and its - Scorer instance. In the case of any type of - BooleanQuery, scoring is handled by the - BooleanWeight2 - (link goes to ViewVC BooleanQuery java code which contains the BooleanWeight2 inner class) or - BooleanWeight - (link goes to ViewVC BooleanQuery java code, which contains the BooleanWeight inner class). -

    -

    - Assuming the use of the BooleanWeight2, a - BooleanScorer2 is created by bringing together - all of the - Scorers from the sub-clauses of the BooleanQuery. - When the BooleanScorer2 is asked to score it delegates its work to an internal Scorer based on the type - of clauses in the Query. This internal Scorer essentially loops over the sub scorers and sums the scores - provided by each scorer while factoring in the coord() score. - -

    -
    -
    Query Classes -

    For information on the Query Classes, refer to the - search package javadocs -

    -
    -
    Changing Similarity -

    One of the ways of changing the scoring characteristics of Lucene is to change the similarity factors. For information on - how to do this, see the - search package javadocs

    -
    - -
    -
    Changing your Scoring -- Expert Level -

    At a much deeper level, one can affect scoring by implementing their own Query classes (and related scoring classes.) To learn more - about how to do this, refer to the - search package javadocs -

    -
    - -
    Appendix -
    Algorithm -

    This section is mostly notes on stepping through the Scoring process and serves as - fertilizer for the earlier sections.

    -

    In the typical search application, a - Query - is passed to the - Searcher - , beginning the scoring process. -

    -

    Once inside the Searcher, a - Collector - is used for the scoring and sorting of the search results. - These important objects are involved in a search: -

      -
    1. The - Weight - object of the Query. The Weight object is an internal representation of the Query that - allows the Query to be reused by the Searcher. -
    2. -
    3. The Searcher that initiated the call.
    4. -
    5. A - Filter - for limiting the result set. Note, the Filter may be null. -
    6. -
    7. A - Sort - object for specifying how to sort the results if the standard score based sort method is not - desired. -
    8. -
    -

    -

    Assuming we are not sorting (since sorting doesn't - effect the raw Lucene score), - we call one of the search methods of the Searcher, passing in the - Weight - object created by Searcher.createWeight(Query), - Filter - and the number of results we want. This method - returns a - TopDocs - object, which is an internal collection of search results. - The Searcher creates a - TopScoreDocCollector - and passes it along with the Weight, Filter to another expert search method (for more on the - Collector - mechanism, see - Searcher - .) The TopDocCollector uses a - PriorityQueue - to collect the top results for the search. -

    -

    If a Filter is being used, some initial setup is done to determine which docs to include. Otherwise, - we ask the Weight for - a - Scorer - for the - IndexReader - of the current searcher and we proceed by - calling the score method on the - Scorer - . -

    -

    At last, we are actually going to score some documents. The score method takes in the Collector - (most likely the TopScoreDocCollector or TopFieldCollector) and does its business. - Of course, here is where things get involved. The - Scorer - that is returned by the - Weight - object depends on what type of Query was submitted. In most real world applications with multiple - query terms, - the - Scorer - is going to be a - BooleanScorer2 - (see the section on customizing your scoring for info on changing this.) - -

    -

    Assuming a BooleanScorer2 scorer, we first initialize the Coordinator, which is used to apply the - coord() factor. We then - get a internal Scorer based on the required, optional and prohibited parts of the query. - Using this internal Scorer, the BooleanScorer2 then proceeds - into a while loop based on the Scorer#next() method. The next() method advances to the next document - matching the query. This is an - abstract method in the Scorer class and is thus overriden by all derived - implementations. If you have a simple OR query - your internal Scorer is most likely a DisjunctionSumScorer, which essentially combines the scorers - from the sub scorers of the OR'd terms.

    -
    -
    - -
    Index: lucene/site/src/documentation/content/xdocs/demo2.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/demo2.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/demo2.xml (working copy) @@ -1,154 +0,0 @@ - - -
    - - Apache Lucene - Basic Demo Sources Walk-through - -
    - -Andrew C. Oliver - - - -
    About the Code -

    -In this section we walk through the sources behind the command-line Lucene demo: where to find them, -their parts and their function. This section is intended for Java developers wishing to understand -how to use Lucene in their applications. -

    -
    - - -
    Location of the source - -

    -NOTE: to examine the sources, you need to download and extract a source checkout of -Lucene: (lucene-{version}-src.zip). -

    - -

    -Relative to the directory created when you extracted Lucene, you -should see a directory called lucene/demo/. This is the root for the Lucene -demo. Under this directory is src/java/org/apache/lucene/demo/. This is where all -the Java sources for the demo live. -

    - -

    -Within this directory you should see the IndexFiles.java class we executed earlier. -Bring it up in vi or your editor of choice and let's take a look at it. -

    - -
    - -
    IndexFiles - -

    -As we discussed in the previous walk-through, the IndexFiles class creates a Lucene -Index. Let's take a look at how it does this. -

    - -

    -The main() method parses the command-line parameters, then in preparation for -instantiating IndexWriter, opens a -Directory and instantiates -StandardAnalyzer and -IndexWriterConfig. -

    - -

    -The value of the -index command-line parameter is the name of the filesystem directory -where all index information should be stored. If IndexFiles is invoked with a -relative path given in the -index command-line parameter, or if the -index -command-line parameter is not given, causing the default relative index path "index" -to be used, the index path will be created as a subdirectory of the current working directory -(if it does not already exist). On some platforms, the index path may be created in a different -directory (such as the user's home directory). -

    - -

    -The -docs command-line parameter value is the location of the directory containing -files to be indexed. -

    - -

    -The -update command-line parameter tells IndexFiles not to delete the -index if it already exists. When -update is not given, IndexFiles will -first wipe the slate clean before indexing any documents. -

    - -

    -Lucene Directorys are used by the -IndexWriter to store information in the index. In addition to the -FSDirectory implementation we are using, -there are several other Directory subclasses that can write to RAM, to databases, etc. -

    - -

    -Lucene Analyzers are processing pipelines -that break up text into indexed tokens, a.k.a. terms, and optionally perform other operations on these -tokens, e.g. downcasing, synonym insertion, filtering out unwanted tokens, etc. The Analyzer -we are using is StandardAnalyzer, which creates tokens using the Word Break rules from the -Unicode Text Segmentation algorithm specified in Unicode -Standard Annex #29; converts tokens to lowercase; and then filters out stopwords. Stopwords are -common language words such as articles (a, an, the, etc.) and other tokens that may have less value for -searching. It should be noted that there are different rules for every language, and you should use the -proper analyzer for each. Lucene currently provides Analyzers for a number of different languages (see -the javadocs under -lucene/analysis/common/src/java/org/apache/lucene/analysis). -

    - -

    -The IndexWriterConfig instance holds all configuration for IndexWriter. For -example, we set the OpenMode to use here based on the value of the -update -command-line parameter. -

    - -

    -Looking further down in the file, after IndexWriter is instantiated, you should see the -indexDocs() code. This recursive function crawls the directories and creates -Document objects. The -Document is simply a data object to represent the text content from the file as well as -its creation time and location. These instances are added to the IndexWriter. If -the -update command-line parameter is given, the IndexWriter -OpenMode will be set to OpenMode.CREATE_OR_APPEND, and rather than -adding documents to the index, the IndexWriter will update them -in the index by attempting to find an already-indexed document with the same identifier (in our -case, the file path serves as the identifier); deleting it from the index if it exists; and then -adding the new document to the index. -

    - -
    - -
    Searching Files - -

    -The SearchFiles class is -quite simple. It primarily collaborates with an -IndexSearcher, -StandardAnalyzer (which is used in the -IndexFiles class as well) -and a QueryParser. The -query parser is constructed with an analyzer used to interpret your query text in the same way the -documents are interpreted: finding word boundaries, downcasing, and removing useless words like -'a', 'an' and 'the'. The Query -object contains the results from the -QueryParser which is passed -to the searcher. Note that it's also possible to programmatically construct a rich -Query object without using the query -parser. The query parser just enables decoding the Lucene query -syntax into the corresponding Query -object. -

    - -

    -SearchFiles uses the IndexSearcher.search(query,n) method that returns -TopDocs with max n hits. -The results are printed in pages, sorted by score (i.e. relevance). -

    -
    - -
    Index: lucene/site/src/documentation/content/xdocs/index.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/index.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/index.xml (working copy) @@ -1,16 +0,0 @@ - - -
    - Lucene Java Documentation -
    - - -

    - This is the official documentation for Lucene Java
    - Please use the menu on the left to access the Javadocs and different documents. -

    -

    - Additional documentation is available in the Wiki. -

    - -
    Index: lucene/site/src/documentation/content/xdocs/systemrequirements.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/systemrequirements.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/systemrequirements.xml (working copy) @@ -1,27 +0,0 @@ - - -
    Apache Lucene - System Requirements
    - -Grant Ingersoll, Uwe Schindler - - - -
    System Requirements -

    - Lucene Core has the following minimum requirements: -

      -
    • Java 1.6.x or greater.
    • -
    • ANT 1.7.0 or greater.
    • -
    • CPU, Disk and Memory requirements are based on the many choices made in implementing Lucene (document size, number of documents, and number of hits retrieved to name a few.)
    • -
    -

    -

    Some modules may have other requirements, refer to their documentation and build files for information.

    - -
    - - - -
    Index: lucene/site/src/documentation/content/xdocs/gettingstarted.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/gettingstarted.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/gettingstarted.xml (working copy) @@ -1,41 +0,0 @@ - - -
    - - Apache Lucene - Getting Started Guide - -
    - -Andrew C. Oliver - - - -
    - Getting Started -

    -This document is intended as a "getting started" guide. It has three audiences: first-time users -looking to install Apache Lucene in their application; developers looking to modify or base -the applications they develop on Lucene; and developers looking to become involved in and contribute -to the development of Lucene. This document is written in tutorial and walk-through format. The -goal is to help you "get started". It does not go into great depth on some of the conceptual or -inner details of Lucene. -

    - -

    -Each section listed below builds on one another. More advanced users -may wish to skip sections. -

    - - -
    - - -
    - Index: lucene/site/src/documentation/content/xdocs/tabs.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/tabs.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/tabs.xml (working copy) @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/content/xdocs/queryparsersyntax.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/queryparsersyntax.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/queryparsersyntax.xml (working copy) @@ -1,239 +0,0 @@ - - -
    - - Apache Lucene - Query Parser Syntax - -
    - - Peter Carlson - - -
    - Overview -

    Although Lucene provides the ability to create your own - queries through its API, it also provides a rich query - language through the Query Parser, a lexer which - interprets a string into a Lucene Query using JavaCC. -

    - -

    Generally, the query parser syntax may change from - release to release. This page describes the syntax as of - the current release. If you are using a different - version of Lucene, please consult the copy of - docs/queryparsersyntax.html that was distributed - with the version you are using. -

    - -

    - Before choosing to use the provided Query Parser, please consider the following: -

      -
    1. If you are programmatically generating a query string and then - parsing it with the query parser then you should seriously consider building - your queries directly with the query API. In other words, the query - parser is designed for human-entered text, not for program-generated - text.
    2. - -
    3. Untokenized fields are best added directly to queries, and not - through the query parser. If a field's values are generated programmatically - by the application, then so should query clauses for this field. - An analyzer, which the query parser uses, is designed to convert human-entered - text to terms. Program-generated values, like dates, keywords, etc., - should be consistently program-generated.
    4. - -
    5. In a query form, fields which are general text should use the query - parser. All others, such as date ranges, keywords, etc. are better added - directly through the query API. A field with a limit set of values, - that can be specified with a pull-down menu should not be added to a - query string which is subsequently parsed, but rather added as a - TermQuery clause.
    6. -
    -

    -
    - -
    - Terms -

    A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.

    -

    A Single Term is a single word such as "test" or "hello".

    -

    A Phrase is a group of words surrounded by double quotes such as "hello dolly".

    -

    Multiple terms can be combined together with Boolean operators to form a more complex query (see below).

    -

    Note: The analyzer used to create the index will be used on the terms and phrases in the query string. - So it is important to choose an analyzer that will not interfere with the terms used in the query string.

    -
    - -
    - Fields -

    Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.

    -

    You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.

    -

    As an example, let's assume a Lucene index contains two fields, title and text and text is the default field. - If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:

    - - title:"The Right Way" AND text:go -

    or

    - title:"Do it right" AND right -

    Since text is the default field, the field indicator is not required.

    - -

    Note: The field is only valid for the term that it directly precedes, so the query

    - title:Do it right -

    Will only find "Do" in the title field. It will find "it" and "right" in the default field (in this case the text field).

    -
    - -
    - Term Modifiers -

    Lucene supports modifying query terms to provide a wide range of searching options.

    - -
    - Wildcard Searches -

    Lucene supports single and multiple character wildcard searches within single terms - (not within phrase queries).

    -

    To perform a single character wildcard search use the "?" symbol.

    -

    To perform a multiple character wildcard search use the "*" symbol.

    -

    The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

    - - te?t - -

    Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

    - test* -

    You can also use the wildcard searches in the middle of a term.

    - te*t -

    Note: You cannot use a * or ? symbol as the first character of a search.

    -
    - - -
    - Fuzzy Searches -

    Lucene supports fuzzy searches based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:

    - - roam~ -

    This search will find terms like foam and roams.

    - -

    Starting with Lucene 1.9 an additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:

    - roam~0.8 -

    The default that is used if the parameter is not given is 0.5.

    -
    - - -
    - Proximity Searches -

    Lucene supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "apache" and "jakarta" within 10 words of each other in a document use the search:

    - - "jakarta apache"~10 -
    - - -
    - Range Searches -

    Range Queries allow one to match documents whose field(s) values - are between the lower and upper bound specified by the Range Query. - Range Queries can be inclusive or exclusive of the upper and lower bounds. - Sorting is done lexicographically.

    - mod_date:[20020101 TO 20030101] -

    This will find documents whose mod_date fields have values between 20020101 and 20030101, inclusive. - Note that Range Queries are not reserved for date fields. You could also use range queries with non-date fields:

    - title:{Aida TO Carmen} -

    This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.

    -

    Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by - curly brackets.

    -
    - - -
    - Boosting a Term -

    Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

    -

    Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for

    - - jakarta apache -

    and you want the term "jakarta" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. - You would type:

    - jakarta^4 apache -

    This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example:

    - - "jakarta apache"^4 "Apache Lucene" -

    By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)

    -
    - -
    - - -
    - Boolean Operators -

    Boolean operators allow terms to be combined through logic operators. - Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).

    - -
    -

    The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. - The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. - The symbol || can be used in place of the word OR.

    -

    To search for documents that contain either "jakarta apache" or just "jakarta" use the query:

    - - "jakarta apache" jakarta - -

    or

    - - "jakarta apache" OR jakarta - -
    -
    - AND -

    The AND operator matches documents where both terms exist anywhere in the text of a single document. - This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

    -

    To search for documents that contain "jakarta apache" and "Apache Lucene" use the query:

    - - "jakarta apache" AND "Apache Lucene" -
    - -
    - + -

    The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.

    -

    To search for documents that must contain "jakarta" and may contain "lucene" use the query:

    - - +jakarta lucene -
    - -
    - NOT -

    The NOT operator excludes documents that contain the term after NOT. - This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.

    -

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    - - "jakarta apache" NOT "Apache Lucene" -

    Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:

    - - NOT "jakarta apache" -
    - -
    - - -

    The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.

    -

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    - - "jakarta apache" -"Apache Lucene" -
    - -
    - -
    - Grouping -

    Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

    -

    To search for either "jakarta" or "apache" and "website" use the query:

    - (jakarta OR apache) AND website -

    This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.

    -
    - -
    - Field Grouping -

    Lucene supports using parentheses to group multiple clauses to a single field.

    -

    To search for a title that contains both the word "return" and the phrase "pink panther" use the query:

    - title:(+return +"pink panther") -
    - -
    - Escaping Special Characters -

    Lucene supports escaping special characters that are part of the query syntax. The current list special characters are

    -

    + - && || ! ( ) { } [ ] ^ " ~ * ? : \

    -

    To escape these character use the \ before the character. For example to search for (1+1):2 use the query:

    - \(1\+1\)\:2 -
    - - -
    Index: lucene/site/src/documentation/content/xdocs/fileformats.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/fileformats.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/fileformats.xml (working copy) @@ -1,1934 +0,0 @@ - - - -
    - - Apache Lucene - Index File Formats - -
    - - -
    Index File Formats - -

    - This document defines the index file formats used - in this version of Lucene. If you are using a different - version of Lucene, please consult the copy of - docs/fileformats.html - that was distributed - with the version you are using. -

    - -

    - Apache Lucene is written in Java, but several - efforts are underway to write - versions - of Lucene in other programming - languages. If these versions are to remain compatible with Apache - Lucene, then a language-independent definition of the Lucene index - format is required. This document thus attempts to provide a - complete and independent definition of the Apache Lucene file - formats. -

    - -

    - As Lucene evolves, this document should evolve. - Versions of Lucene in different programming languages should endeavor - to agree on file formats, and generate new versions of this document. -

    - -

    - Compatibility notes are provided in this document, - describing how file formats have changed from prior versions. -

    - -

    - In version 2.1, the file format was changed to allow - lock-less commits (ie, no more commit lock). The - change is fully backwards compatible: you can open a - pre-2.1 index for searching or adding/deleting of - docs. When the new segments file is saved - (committed), it will be written in the new file format - (meaning no specific "upgrade" process is needed). - But note that once a commit has occurred, pre-2.1 - Lucene will not be able to read the index. -

    - -

    - In version 2.3, the file format was changed to allow - segments to share a single set of doc store (vectors & - stored fields) files. This allows for faster indexing - in certain cases. The change is fully backwards - compatible (in the same way as the lock-less commits - change in 2.1). -

    - -

    - In version 2.4, Strings are now written as true UTF-8 - byte sequence, not Java's modified UTF-8. See issue - LUCENE-510 for details. -

    - -

    - In version 2.9, an optional opaque Map<String,String> - CommitUserData may be passed to IndexWriter's commit - methods (and later retrieved), which is recorded in - the segments_N file. See issue LUCENE-1382 for - details. Also, diagnostics were added to each segment - written recording details about why it was written - (due to flush, merge; which OS/JRE was used; etc.). - See issue LUCENE-1654 for details. -

    - -

    - In version 3.0, compressed fields are no longer - written to the index (they can still be read, but on - merge the new segment will write them, - uncompressed). See issue LUCENE-1960 for details. -

    - -

    - In version 3.1, segments records the code version - that created them. See LUCENE-2720 for details. - - Additionally segments track explicitly whether or - not they have term vectors. See LUCENE-2811 for details. -

    -

    - In version 3.2, numeric fields are written as natively - to stored fields file, previously they were stored in - text format only. -

    -

    - In version 3.4, fields can omit position data while - still indexing term frequencies. -

    -
    - -
    Definitions - -

    - The fundamental concepts in Lucene are index, - document, field and term. -

    - - -

    - An index contains a sequence of documents. -

    - -
      -
    • -

      - A document is a sequence of fields. -

      -
    • - -
    • -

      - A field is a named sequence of terms. -

      -
    • - -
    • - A term is a string. -
    • -
    - -

    - The same string in two different fields is - considered a different term. Thus terms are represented as a pair of - strings, the first naming the field, and the second naming text - within the field. -

    - -
    Inverted Indexing - -

    - The index stores statistics about terms in order - to make term-based search more efficient. Lucene's - index falls into the family of indexes known as an inverted - index. This is because it can list, for a term, the documents that contain - it. This is the inverse of the natural relationship, in which - documents list terms. -

    -
    -
    - Types of Fields -

    - In Lucene, fields may be stored, in which - case their text is stored in the index literally, in a non-inverted - manner. Fields that are inverted are called indexed. A field - may be both stored and indexed.

    - -

    The text of a field may be tokenized into terms to be - indexed, or the text of a field may be used literally as a term to be indexed. - Most fields are - tokenized, but sometimes it is useful for certain identifier fields - to be indexed literally. -

    -

    See the Field java docs for more information on Fields.

    -
    - -
    Segments - -

    - Lucene indexes may be composed of multiple sub-indexes, or - segments. Each segment is a fully independent index, which could be searched - separately. Indexes evolve by: -

    - -
      -
    1. -

      Creating new segments for newly added documents.

      -
    2. -
    3. -

      Merging existing segments.

      -
    4. -
    - -

    - Searches may involve multiple segments and/or multiple indexes, each - index potentially composed of a set of segments. -

    -
    - -
    Document Numbers - -

    - Internally, Lucene refers to documents by an integer document - number. The first document added to an index is numbered zero, and each - subsequent document added gets a number one greater than the previous. -

    - -

    -
    -

    - -

    - Note that a document's number may change, so caution should be taken - when storing these numbers outside of Lucene. In particular, numbers may - change in the following situations: -

    - - -
      -
    • -

      - The - numbers stored in each segment are unique only within the segment, - and must be converted before they can be used in a larger context. - The standard technique is to allocate each segment a range of - values, based on the range of numbers used in that segment. To - convert a document number from a segment to an external value, the - segment's base document - number is added. To convert an external value back to a - segment-specific value, the segment is identified by the range that - the external value is in, and the segment's base value is - subtracted. For example two five document segments might be - combined, so that the first segment has a base value of zero, and - the second of five. Document three from the second segment would - have an external value of eight. -

      -
    • -
    • -

      - When documents are deleted, gaps are created - in the numbering. These are eventually removed as the index evolves - through merging. Deleted documents are dropped when segments are - merged. A freshly-merged segment thus has no gaps in its numbering. -

      -
    • -
    - -
    - -
    - -
    Overview - -

    - Each segment index maintains the following: -

    -
      -
    • -

      Field names. This - contains the set of field names used in the index. - -

      -
    • -
    • -

      Stored Field - values. This contains, for each document, a list of attribute-value - pairs, where the attributes are field names. These are used to - store auxiliary information about the document, such as its title, - url, or an identifier to access a - database. The set of stored fields are what is returned for each hit - when searching. This is keyed by document number. -

      -
    • -
    • -

      Term dictionary. - A dictionary containing all of the terms used in all of the indexed - fields of all of the documents. The dictionary also contains the - number of documents which contain the term, and pointers to the - term's frequency and proximity data. -

      -
    • - -
    • -

      Term Frequency - data. For each term in the dictionary, the numbers of all the - documents that contain that term, and the frequency of the term in - that document, unless frequencies are omitted (IndexOptions.DOCS_ONLY) -

      -
    • - -
    • -

      Term Proximity - data. For each term in the dictionary, the positions that the term - occurs in each document. Note that this will - not exist if all fields in all documents omit position data. -

      -
    • - -
    • -

      Normalization - factors. For each field in each document, a value is stored that is - multiplied into the score for hits on that field. -

      -
    • -
    • -

      Term Vectors. For each field in each document, the term vector - (sometimes called document vector) may be stored. A term vector consists - of term text and term frequency. To add Term Vectors to your index see the - Field - constructors -

      -
    • -
    • -

      Deleted documents. - An optional file indicating which documents are deleted. -

      -
    • -
    - -

    Details on each of these are provided in subsequent sections. -

    -
    - -
    File Naming - -

    - All files belonging to a segment have the same name with varying - extensions. The extensions correspond to the different file formats - described below. When using the Compound File format (default in 1.4 and greater) these files are - collapsed into a single .cfs file (see below for details) -

    - -

    - Typically, all segments - in an index are stored in a single directory, although this is not - required. -

    - -

    - As of version 2.1 (lock-less commits), file names are - never re-used (there is one exception, "segments.gen", - see below). That is, when any file is saved to the - Directory it is given a never before used filename. - This is achieved using a simple generations approach. - For example, the first segments file is segments_1, - then segments_2, etc. The generation is a sequential - long integer represented in alpha-numeric (base 36) - form. -

    - -
    -
    Summary of File Extensions -

    The following table summarizes the names and extensions of the files in Lucene: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameExtensionBrief Description
    Segments Filesegments.gen, segments_NStores information about segments
    Lock Filewrite.lockThe Write lock prevents multiple IndexWriters from writing to the same file.
    Compound File.cfsAn optional "virtual" file consisting of all the other index files for systems - that frequently run out of file handles.
    Compound File Entry table.cfeThe "virtual" compound file's entry table holding all entries in the corresponding .cfs file (Since 3.4)
    Fields.fnmStores information about the fields
    Field Index.fdxContains pointers to field data
    Field Data.fdtThe stored fields for documents
    Term Infos.tisPart of the term dictionary, stores term info
    Term Info Index.tiiThe index into the Term Infos file
    Frequencies.frqContains the list of docs which contain each term along with frequency
    Positions.prxStores position information about where a term occurs in the index
    Norms.nrmEncodes length and boost factors for docs and fields
    Term Vector Index.tvxStores offset into the document data file
    Term Vector Documents.tvdContains information about each document that has term vectors
    Term Vector Fields.tvfThe field level info about term vectors
    Deleted Documents.delInfo about what files are deleted
    - -

    -
    - -
    Primitive Types - -
    Byte - -

    - The most primitive type - is an eight-bit byte. Files are accessed as sequences of bytes. All - other data types are defined as sequences - of bytes, so file formats are byte-order independent. -

    - -
    - -
    UInt32 - -

    - 32-bit unsigned integers are written as four - bytes, high-order bytes first. -

    -

    - UInt32 --> <Byte>4 -

    - -
    - -
    Uint64 - -

    - 64-bit unsigned integers are written as eight - bytes, high-order bytes first. -

    - -

    UInt64 --> <Byte>8 -

    - -
    - -
    VInt - -

    - A variable-length format for positive integers is - defined where the high-order bit of each byte indicates whether more - bytes remain to be read. The low-order seven bits are appended as - increasingly more significant bits in the resulting integer value. - Thus values from zero to 127 may be stored in a single byte, values - from 128 to 16,383 may be stored in two bytes, and so on. -

    - -

    - VInt Encoding Example -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Value -

    -
    -

    - First byte -

    -
    -

    - Second byte -

    -
    -

    - Third byte -

    -
    -

    0 -

    -
    -

    - 00000000 -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    1 -

    -
    -

    - 00000001 -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    2 -

    -
    -

    - 00000010 -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    ... -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    127 -

    -
    -

    - 01111111 -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    128 -

    -
    -

    - 10000000 -

    -
    -

    - 00000001 -

    -
    -

    -
    - -

    -
    -

    129 -

    -
    -

    - 10000001 -

    -
    -

    - 00000001 -

    -
    -

    -
    - -

    -
    -

    130 -

    -
    -

    - 10000010 -

    -
    -

    - 00000001 -

    -
    -

    -
    - -

    -
    -

    ... -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    16,383 -

    -
    -

    - 11111111 -

    -
    -

    - 01111111 -

    -
    -

    -
    - -

    -
    -

    16,384 -

    -
    -

    - 10000000 -

    -
    -

    - 10000000 -

    -
    -

    - 00000001 -

    -
    -

    16,385 -

    -
    -

    - 10000001 -

    -
    -

    - 10000000 -

    -
    -

    - 00000001 -

    -
    -

    ... -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    - -

    - This provides compression while still being - efficient to decode. -

    - -
    - -
    Chars - -

    - Lucene writes unicode - character sequences as UTF-8 encoded bytes. -

    - - -
    - -
    String - -

    - Lucene writes strings as UTF-8 encoded bytes. - First the length, in bytes, is written as a VInt, - followed by the bytes. -

    - -

    - String --> VInt, Chars -

    - -
    -
    - -
    Compound Types -
    Map<String,String> - -

    - In a couple places Lucene stores a Map - String->String. -

    - -

    - Map<String,String> --> Count<String,String>Count -

    - -
    - -
    - -
    Per-Index Files - -

    - The files in this section exist one-per-index. -

    - -
    Segments File - -

    - The active segments in the index are stored in the - segment info file, - segments_N. - There may - be one or more - segments_N - files in the - index; however, the one with the largest - generation is the active one (when older - segments_N files are present it's because they - temporarily cannot be deleted, or, a writer is in - the process of committing, or a custom - IndexDeletionPolicy - is in use). This file lists each - segment by name, has details about the separate - norms and deletion files, and also contains the - size of each segment. -

    - -

    - As of 2.1, there is also a file - segments.gen. - This file contains the - current generation (the - _N - in - segments_N) - of the index. This is - used only as a fallback in case the current - generation cannot be accurately determined by - directory listing alone (as is the case for some - NFS clients with time-based directory cache - expiraation). This file simply contains an Int32 - version header (SegmentInfos.FORMAT_LOCKLESS = - -2), followed by the generation recorded as Int64, - written twice. -

    -

    - 3.1 - Segments --> Format, Version, NameCounter, SegCount, <SegVersion, SegName, SegSize, DelGen, DocStoreOffset, [DocStoreSegment, DocStoreIsCompoundFile], HasSingleNormFile, NumField, - NormGenNumField, - IsCompoundFile, DeletionCount, HasProx, Diagnostics, HasVectors>SegCount, CommitUserData, Checksum -

    - -

    - Format, NameCounter, SegCount, SegSize, NumField, - DocStoreOffset, DeletionCount --> Int32 -

    - -

    - Version, DelGen, NormGen, Checksum --> Int64 -

    - -

    - SegVersion, SegName, DocStoreSegment --> String -

    - -

    - Diagnostics --> Map<String,String> -

    - -

    - IsCompoundFile, HasSingleNormFile, - DocStoreIsCompoundFile, HasProx, HasVectors --> Int8 -

    - -

    - CommitUserData --> Map<String,String> -

    - -

    - Format is -9 (SegmentInfos.FORMAT_DIAGNOSTICS). -

    - -

    - Version counts how often the index has been - changed by adding or deleting documents. -

    - -

    - NameCounter is used to generate names for new segment files. -

    - -

    - SegVersion is the code version that created the segment. -

    - -

    - SegName is the name of the segment, and is used as the file name prefix - for all of the files that compose the segment's index. -

    - -

    - SegSize is the number of documents contained in the segment index. -

    - -

    - DelGen is the generation count of the separate - deletes file. If this is -1, there are no - separate deletes. If it is 0, this is a pre-2.1 - segment and you must check filesystem for the - existence of _X.del. Anything above zero means - there are separate deletes (_X_N.del). -

    - -

    - NumField is the size of the array for NormGen, or - -1 if there are no NormGens stored. -

    - -

    - NormGen records the generation of the separate - norms files. If NumField is -1, there are no - normGens stored and they are all assumed to be 0 - when the segment file was written pre-2.1 and all - assumed to be -1 when the segments file is 2.1 or - above. The generation then has the same meaning - as delGen (above). -

    - -

    - IsCompoundFile records whether the segment is - written as a compound file or not. If this is -1, - the segment is not a compound file. If it is 1, - the segment is a compound file. Else it is 0, - which means we check filesystem to see if _X.cfs - exists. -

    - -

    - If HasSingleNormFile is 1, then the field norms are - written as a single joined file (with extension - .nrm); if it is 0 then each field's norms - are stored as separate .fN files. See - "Normalization Factors" below for details. -

    - -

    - DocStoreOffset, DocStoreSegment, - DocStoreIsCompoundFile: If DocStoreOffset is -1, - this segment has its own doc store (stored fields - values and term vectors) files and DocStoreSegment - and DocStoreIsCompoundFile are not stored. In - this case all files for stored field values - (*.fdt and *.fdx) and term - vectors (*.tvf, *.tvd and - *.tvx) will be stored with this segment. - Otherwise, DocStoreSegment is the name of the - segment that has the shared doc store files; - DocStoreIsCompoundFile is 1 if that segment is - stored in compound file format (as a .cfx - file); and DocStoreOffset is the starting document - in the shared doc store files where this segment's - documents begin. In this case, this segment does - not store its own doc store files but instead - shares a single set of these files with other - segments. -

    - -

    - Checksum contains the CRC32 checksum of all bytes - in the segments_N file up until the checksum. - This is used to verify integrity of the file on - opening the index. -

    - -

    - DeletionCount records the number of deleted - documents in this segment. -

    - -

    - HasProx is 1 if any fields in this segment have - position data (IndexOptions.DOCS_AND_FREQS_AND_POSITIONS); else, it's 0. -

    - -

    - CommitUserData stores an optional user-supplied - opaque Map<String,String> that was passed to - IndexWriter's commit or prepareCommit, or - IndexReader's flush methods. -

    -

    - The Diagnostics Map is privately written by - IndexWriter, as a debugging aid, for each segment - it creates. It includes metadata like the current - Lucene version, OS, Java version, why the segment - was created (merge, flush, addIndexes), etc. -

    - -

    HasVectors is 1 if this segment stores term vectors, - else it's 0. -

    - -
    - -
    Lock File - -

    - The write lock, which is stored in the index - directory by default, is named "write.lock". If - the lock directory is different from the index - directory then the write lock will be named - "XXXX-write.lock" where XXXX is a unique prefix - derived from the full path to the index directory. - When this file is present, a writer is currently - modifying the index (adding or removing - documents). This lock file ensures that only one - writer is modifying the index at a time. -

    -
    - -
    Deletable File - -

    - A writer dynamically computes - the files that are deletable, instead, so no file - is written. -

    - -
    - -
    Compound Files - -

    Starting with Lucene 1.4 the compound file format became default. This - is simply a container for all files described in the next section - (except for the .del file).

    -

    Compound Entry Table (.cfe) --> Version, FileCount, <FileName, DataOffset, DataLength> - FileCount -

    - -

    Compound (.cfs) --> FileData FileCount -

    - -

    Version --> Int

    - -

    FileCount --> VInt

    - -

    DataOffset --> Long

    - -

    DataLength --> Long

    - -

    FileName --> String

    - -

    FileData --> raw file data

    -

    The raw file data is the data from the individual files named above.

    - -

    Starting with Lucene 2.3, doc store files (stored - field values and term vectors) can be shared in a - single set of files for more than one segment. When - compound file is enabled, these shared files will be - added into a single compound file (same format as - above) but with the extension .cfx. -

    - -
    - -
    - -
    Per-Segment Files - -

    - The remaining files are all per-segment, and are - thus defined by suffix. -

    -
    Fields -

    -
    - Field Info -
    -

    - -

    - Field names are - stored in the field info file, with suffix .fnm. -

    -

    - FieldInfos - (.fnm) --> FNMVersion,FieldsCount, <FieldName, - FieldBits> - FieldsCount -

    - -

    - FNMVersion, FieldsCount --> VInt -

    - -

    - FieldName --> String -

    - -

    - FieldBits --> Byte -

    - -

    -

      -
    • - The low-order bit is one for - indexed fields, and zero for non-indexed fields. -
    • -
    • - The second lowest-order - bit is one for fields that have term vectors stored, and zero for fields - without term vectors. -
    • -
    • If the fifth lowest-order bit is set (0x10), norms are omitted for the indexed field.
    • -
    • If the sixth lowest-order bit is set (0x20), payloads are stored for the indexed field.
    • -
    • If the seventh lowest-order bit is set (0x40), term frequencies and positions omitted for the indexed field.
    • -
    • If the eighth lowest-order bit is set (0x80), positions are omitted for the indexed field.
    • -
    -

    - -

    - FNMVersion (added in 2.9) is -2 for indexes from 2.9 - 3.3. It is -3 for indexes in Lucene 3.4+ -

    - -

    - Fields are numbered by their order in this file. Thus field zero is - the - first field in the file, field one the next, and so on. Note that, - like document numbers, field numbers are segment relative. -

    - - - -

    -
    - Stored Fields -
    -

    - -

    - Stored fields are represented by two files: -

    - -
      -
    1. -

      - The field index, or .fdx file. -

      - -

      - This contains, for each document, a pointer to - its field data, as follows: -

      - -

      - FieldIndex - (.fdx) --> - <FieldValuesPosition> - SegSize -

      -

      FieldValuesPosition - --> Uint64 -

      -

      This - is used to find the location within the field data file of the - fields of a particular document. Because it contains fixed-length - data, this file may be easily randomly accessed. The position of - document - n - 's - - field data is the Uint64 at - n*8 - in - this file. -

      -
    2. -
    3. -

      - The field data, or .fdt file. - -

      - -

      - This contains the stored fields of each document, - as follows: -

      - -

      - FieldData (.fdt) --> - <DocFieldData> - SegSize -

      -

      DocFieldData --> - FieldCount, <FieldNum, Bits, Value> - FieldCount -

      -

      FieldCount --> - VInt -

      -

      FieldNum --> - VInt -

      -

      Bits --> - Byte -

      -

      -

        -
      • low order bit is one for tokenized fields
      • -
      • second bit is one for fields containing binary data
      • -
      • third bit is one for fields with compression option enabled - (if compression is enabled, the algorithm used is ZLIB), - only available for indexes until Lucene version 2.9.x
      • -
      • 4th to 6th bit (mask: 0x7<<3) define the type of a - numeric field:
          -
        • all bits in mask are cleared if no numeric field at all
        • -
        • 1<<3: Value is Int
        • -
        • 2<<3: Value is Long
        • -
        • 3<<3: Value is Int as Float (as of Float.intBitsToFloat)
        • -
        • 4<<3: Value is Long as Double (as of Double.longBitsToDouble)
        • -
      • -
      -

      -

      Value --> - String | BinaryValue | Int | Long (depending on Bits) -

      -

      BinaryValue --> - ValueSize, <Byte>^ValueSize -

      -

      ValueSize --> - VInt -

      - -
    4. -
    - -
    -
    Term Dictionary - -

    - The term dictionary is represented as two files: -

    -
      -
    1. -

      - The term infos, or tis file. -

      - -

      - TermInfoFile (.tis)--> - TIVersion, TermCount, IndexInterval, SkipInterval, MaxSkipLevels, TermInfos -

      -

      TIVersion --> - UInt32 -

      -

      TermCount --> - UInt64 -

      -

      IndexInterval --> - UInt32 -

      -

      SkipInterval --> - UInt32 -

      -

      MaxSkipLevels --> - UInt32 -

      -

      TermInfos --> - <TermInfo> - TermCount -

      -

      TermInfo --> - <Term, DocFreq, FreqDelta, ProxDelta, SkipDelta> -

      -

      Term --> - <PrefixLength, Suffix, FieldNum> -

      -

      Suffix --> - String -

      -

      PrefixLength, - DocFreq, FreqDelta, ProxDelta, SkipDelta -
      - --> VInt -

      -

      - This file is sorted by Term. Terms are - ordered first lexicographically (by UTF16 - character code) by the term's field name, - and within that lexicographically (by - UTF16 character code) by the term's text. -

      -

      TIVersion names the version of the format - of this file and is equal to TermInfosWriter.FORMAT_CURRENT. -

      -

      Term - text prefixes are shared. The PrefixLength is the number of initial - characters from the previous term which must be pre-pended to a - term's suffix in order to form the term's text. Thus, if the - previous term's text was "bone" and the term is "boy", - the PrefixLength is two and the suffix is "y". -

      -

      FieldNumber - determines the term's field, whose name is stored in the .fdt file. -

      -

      DocFreq - is the count of documents which contain the term. -

      -

      FreqDelta - determines the position of this term's TermFreqs within the .frq - file. In particular, it is the difference between the position of - this term's data in that file and the position of the previous - term's data (or zero, for the first term in the file). -

      -

      ProxDelta - determines the position of this term's TermPositions within the .prx - file. In particular, it is the difference between the position of - this term's data in that file and the position of the previous - term's data (or zero, for the first term in the file. For fields - that omit position data, this will be 0 since - prox information is not stored. -

      -

      SkipDelta determines the position of this - term's SkipData within the .frq file. In - particular, it is the number of bytes - after TermFreqs that the SkipData starts. - In other words, it is the length of the - TermFreq data. SkipDelta is only stored - if DocFreq is not smaller than SkipInterval. -

      -
    2. -
    3. -

      - The term info index, or .tii file. -

      - -

      - This contains every IndexInterval - th - entry from the .tis - file, along with its location in the "tis" file. This is - designed to be read entirely into memory and used to provide random - access to the "tis" file. -

      - -

      - The structure of this file is very similar to the - .tis file, with the addition of one item per record, the IndexDelta. -

      - -

      - TermInfoIndex (.tii)--> - TIVersion, IndexTermCount, IndexInterval, SkipInterval, MaxSkipLevels, TermIndices -

      -

      TIVersion --> - UInt32 -

      -

      IndexTermCount --> - UInt64 -

      -

      IndexInterval --> - UInt32 -

      -

      SkipInterval --> - UInt32 -

      -

      TermIndices --> - <TermInfo, IndexDelta> - IndexTermCount -

      -

      IndexDelta --> - VLong -

      -

      IndexDelta - determines the position of this term's TermInfo within the .tis file. In - particular, it is the difference between the position of this term's - entry in that file and the position of the previous term's entry. -

      -

      SkipInterval is the fraction of TermDocs stored in skip tables. It is used to accelerate TermDocs.skipTo(int). - Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while - smaller values result in bigger indexes, less acceleration (in case of a small value for MaxSkipLevels) and more - accelerable cases.

      -

      MaxSkipLevels is the max. number of skip levels stored for each term in the .frq file. A low value results in - smaller indexes but less acceleration, a larger value results in slighly larger indexes but greater acceleration. - See format of .frq file for more information about skip levels.

      -
    4. -
    -
    - -
    Frequencies - -

    - The .frq file contains the lists of documents - which contain each term, along with the frequency of the term in that - document (except when frequencies are omitted: IndexOptions.DOCS_ONLY). -

    -

    FreqFile (.frq) --> - <TermFreqs, SkipData> - TermCount -

    -

    TermFreqs --> - <TermFreq> - DocFreq -

    -

    TermFreq --> - DocDelta[, Freq?] -

    -

    SkipData --> - <<SkipLevelLength, SkipLevel> - NumSkipLevels-1, SkipLevel> - <SkipDatum> -

    -

    SkipLevel --> - <SkipDatum> - DocFreq/(SkipInterval^(Level + 1)) -

    -

    SkipDatum --> - DocSkip,PayloadLength?,FreqSkip,ProxSkip,SkipChildLevelPointer? -

    -

    DocDelta,Freq,DocSkip,PayloadLength,FreqSkip,ProxSkip --> - VInt -

    -

    SkipChildLevelPointer --> - VLong -

    -

    TermFreqs - are ordered by term (the term is implicit, from the .tis file). -

    -

    TermFreq - entries are ordered by increasing document number. -

    -

    DocDelta: if frequencies are indexed, this determines both - the document number and the frequency. In - particular, DocDelta/2 is the difference between - this document number and the previous document - number (or zero when this is the first document in - a TermFreqs). When DocDelta is odd, the frequency - is one. When DocDelta is even, the frequency is - read as another VInt. If frequencies are omitted, DocDelta - contains the gap (not multiplied by 2) between - document numbers and no frequency information is - stored. -

    -

    For example, the TermFreqs for a term which occurs - once in document seven and three times in document - eleven, with frequencies indexed, would be the following - sequence of VInts: -

    -

    15, 8, 3 -

    -

    If frequencies were omitted (IndexOptions.DOCS_ONLY) it would be this sequence - of VInts instead: -

    -

    - 7,4 -

    -

    DocSkip records the document number before every - SkipInterval - th - document in TermFreqs. - If payloads are disabled for the term's field, - then DocSkip represents the difference from the - previous value in the sequence. - If payloads are enabled for the term's field, - then DocSkip/2 represents the difference from the - previous value in the sequence. If payloads are enabled - and DocSkip is odd, - then PayloadLength is stored indicating the length - of the last payload before the SkipIntervalth - document in TermPositions. - FreqSkip and ProxSkip record the position of every - SkipInterval - th - entry in FreqFile and - ProxFile, respectively. File positions are - relative to the start of TermFreqs and Positions, - to the previous SkipDatum in the sequence. -

    -

    For example, if DocFreq=35 and SkipInterval=16, - then there are two SkipData entries, containing - the 15 - th - and 31 - st - document - numbers in TermFreqs. The first FreqSkip names - the number of bytes after the beginning of - TermFreqs that the 16 - th - SkipDatum - starts, and the second the number of bytes after - that that the 32 - nd - starts. The first - ProxSkip names the number of bytes after the - beginning of Positions that the 16 - th - SkipDatum starts, and the second the number of - bytes after that that the 32 - nd - starts. -

    -

    Each term can have multiple skip levels. - The amount of skip levels for a term is NumSkipLevels = Min(MaxSkipLevels, floor(log(DocFreq/log(SkipInterval)))). - The number of SkipData entries for a skip level is DocFreq/(SkipInterval^(Level + 1)), whereas the lowest skip - level is Level=0.

    - Example: SkipInterval = 4, MaxSkipLevels = 2, DocFreq = 35. Then skip level 0 has 8 SkipData entries, - containing the 3rd, 7th, 11th, 15th, 19th, 23rd, - 27th, and 31st document numbers in TermFreqs. Skip level 1 has 2 SkipData entries, containing the - 15th and 31st document numbers in TermFreqs.

    - The SkipData entries on all upper levels > 0 contain a SkipChildLevelPointer referencing the corresponding SkipData - entry in level-1. In the example has entry 15 on level 1 a pointer to entry 15 on level 0 and entry 31 on level 1 a pointer - to entry 31 on level 0. -

    - -
    -
    Positions - -

    - The .prx file contains the lists of positions that - each term occurs at within documents. Note that - fields omitting positional data do not store - anything into this file, and if all fields in the - index omit positional data then the .prx file will not - exist. -

    -

    ProxFile (.prx) --> - <TermPositions> - TermCount -

    -

    TermPositions --> - <Positions> - DocFreq -

    -

    Positions --> - <PositionDelta,Payload?> - Freq -

    -

    Payload --> - <PayloadLength?,PayloadData> -

    -

    PositionDelta --> - VInt -

    -

    PayloadLength --> - VInt -

    -

    PayloadData --> - bytePayloadLength -

    -

    TermPositions - are ordered by term (the term is implicit, from the .tis file). -

    -

    Positions - entries are ordered by increasing document number (the document - number is implicit from the .frq file). -

    -

    PositionDelta - is, if payloads are disabled for the term's field, the difference - between the position of the current occurrence in - the document and the previous occurrence (or zero, if this is the - first occurrence in this document). - If payloads are enabled for the term's field, then PositionDelta/2 - is the difference between the current and the previous position. If - payloads are enabled and PositionDelta is odd, then PayloadLength is - stored, indicating the length of the payload at the current term position. -

    -

    - For example, the TermPositions for a - term which occurs as the fourth term in one document, and as the - fifth and ninth term in a subsequent document, would be the following - sequence of VInts (payloads disabled): -

    -

    4, - 5, 4 -

    -

    PayloadData - is metadata associated with the current term position. If PayloadLength - is stored at the current position, then it indicates the length of this - Payload. If PayloadLength is not stored, then this Payload has the same - length as the Payload at the previous position. -

    -
    -
    Normalization Factors - -

    There's a single .nrm file containing all norms: -

    -

    AllNorms - (.nrm) --> NormsHeader,<Norms> - NumFieldsWithNorms -

    -

    Norms - --> <Byte> - SegSize -

    -

    NormsHeader - --> 'N','R','M',Version -

    -

    Version - --> Byte -

    -

    NormsHeader - has 4 bytes, last of which is the format version for this file, currently -1. -

    -

    Each - byte encodes a floating point value. Bits 0-2 contain the 3-bit - mantissa, and bits 3-8 contain the 5-bit exponent. -

    -

    These - are converted to an IEEE single float value as follows: -

    -
      -
    1. -

      If - the byte is zero, use a zero float. -

      -
    2. -
    3. -

      Otherwise, - set the sign bit of the float to zero; -

      -
    4. -
    5. -

      add - 48 to the exponent and use this as the float's exponent; -

      -
    6. -
    7. -

      map - the mantissa to the high-order 3 bits of the float's mantissa; and - -

      -
    8. -
    9. -

      set - the low-order 21 bits of the float's mantissa to zero. -

      -
    10. -
    -

    A separate norm file is created when the norm values of an existing segment are modified. - When field N is modified, a separate norm file .sN - is created, to maintain the norm values for that field. -

    -

    Separate norm files are created (when adequate) for both compound and non compound segments. -

    - -
    -
    Term Vectors -

    - Term Vector support is an optional on a field by - field basis. It consists of 3 files. -

    -
      -
    1. -

      The Document Index or .tvx file.

      -

      For each document, this stores the offset - into the document data (.tvd) and field - data (.tvf) files. -

      -

      DocumentIndex (.tvx) --> TVXVersion<DocumentPosition,FieldPosition> - NumDocs -

      -

      TVXVersion --> Int (TermVectorsReader.CURRENT)

      -

      DocumentPosition --> UInt64 (offset in - the .tvd file)

      -

      FieldPosition --> UInt64 (offset in the - .tvf file)

      -
    2. -
    3. -

      The Document or .tvd file.

      -

      This contains, for each document, the number of fields, a list of the fields with - term vector info and finally a list of pointers to the field information in the .tvf - (Term Vector Fields) file.

      -

      - Document (.tvd) --> TVDVersion<NumFields, FieldNums, FieldPositions> - NumDocs -

      -

      TVDVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      -

      NumFields --> VInt

      -

      FieldNums --> <FieldNumDelta> - NumFields -

      -

      FieldNumDelta --> VInt

      -

      FieldPositions --> <FieldPositionDelta> - NumFields-1 -

      -

      FieldPositionDelta --> VLong

      -

      The .tvd file is used to map out the fields that have term vectors stored and - where the field information is in the .tvf file.

      -
    4. -
    5. -

      The Field or .tvf file.

      -

      This file contains, for each field that has a term vector stored, a list of - the terms, their frequencies and, optionally, position and offest information.

      -

      Field (.tvf) --> TVFVersion<NumTerms, Position/Offset, TermFreqs> - NumFields -

      -

      TVFVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      -

      NumTerms --> VInt

      -

      Position/Offset --> Byte

      -

      TermFreqs --> <TermText, TermFreq, Positions?, Offsets?> - NumTerms -

      -

      TermText --> <PrefixLength, Suffix>

      -

      PrefixLength --> VInt

      -

      Suffix --> String

      -

      TermFreq --> VInt

      -

      Positions --> <VInt>TermFreq

      -

      Offsets --> <VInt, VInt>TermFreq

      -
      -

      Notes:

      -
        -
      • Position/Offset byte stores whether this term vector has position or offset information stored.
      • -
      • Term - text prefixes are shared. The PrefixLength is the number of initial - characters from the previous term which must be pre-pended to a - term's suffix in order to form the term's text. Thus, if the - previous term's text was "bone" and the term is "boy", - the PrefixLength is two and the suffix is "y". -
      • -
      • Positions are stored as delta encoded VInts. This means we only store the difference of the current position from the last position
      • -
      • Offsets are stored as delta encoded VInts. The first VInt is the startOffset, the second is the endOffset.
      • -
      - - -
    6. -
    -
    - -
    Deleted Documents - -

    The .del file is - optional, and only exists when a segment contains deletions. -

    - -

    Although per-segment, this file is maintained exterior to compound segment files. -

    -

    - Deletions - (.del) --> [Format],ByteCount,BitCount, Bits | DGaps (depending on Format) -

    - -

    Format,ByteSize,BitCount --> - Uint32 -

    - -

    Bits --> - <Byte> - ByteCount -

    - -

    DGaps --> - <DGap,NonzeroByte> - NonzeroBytesCount -

    - -

    DGap --> - VInt -

    - -

    NonzeroByte --> - Byte -

    - -

    Format - is Optional. -1 indicates DGaps. Non-negative value indicates Bits, and that Format is excluded. -

    - -

    ByteCount - indicates the number of bytes in Bits. It is typically - (SegSize/8)+1. -

    - -

    - BitCount - indicates the number of bits that are currently set in Bits. -

    - -

    Bits - contains one bit for each document indexed. When the bit - corresponding to a document number is set, that document is marked as - deleted. Bit ordering is from least to most significant. Thus, if - Bits contains two bytes, 0x00 and 0x02, then document 9 is marked as - deleted. -

    - -

    DGaps - represents sparse bit-vectors more efficiently than Bits. - It is made of DGaps on indexes of nonzero bytes in Bits, - and the nonzero bytes themselves. The number of nonzero bytes - in Bits (NonzeroBytesCount) is not stored. -

    -

    For example, - if there are 8000 bits and only bits 10,12,32 are set, - DGaps would be used: -

    -

    - (VInt) 1 , (byte) 20 , (VInt) 3 , (Byte) 1 -

    -
    -
    - -
    Limitations - -

    - When referring to term numbers, Lucene's current - implementation uses a Java int to hold the - term index, which means the maximum number of unique - terms in any single index segment is ~2.1 billion times - the term index interval (default 128) = ~274 billion. - This is technically not a limitation of the index file - format, just of Lucene's current implementation. -

    -

    - Similarly, Lucene uses a Java int to refer - to document numbers, and the index file format uses an - Int32 on-disk to store document numbers. - This is a limitation of both the index file format and - the current implementation. Eventually these should be - replaced with either UInt64 values, or - better yet, VInt values which have no - limit. -

    - -
    - - - -
    Index: lucene/site/src/documentation/content/xdocs/contributions.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/contributions.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/contributions.xml (working copy) @@ -1,350 +0,0 @@ - - -
    - - Apache Lucene - Contributions - -
    - - - Peter Carlson - - - -
    - Overview -

    This page lists external Lucene resources. If you have - written something that should be included, please post all - relevant information to one of the mailing lists. Nothing - listed here is directly supported by the Lucene - developers, so if you encounter any problems with any of - this software, please use the author's contact information - to get help.

    -

    If you are looking for information on contributing patches or other improvements to Lucene, see - How To Contribute on the Lucene Wiki.

    -
    - -
    - Lucene Tools -

    - Software that works with Lucene indices. -

    -
    Luke - - - - - - - - - -
    - URL - - - http://www.getopt.org/luke/ - -
    - author - - Andrzej Bialecki -
    -
    -
    - LIMO (Lucene Index Monitor) - - - - - - - - - -
    - URL - - - http://limo.sf.net/ - -
    - author - - Julien Nioche -
    -
    -
    - -
    - Lucene Document Converters -

    - Lucene requires information you want to index to be - converted into a Document class. Here are - contributions for various solutions that convert different - content types to Lucene's Document classes. -

    -
    - XML Document #1 - - - - - - - - - -
    - URL - - - http://marc.theaimsgroup.com/?l=lucene-dev&m=100723333506246&w=2 - -
    - author - - Philip Ogren - ogren@mayo.edu -
    -
    -
    - XML Document #2 - - - - - - - - - -
    - URL - - - http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00346.html - -
    - author - - Peter Carlson - carlson@bookandhammer.com -
    -
    -
    - PDF Box - - - - - - - - - -
    - URL - - - http://www.pdfbox.org/ - -
    - author - - Ben Litchfield - ben@csh.rit.edu -
    -
    -
    - XPDF - PDF Document Conversion - - - - - - - - - -
    - URL - - - http://www.foolabs.com/xpdf - -
    - author - - N/A -
    -
    -
    - PDFTextStream -- PDF text and metadata extraction - - - - - - - - - -
    - URL - - - http://snowtide.com - -
    - author - - N/A -
    -
    -
    - PJ Classic & PJ Professional - PDF Document Conversion - - - - - - - - - -
    - URL - - - http://www.etymon.com/ - -
    - author - - N/A -
    -
    -
    - -
    - Miscellaneous -

    -

    -
    - Arabic Analyzer for Java - - - - - - - - - -
    - URL - - - http://savannah.nongnu.org/projects/aramorph - -
    - author - - Pierrick Brihaye -
    -
    -
    - Phonetix - - - - - - - - - -
    - URL - - - http://www.companywebstore.de/tangentum/mirror/en/products/phonetix/index.html - -
    - author - - tangentum technologies -
    -
    -
    - ejIndex - JBoss MBean for Lucene -

    -

    - - - - - - - - - -
    - URL - - - http://ejindex.sourceforge.net/ - -
    - author - - Andy Scholz -
    -
    -
    - JavaCC - - - - - - - - - -
    - URL - - - https://javacc.dev.java.net/ - -
    - author - - Sun Microsystems (java.net) -
    -
    -
    - LuSQL - Index databases with Lucene - - - - - - - - - -
    - URL - - - http://lab.cisti-icist.nrc-cnrc.gc.ca/cistilabswiki/index.php/LuSql - -
    - author - - Glen Newton -
    -
    -
    - - Index: lucene/site/src/documentation/content/xdocs/demo.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/demo.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/demo.xml (working copy) @@ -1,79 +0,0 @@ - - -
    - - Apache Lucene - Building and Installing the Basic Demo - -
    - -Andrew C. Oliver - - - -
    About this Document -

    -This document is intended as a "getting started" guide to using and running the Lucene demos. -It walks you through some basic installation and configuration. -

    -
    - - -
    About the Demo -

    -The Lucene command-line demo code consists of an application that demonstrates various -functionalities of Lucene and how you can add Lucene to your applications. -

    -
    - -
    Setting your CLASSPATH -

    -First, you should download the -latest Lucene distribution and then extract it to a working directory. -

    -

    -You need three JARs: the Lucene JAR, the common analysis JAR, and the Lucene demo JAR. You should -see the Lucene JAR file in the core/ directory you created when you extracted the archive -- it -should be named something like lucene-core-{version}.jar. You should also see files -called lucene-analyzers-common-{version}.jar and lucene-demo-{version}.jar -under analysis/common/ and demo/, respectively. -

    -

    -Put all three of these files in your Java CLASSPATH. -

    -
    - -
    Indexing Files -

    -Once you've gotten this far you're probably itching to go. Let's build an index! Assuming -you've set your CLASSPATH correctly, just type: - -

    -    java org.apache.lucene.demo.IndexFiles -docs {path-to-lucene}/src
    -
    - -This will produce a subdirectory called index which will contain an index of all of the -Lucene source code. -

    -

    -To search the index type: - -

    -    java org.apache.lucene.demo.SearchFiles
    -
    - -You'll be prompted for a query. Type in a swear word and press the enter key. You'll see that the -Lucene developers are very well mannered and get no results. Now try entering the word "string". -That should return a whole bunch of documents. The results will page at every tenth result and ask -you whether you want more results. -

    -
    - -
    About the code... -

    -read on>>> -

    -
    - - -
    - Index: lucene/site/src/documentation/content/xdocs/demo2.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/demo2.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/demo2.xml (working copy) @@ -1,154 +0,0 @@ - - -
    - - Apache Lucene - Basic Demo Sources Walk-through - -
    - -Andrew C. Oliver - - - -
    About the Code -

    -In this section we walk through the sources behind the command-line Lucene demo: where to find them, -their parts and their function. This section is intended for Java developers wishing to understand -how to use Lucene in their applications. -

    -
    - - -
    Location of the source - -

    -NOTE: to examine the sources, you need to download and extract a source checkout of -Lucene: (lucene-{version}-src.zip). -

    - -

    -Relative to the directory created when you extracted Lucene, you -should see a directory called lucene/demo/. This is the root for the Lucene -demo. Under this directory is src/java/org/apache/lucene/demo/. This is where all -the Java sources for the demo live. -

    - -

    -Within this directory you should see the IndexFiles.java class we executed earlier. -Bring it up in vi or your editor of choice and let's take a look at it. -

    - -
    - -
    IndexFiles - -

    -As we discussed in the previous walk-through, the IndexFiles class creates a Lucene -Index. Let's take a look at how it does this. -

    - -

    -The main() method parses the command-line parameters, then in preparation for -instantiating IndexWriter, opens a -Directory and instantiates -StandardAnalyzer and -IndexWriterConfig. -

    - -

    -The value of the -index command-line parameter is the name of the filesystem directory -where all index information should be stored. If IndexFiles is invoked with a -relative path given in the -index command-line parameter, or if the -index -command-line parameter is not given, causing the default relative index path "index" -to be used, the index path will be created as a subdirectory of the current working directory -(if it does not already exist). On some platforms, the index path may be created in a different -directory (such as the user's home directory). -

    - -

    -The -docs command-line parameter value is the location of the directory containing -files to be indexed. -

    - -

    -The -update command-line parameter tells IndexFiles not to delete the -index if it already exists. When -update is not given, IndexFiles will -first wipe the slate clean before indexing any documents. -

    - -

    -Lucene Directorys are used by the -IndexWriter to store information in the index. In addition to the -FSDirectory implementation we are using, -there are several other Directory subclasses that can write to RAM, to databases, etc. -

    - -

    -Lucene Analyzers are processing pipelines -that break up text into indexed tokens, a.k.a. terms, and optionally perform other operations on these -tokens, e.g. downcasing, synonym insertion, filtering out unwanted tokens, etc. The Analyzer -we are using is StandardAnalyzer, which creates tokens using the Word Break rules from the -Unicode Text Segmentation algorithm specified in Unicode -Standard Annex #29; converts tokens to lowercase; and then filters out stopwords. Stopwords are -common language words such as articles (a, an, the, etc.) and other tokens that may have less value for -searching. It should be noted that there are different rules for every language, and you should use the -proper analyzer for each. Lucene currently provides Analyzers for a number of different languages (see -the javadocs under -lucene/analysis/common/src/java/org/apache/lucene/analysis). -

    - -

    -The IndexWriterConfig instance holds all configuration for IndexWriter. For -example, we set the OpenMode to use here based on the value of the -update -command-line parameter. -

    - -

    -Looking further down in the file, after IndexWriter is instantiated, you should see the -indexDocs() code. This recursive function crawls the directories and creates -Document objects. The -Document is simply a data object to represent the text content from the file as well as -its creation time and location. These instances are added to the IndexWriter. If -the -update command-line parameter is given, the IndexWriter -OpenMode will be set to OpenMode.CREATE_OR_APPEND, and rather than -adding documents to the index, the IndexWriter will update them -in the index by attempting to find an already-indexed document with the same identifier (in our -case, the file path serves as the identifier); deleting it from the index if it exists; and then -adding the new document to the index. -

    - -
    - -
    Searching Files - -

    -The SearchFiles class is -quite simple. It primarily collaborates with an -IndexSearcher, -StandardAnalyzer (which is used in the -IndexFiles class as well) -and a QueryParser. The -query parser is constructed with an analyzer used to interpret your query text in the same way the -documents are interpreted: finding word boundaries, downcasing, and removing useless words like -'a', 'an' and 'the'. The Query -object contains the results from the -QueryParser which is passed -to the searcher. Note that it's also possible to programmatically construct a rich -Query object without using the query -parser. The query parser just enables decoding the Lucene query -syntax into the corresponding Query -object. -

    - -

    -SearchFiles uses the IndexSearcher.search(query,n) method that returns -TopDocs with max n hits. -The results are printed in pages, sorted by score (i.e. relevance). -

    -
    - -
    Index: lucene/site/src/documentation/content/xdocs/fileformats.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/fileformats.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/fileformats.xml (working copy) @@ -1,1934 +0,0 @@ - - - -
    - - Apache Lucene - Index File Formats - -
    - - -
    Index File Formats - -

    - This document defines the index file formats used - in this version of Lucene. If you are using a different - version of Lucene, please consult the copy of - docs/fileformats.html - that was distributed - with the version you are using. -

    - -

    - Apache Lucene is written in Java, but several - efforts are underway to write - versions - of Lucene in other programming - languages. If these versions are to remain compatible with Apache - Lucene, then a language-independent definition of the Lucene index - format is required. This document thus attempts to provide a - complete and independent definition of the Apache Lucene file - formats. -

    - -

    - As Lucene evolves, this document should evolve. - Versions of Lucene in different programming languages should endeavor - to agree on file formats, and generate new versions of this document. -

    - -

    - Compatibility notes are provided in this document, - describing how file formats have changed from prior versions. -

    - -

    - In version 2.1, the file format was changed to allow - lock-less commits (ie, no more commit lock). The - change is fully backwards compatible: you can open a - pre-2.1 index for searching or adding/deleting of - docs. When the new segments file is saved - (committed), it will be written in the new file format - (meaning no specific "upgrade" process is needed). - But note that once a commit has occurred, pre-2.1 - Lucene will not be able to read the index. -

    - -

    - In version 2.3, the file format was changed to allow - segments to share a single set of doc store (vectors & - stored fields) files. This allows for faster indexing - in certain cases. The change is fully backwards - compatible (in the same way as the lock-less commits - change in 2.1). -

    - -

    - In version 2.4, Strings are now written as true UTF-8 - byte sequence, not Java's modified UTF-8. See issue - LUCENE-510 for details. -

    - -

    - In version 2.9, an optional opaque Map<String,String> - CommitUserData may be passed to IndexWriter's commit - methods (and later retrieved), which is recorded in - the segments_N file. See issue LUCENE-1382 for - details. Also, diagnostics were added to each segment - written recording details about why it was written - (due to flush, merge; which OS/JRE was used; etc.). - See issue LUCENE-1654 for details. -

    - -

    - In version 3.0, compressed fields are no longer - written to the index (they can still be read, but on - merge the new segment will write them, - uncompressed). See issue LUCENE-1960 for details. -

    - -

    - In version 3.1, segments records the code version - that created them. See LUCENE-2720 for details. - - Additionally segments track explicitly whether or - not they have term vectors. See LUCENE-2811 for details. -

    -

    - In version 3.2, numeric fields are written as natively - to stored fields file, previously they were stored in - text format only. -

    -

    - In version 3.4, fields can omit position data while - still indexing term frequencies. -

    -
    - -
    Definitions - -

    - The fundamental concepts in Lucene are index, - document, field and term. -

    - - -

    - An index contains a sequence of documents. -

    - -
      -
    • -

      - A document is a sequence of fields. -

      -
    • - -
    • -

      - A field is a named sequence of terms. -

      -
    • - -
    • - A term is a string. -
    • -
    - -

    - The same string in two different fields is - considered a different term. Thus terms are represented as a pair of - strings, the first naming the field, and the second naming text - within the field. -

    - -
    Inverted Indexing - -

    - The index stores statistics about terms in order - to make term-based search more efficient. Lucene's - index falls into the family of indexes known as an inverted - index. This is because it can list, for a term, the documents that contain - it. This is the inverse of the natural relationship, in which - documents list terms. -

    -
    -
    - Types of Fields -

    - In Lucene, fields may be stored, in which - case their text is stored in the index literally, in a non-inverted - manner. Fields that are inverted are called indexed. A field - may be both stored and indexed.

    - -

    The text of a field may be tokenized into terms to be - indexed, or the text of a field may be used literally as a term to be indexed. - Most fields are - tokenized, but sometimes it is useful for certain identifier fields - to be indexed literally. -

    -

    See the Field java docs for more information on Fields.

    -
    - -
    Segments - -

    - Lucene indexes may be composed of multiple sub-indexes, or - segments. Each segment is a fully independent index, which could be searched - separately. Indexes evolve by: -

    - -
      -
    1. -

      Creating new segments for newly added documents.

      -
    2. -
    3. -

      Merging existing segments.

      -
    4. -
    - -

    - Searches may involve multiple segments and/or multiple indexes, each - index potentially composed of a set of segments. -

    -
    - -
    Document Numbers - -

    - Internally, Lucene refers to documents by an integer document - number. The first document added to an index is numbered zero, and each - subsequent document added gets a number one greater than the previous. -

    - -

    -
    -

    - -

    - Note that a document's number may change, so caution should be taken - when storing these numbers outside of Lucene. In particular, numbers may - change in the following situations: -

    - - -
      -
    • -

      - The - numbers stored in each segment are unique only within the segment, - and must be converted before they can be used in a larger context. - The standard technique is to allocate each segment a range of - values, based on the range of numbers used in that segment. To - convert a document number from a segment to an external value, the - segment's base document - number is added. To convert an external value back to a - segment-specific value, the segment is identified by the range that - the external value is in, and the segment's base value is - subtracted. For example two five document segments might be - combined, so that the first segment has a base value of zero, and - the second of five. Document three from the second segment would - have an external value of eight. -

      -
    • -
    • -

      - When documents are deleted, gaps are created - in the numbering. These are eventually removed as the index evolves - through merging. Deleted documents are dropped when segments are - merged. A freshly-merged segment thus has no gaps in its numbering. -

      -
    • -
    - -
    - -
    - -
    Overview - -

    - Each segment index maintains the following: -

    -
      -
    • -

      Field names. This - contains the set of field names used in the index. - -

      -
    • -
    • -

      Stored Field - values. This contains, for each document, a list of attribute-value - pairs, where the attributes are field names. These are used to - store auxiliary information about the document, such as its title, - url, or an identifier to access a - database. The set of stored fields are what is returned for each hit - when searching. This is keyed by document number. -

      -
    • -
    • -

      Term dictionary. - A dictionary containing all of the terms used in all of the indexed - fields of all of the documents. The dictionary also contains the - number of documents which contain the term, and pointers to the - term's frequency and proximity data. -

      -
    • - -
    • -

      Term Frequency - data. For each term in the dictionary, the numbers of all the - documents that contain that term, and the frequency of the term in - that document, unless frequencies are omitted (IndexOptions.DOCS_ONLY) -

      -
    • - -
    • -

      Term Proximity - data. For each term in the dictionary, the positions that the term - occurs in each document. Note that this will - not exist if all fields in all documents omit position data. -

      -
    • - -
    • -

      Normalization - factors. For each field in each document, a value is stored that is - multiplied into the score for hits on that field. -

      -
    • -
    • -

      Term Vectors. For each field in each document, the term vector - (sometimes called document vector) may be stored. A term vector consists - of term text and term frequency. To add Term Vectors to your index see the - Field - constructors -

      -
    • -
    • -

      Deleted documents. - An optional file indicating which documents are deleted. -

      -
    • -
    - -

    Details on each of these are provided in subsequent sections. -

    -
    - -
    File Naming - -

    - All files belonging to a segment have the same name with varying - extensions. The extensions correspond to the different file formats - described below. When using the Compound File format (default in 1.4 and greater) these files are - collapsed into a single .cfs file (see below for details) -

    - -

    - Typically, all segments - in an index are stored in a single directory, although this is not - required. -

    - -

    - As of version 2.1 (lock-less commits), file names are - never re-used (there is one exception, "segments.gen", - see below). That is, when any file is saved to the - Directory it is given a never before used filename. - This is achieved using a simple generations approach. - For example, the first segments file is segments_1, - then segments_2, etc. The generation is a sequential - long integer represented in alpha-numeric (base 36) - form. -

    - -
    -
    Summary of File Extensions -

    The following table summarizes the names and extensions of the files in Lucene: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameExtensionBrief Description
    Segments Filesegments.gen, segments_NStores information about segments
    Lock Filewrite.lockThe Write lock prevents multiple IndexWriters from writing to the same file.
    Compound File.cfsAn optional "virtual" file consisting of all the other index files for systems - that frequently run out of file handles.
    Compound File Entry table.cfeThe "virtual" compound file's entry table holding all entries in the corresponding .cfs file (Since 3.4)
    Fields.fnmStores information about the fields
    Field Index.fdxContains pointers to field data
    Field Data.fdtThe stored fields for documents
    Term Infos.tisPart of the term dictionary, stores term info
    Term Info Index.tiiThe index into the Term Infos file
    Frequencies.frqContains the list of docs which contain each term along with frequency
    Positions.prxStores position information about where a term occurs in the index
    Norms.nrmEncodes length and boost factors for docs and fields
    Term Vector Index.tvxStores offset into the document data file
    Term Vector Documents.tvdContains information about each document that has term vectors
    Term Vector Fields.tvfThe field level info about term vectors
    Deleted Documents.delInfo about what files are deleted
    - -

    -
    - -
    Primitive Types - -
    Byte - -

    - The most primitive type - is an eight-bit byte. Files are accessed as sequences of bytes. All - other data types are defined as sequences - of bytes, so file formats are byte-order independent. -

    - -
    - -
    UInt32 - -

    - 32-bit unsigned integers are written as four - bytes, high-order bytes first. -

    -

    - UInt32 --> <Byte>4 -

    - -
    - -
    Uint64 - -

    - 64-bit unsigned integers are written as eight - bytes, high-order bytes first. -

    - -

    UInt64 --> <Byte>8 -

    - -
    - -
    VInt - -

    - A variable-length format for positive integers is - defined where the high-order bit of each byte indicates whether more - bytes remain to be read. The low-order seven bits are appended as - increasingly more significant bits in the resulting integer value. - Thus values from zero to 127 may be stored in a single byte, values - from 128 to 16,383 may be stored in two bytes, and so on. -

    - -

    - VInt Encoding Example -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - Value -

    -
    -

    - First byte -

    -
    -

    - Second byte -

    -
    -

    - Third byte -

    -
    -

    0 -

    -
    -

    - 00000000 -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    1 -

    -
    -

    - 00000001 -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    2 -

    -
    -

    - 00000010 -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    ... -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    127 -

    -
    -

    - 01111111 -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    128 -

    -
    -

    - 10000000 -

    -
    -

    - 00000001 -

    -
    -

    -
    - -

    -
    -

    129 -

    -
    -

    - 10000001 -

    -
    -

    - 00000001 -

    -
    -

    -
    - -

    -
    -

    130 -

    -
    -

    - 10000010 -

    -
    -

    - 00000001 -

    -
    -

    -
    - -

    -
    -

    ... -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    16,383 -

    -
    -

    - 11111111 -

    -
    -

    - 01111111 -

    -
    -

    -
    - -

    -
    -

    16,384 -

    -
    -

    - 10000000 -

    -
    -

    - 10000000 -

    -
    -

    - 00000001 -

    -
    -

    16,385 -

    -
    -

    - 10000001 -

    -
    -

    - 10000000 -

    -
    -

    - 00000001 -

    -
    -

    ... -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    -

    -
    - -

    -
    - -

    - This provides compression while still being - efficient to decode. -

    - -
    - -
    Chars - -

    - Lucene writes unicode - character sequences as UTF-8 encoded bytes. -

    - - -
    - -
    String - -

    - Lucene writes strings as UTF-8 encoded bytes. - First the length, in bytes, is written as a VInt, - followed by the bytes. -

    - -

    - String --> VInt, Chars -

    - -
    -
    - -
    Compound Types -
    Map<String,String> - -

    - In a couple places Lucene stores a Map - String->String. -

    - -

    - Map<String,String> --> Count<String,String>Count -

    - -
    - -
    - -
    Per-Index Files - -

    - The files in this section exist one-per-index. -

    - -
    Segments File - -

    - The active segments in the index are stored in the - segment info file, - segments_N. - There may - be one or more - segments_N - files in the - index; however, the one with the largest - generation is the active one (when older - segments_N files are present it's because they - temporarily cannot be deleted, or, a writer is in - the process of committing, or a custom - IndexDeletionPolicy - is in use). This file lists each - segment by name, has details about the separate - norms and deletion files, and also contains the - size of each segment. -

    - -

    - As of 2.1, there is also a file - segments.gen. - This file contains the - current generation (the - _N - in - segments_N) - of the index. This is - used only as a fallback in case the current - generation cannot be accurately determined by - directory listing alone (as is the case for some - NFS clients with time-based directory cache - expiraation). This file simply contains an Int32 - version header (SegmentInfos.FORMAT_LOCKLESS = - -2), followed by the generation recorded as Int64, - written twice. -

    -

    - 3.1 - Segments --> Format, Version, NameCounter, SegCount, <SegVersion, SegName, SegSize, DelGen, DocStoreOffset, [DocStoreSegment, DocStoreIsCompoundFile], HasSingleNormFile, NumField, - NormGenNumField, - IsCompoundFile, DeletionCount, HasProx, Diagnostics, HasVectors>SegCount, CommitUserData, Checksum -

    - -

    - Format, NameCounter, SegCount, SegSize, NumField, - DocStoreOffset, DeletionCount --> Int32 -

    - -

    - Version, DelGen, NormGen, Checksum --> Int64 -

    - -

    - SegVersion, SegName, DocStoreSegment --> String -

    - -

    - Diagnostics --> Map<String,String> -

    - -

    - IsCompoundFile, HasSingleNormFile, - DocStoreIsCompoundFile, HasProx, HasVectors --> Int8 -

    - -

    - CommitUserData --> Map<String,String> -

    - -

    - Format is -9 (SegmentInfos.FORMAT_DIAGNOSTICS). -

    - -

    - Version counts how often the index has been - changed by adding or deleting documents. -

    - -

    - NameCounter is used to generate names for new segment files. -

    - -

    - SegVersion is the code version that created the segment. -

    - -

    - SegName is the name of the segment, and is used as the file name prefix - for all of the files that compose the segment's index. -

    - -

    - SegSize is the number of documents contained in the segment index. -

    - -

    - DelGen is the generation count of the separate - deletes file. If this is -1, there are no - separate deletes. If it is 0, this is a pre-2.1 - segment and you must check filesystem for the - existence of _X.del. Anything above zero means - there are separate deletes (_X_N.del). -

    - -

    - NumField is the size of the array for NormGen, or - -1 if there are no NormGens stored. -

    - -

    - NormGen records the generation of the separate - norms files. If NumField is -1, there are no - normGens stored and they are all assumed to be 0 - when the segment file was written pre-2.1 and all - assumed to be -1 when the segments file is 2.1 or - above. The generation then has the same meaning - as delGen (above). -

    - -

    - IsCompoundFile records whether the segment is - written as a compound file or not. If this is -1, - the segment is not a compound file. If it is 1, - the segment is a compound file. Else it is 0, - which means we check filesystem to see if _X.cfs - exists. -

    - -

    - If HasSingleNormFile is 1, then the field norms are - written as a single joined file (with extension - .nrm); if it is 0 then each field's norms - are stored as separate .fN files. See - "Normalization Factors" below for details. -

    - -

    - DocStoreOffset, DocStoreSegment, - DocStoreIsCompoundFile: If DocStoreOffset is -1, - this segment has its own doc store (stored fields - values and term vectors) files and DocStoreSegment - and DocStoreIsCompoundFile are not stored. In - this case all files for stored field values - (*.fdt and *.fdx) and term - vectors (*.tvf, *.tvd and - *.tvx) will be stored with this segment. - Otherwise, DocStoreSegment is the name of the - segment that has the shared doc store files; - DocStoreIsCompoundFile is 1 if that segment is - stored in compound file format (as a .cfx - file); and DocStoreOffset is the starting document - in the shared doc store files where this segment's - documents begin. In this case, this segment does - not store its own doc store files but instead - shares a single set of these files with other - segments. -

    - -

    - Checksum contains the CRC32 checksum of all bytes - in the segments_N file up until the checksum. - This is used to verify integrity of the file on - opening the index. -

    - -

    - DeletionCount records the number of deleted - documents in this segment. -

    - -

    - HasProx is 1 if any fields in this segment have - position data (IndexOptions.DOCS_AND_FREQS_AND_POSITIONS); else, it's 0. -

    - -

    - CommitUserData stores an optional user-supplied - opaque Map<String,String> that was passed to - IndexWriter's commit or prepareCommit, or - IndexReader's flush methods. -

    -

    - The Diagnostics Map is privately written by - IndexWriter, as a debugging aid, for each segment - it creates. It includes metadata like the current - Lucene version, OS, Java version, why the segment - was created (merge, flush, addIndexes), etc. -

    - -

    HasVectors is 1 if this segment stores term vectors, - else it's 0. -

    - -
    - -
    Lock File - -

    - The write lock, which is stored in the index - directory by default, is named "write.lock". If - the lock directory is different from the index - directory then the write lock will be named - "XXXX-write.lock" where XXXX is a unique prefix - derived from the full path to the index directory. - When this file is present, a writer is currently - modifying the index (adding or removing - documents). This lock file ensures that only one - writer is modifying the index at a time. -

    -
    - -
    Deletable File - -

    - A writer dynamically computes - the files that are deletable, instead, so no file - is written. -

    - -
    - -
    Compound Files - -

    Starting with Lucene 1.4 the compound file format became default. This - is simply a container for all files described in the next section - (except for the .del file).

    -

    Compound Entry Table (.cfe) --> Version, FileCount, <FileName, DataOffset, DataLength> - FileCount -

    - -

    Compound (.cfs) --> FileData FileCount -

    - -

    Version --> Int

    - -

    FileCount --> VInt

    - -

    DataOffset --> Long

    - -

    DataLength --> Long

    - -

    FileName --> String

    - -

    FileData --> raw file data

    -

    The raw file data is the data from the individual files named above.

    - -

    Starting with Lucene 2.3, doc store files (stored - field values and term vectors) can be shared in a - single set of files for more than one segment. When - compound file is enabled, these shared files will be - added into a single compound file (same format as - above) but with the extension .cfx. -

    - -
    - -
    - -
    Per-Segment Files - -

    - The remaining files are all per-segment, and are - thus defined by suffix. -

    -
    Fields -

    -
    - Field Info -
    -

    - -

    - Field names are - stored in the field info file, with suffix .fnm. -

    -

    - FieldInfos - (.fnm) --> FNMVersion,FieldsCount, <FieldName, - FieldBits> - FieldsCount -

    - -

    - FNMVersion, FieldsCount --> VInt -

    - -

    - FieldName --> String -

    - -

    - FieldBits --> Byte -

    - -

    -

      -
    • - The low-order bit is one for - indexed fields, and zero for non-indexed fields. -
    • -
    • - The second lowest-order - bit is one for fields that have term vectors stored, and zero for fields - without term vectors. -
    • -
    • If the fifth lowest-order bit is set (0x10), norms are omitted for the indexed field.
    • -
    • If the sixth lowest-order bit is set (0x20), payloads are stored for the indexed field.
    • -
    • If the seventh lowest-order bit is set (0x40), term frequencies and positions omitted for the indexed field.
    • -
    • If the eighth lowest-order bit is set (0x80), positions are omitted for the indexed field.
    • -
    -

    - -

    - FNMVersion (added in 2.9) is -2 for indexes from 2.9 - 3.3. It is -3 for indexes in Lucene 3.4+ -

    - -

    - Fields are numbered by their order in this file. Thus field zero is - the - first field in the file, field one the next, and so on. Note that, - like document numbers, field numbers are segment relative. -

    - - - -

    -
    - Stored Fields -
    -

    - -

    - Stored fields are represented by two files: -

    - -
      -
    1. -

      - The field index, or .fdx file. -

      - -

      - This contains, for each document, a pointer to - its field data, as follows: -

      - -

      - FieldIndex - (.fdx) --> - <FieldValuesPosition> - SegSize -

      -

      FieldValuesPosition - --> Uint64 -

      -

      This - is used to find the location within the field data file of the - fields of a particular document. Because it contains fixed-length - data, this file may be easily randomly accessed. The position of - document - n - 's - - field data is the Uint64 at - n*8 - in - this file. -

      -
    2. -
    3. -

      - The field data, or .fdt file. - -

      - -

      - This contains the stored fields of each document, - as follows: -

      - -

      - FieldData (.fdt) --> - <DocFieldData> - SegSize -

      -

      DocFieldData --> - FieldCount, <FieldNum, Bits, Value> - FieldCount -

      -

      FieldCount --> - VInt -

      -

      FieldNum --> - VInt -

      -

      Bits --> - Byte -

      -

      -

        -
      • low order bit is one for tokenized fields
      • -
      • second bit is one for fields containing binary data
      • -
      • third bit is one for fields with compression option enabled - (if compression is enabled, the algorithm used is ZLIB), - only available for indexes until Lucene version 2.9.x
      • -
      • 4th to 6th bit (mask: 0x7<<3) define the type of a - numeric field:
          -
        • all bits in mask are cleared if no numeric field at all
        • -
        • 1<<3: Value is Int
        • -
        • 2<<3: Value is Long
        • -
        • 3<<3: Value is Int as Float (as of Float.intBitsToFloat)
        • -
        • 4<<3: Value is Long as Double (as of Double.longBitsToDouble)
        • -
      • -
      -

      -

      Value --> - String | BinaryValue | Int | Long (depending on Bits) -

      -

      BinaryValue --> - ValueSize, <Byte>^ValueSize -

      -

      ValueSize --> - VInt -

      - -
    4. -
    - -
    -
    Term Dictionary - -

    - The term dictionary is represented as two files: -

    -
      -
    1. -

      - The term infos, or tis file. -

      - -

      - TermInfoFile (.tis)--> - TIVersion, TermCount, IndexInterval, SkipInterval, MaxSkipLevels, TermInfos -

      -

      TIVersion --> - UInt32 -

      -

      TermCount --> - UInt64 -

      -

      IndexInterval --> - UInt32 -

      -

      SkipInterval --> - UInt32 -

      -

      MaxSkipLevels --> - UInt32 -

      -

      TermInfos --> - <TermInfo> - TermCount -

      -

      TermInfo --> - <Term, DocFreq, FreqDelta, ProxDelta, SkipDelta> -

      -

      Term --> - <PrefixLength, Suffix, FieldNum> -

      -

      Suffix --> - String -

      -

      PrefixLength, - DocFreq, FreqDelta, ProxDelta, SkipDelta -
      - --> VInt -

      -

      - This file is sorted by Term. Terms are - ordered first lexicographically (by UTF16 - character code) by the term's field name, - and within that lexicographically (by - UTF16 character code) by the term's text. -

      -

      TIVersion names the version of the format - of this file and is equal to TermInfosWriter.FORMAT_CURRENT. -

      -

      Term - text prefixes are shared. The PrefixLength is the number of initial - characters from the previous term which must be pre-pended to a - term's suffix in order to form the term's text. Thus, if the - previous term's text was "bone" and the term is "boy", - the PrefixLength is two and the suffix is "y". -

      -

      FieldNumber - determines the term's field, whose name is stored in the .fdt file. -

      -

      DocFreq - is the count of documents which contain the term. -

      -

      FreqDelta - determines the position of this term's TermFreqs within the .frq - file. In particular, it is the difference between the position of - this term's data in that file and the position of the previous - term's data (or zero, for the first term in the file). -

      -

      ProxDelta - determines the position of this term's TermPositions within the .prx - file. In particular, it is the difference between the position of - this term's data in that file and the position of the previous - term's data (or zero, for the first term in the file. For fields - that omit position data, this will be 0 since - prox information is not stored. -

      -

      SkipDelta determines the position of this - term's SkipData within the .frq file. In - particular, it is the number of bytes - after TermFreqs that the SkipData starts. - In other words, it is the length of the - TermFreq data. SkipDelta is only stored - if DocFreq is not smaller than SkipInterval. -

      -
    2. -
    3. -

      - The term info index, or .tii file. -

      - -

      - This contains every IndexInterval - th - entry from the .tis - file, along with its location in the "tis" file. This is - designed to be read entirely into memory and used to provide random - access to the "tis" file. -

      - -

      - The structure of this file is very similar to the - .tis file, with the addition of one item per record, the IndexDelta. -

      - -

      - TermInfoIndex (.tii)--> - TIVersion, IndexTermCount, IndexInterval, SkipInterval, MaxSkipLevels, TermIndices -

      -

      TIVersion --> - UInt32 -

      -

      IndexTermCount --> - UInt64 -

      -

      IndexInterval --> - UInt32 -

      -

      SkipInterval --> - UInt32 -

      -

      TermIndices --> - <TermInfo, IndexDelta> - IndexTermCount -

      -

      IndexDelta --> - VLong -

      -

      IndexDelta - determines the position of this term's TermInfo within the .tis file. In - particular, it is the difference between the position of this term's - entry in that file and the position of the previous term's entry. -

      -

      SkipInterval is the fraction of TermDocs stored in skip tables. It is used to accelerate TermDocs.skipTo(int). - Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while - smaller values result in bigger indexes, less acceleration (in case of a small value for MaxSkipLevels) and more - accelerable cases.

      -

      MaxSkipLevels is the max. number of skip levels stored for each term in the .frq file. A low value results in - smaller indexes but less acceleration, a larger value results in slighly larger indexes but greater acceleration. - See format of .frq file for more information about skip levels.

      -
    4. -
    -
    - -
    Frequencies - -

    - The .frq file contains the lists of documents - which contain each term, along with the frequency of the term in that - document (except when frequencies are omitted: IndexOptions.DOCS_ONLY). -

    -

    FreqFile (.frq) --> - <TermFreqs, SkipData> - TermCount -

    -

    TermFreqs --> - <TermFreq> - DocFreq -

    -

    TermFreq --> - DocDelta[, Freq?] -

    -

    SkipData --> - <<SkipLevelLength, SkipLevel> - NumSkipLevels-1, SkipLevel> - <SkipDatum> -

    -

    SkipLevel --> - <SkipDatum> - DocFreq/(SkipInterval^(Level + 1)) -

    -

    SkipDatum --> - DocSkip,PayloadLength?,FreqSkip,ProxSkip,SkipChildLevelPointer? -

    -

    DocDelta,Freq,DocSkip,PayloadLength,FreqSkip,ProxSkip --> - VInt -

    -

    SkipChildLevelPointer --> - VLong -

    -

    TermFreqs - are ordered by term (the term is implicit, from the .tis file). -

    -

    TermFreq - entries are ordered by increasing document number. -

    -

    DocDelta: if frequencies are indexed, this determines both - the document number and the frequency. In - particular, DocDelta/2 is the difference between - this document number and the previous document - number (or zero when this is the first document in - a TermFreqs). When DocDelta is odd, the frequency - is one. When DocDelta is even, the frequency is - read as another VInt. If frequencies are omitted, DocDelta - contains the gap (not multiplied by 2) between - document numbers and no frequency information is - stored. -

    -

    For example, the TermFreqs for a term which occurs - once in document seven and three times in document - eleven, with frequencies indexed, would be the following - sequence of VInts: -

    -

    15, 8, 3 -

    -

    If frequencies were omitted (IndexOptions.DOCS_ONLY) it would be this sequence - of VInts instead: -

    -

    - 7,4 -

    -

    DocSkip records the document number before every - SkipInterval - th - document in TermFreqs. - If payloads are disabled for the term's field, - then DocSkip represents the difference from the - previous value in the sequence. - If payloads are enabled for the term's field, - then DocSkip/2 represents the difference from the - previous value in the sequence. If payloads are enabled - and DocSkip is odd, - then PayloadLength is stored indicating the length - of the last payload before the SkipIntervalth - document in TermPositions. - FreqSkip and ProxSkip record the position of every - SkipInterval - th - entry in FreqFile and - ProxFile, respectively. File positions are - relative to the start of TermFreqs and Positions, - to the previous SkipDatum in the sequence. -

    -

    For example, if DocFreq=35 and SkipInterval=16, - then there are two SkipData entries, containing - the 15 - th - and 31 - st - document - numbers in TermFreqs. The first FreqSkip names - the number of bytes after the beginning of - TermFreqs that the 16 - th - SkipDatum - starts, and the second the number of bytes after - that that the 32 - nd - starts. The first - ProxSkip names the number of bytes after the - beginning of Positions that the 16 - th - SkipDatum starts, and the second the number of - bytes after that that the 32 - nd - starts. -

    -

    Each term can have multiple skip levels. - The amount of skip levels for a term is NumSkipLevels = Min(MaxSkipLevels, floor(log(DocFreq/log(SkipInterval)))). - The number of SkipData entries for a skip level is DocFreq/(SkipInterval^(Level + 1)), whereas the lowest skip - level is Level=0.

    - Example: SkipInterval = 4, MaxSkipLevels = 2, DocFreq = 35. Then skip level 0 has 8 SkipData entries, - containing the 3rd, 7th, 11th, 15th, 19th, 23rd, - 27th, and 31st document numbers in TermFreqs. Skip level 1 has 2 SkipData entries, containing the - 15th and 31st document numbers in TermFreqs.

    - The SkipData entries on all upper levels > 0 contain a SkipChildLevelPointer referencing the corresponding SkipData - entry in level-1. In the example has entry 15 on level 1 a pointer to entry 15 on level 0 and entry 31 on level 1 a pointer - to entry 31 on level 0. -

    - -
    -
    Positions - -

    - The .prx file contains the lists of positions that - each term occurs at within documents. Note that - fields omitting positional data do not store - anything into this file, and if all fields in the - index omit positional data then the .prx file will not - exist. -

    -

    ProxFile (.prx) --> - <TermPositions> - TermCount -

    -

    TermPositions --> - <Positions> - DocFreq -

    -

    Positions --> - <PositionDelta,Payload?> - Freq -

    -

    Payload --> - <PayloadLength?,PayloadData> -

    -

    PositionDelta --> - VInt -

    -

    PayloadLength --> - VInt -

    -

    PayloadData --> - bytePayloadLength -

    -

    TermPositions - are ordered by term (the term is implicit, from the .tis file). -

    -

    Positions - entries are ordered by increasing document number (the document - number is implicit from the .frq file). -

    -

    PositionDelta - is, if payloads are disabled for the term's field, the difference - between the position of the current occurrence in - the document and the previous occurrence (or zero, if this is the - first occurrence in this document). - If payloads are enabled for the term's field, then PositionDelta/2 - is the difference between the current and the previous position. If - payloads are enabled and PositionDelta is odd, then PayloadLength is - stored, indicating the length of the payload at the current term position. -

    -

    - For example, the TermPositions for a - term which occurs as the fourth term in one document, and as the - fifth and ninth term in a subsequent document, would be the following - sequence of VInts (payloads disabled): -

    -

    4, - 5, 4 -

    -

    PayloadData - is metadata associated with the current term position. If PayloadLength - is stored at the current position, then it indicates the length of this - Payload. If PayloadLength is not stored, then this Payload has the same - length as the Payload at the previous position. -

    -
    -
    Normalization Factors - -

    There's a single .nrm file containing all norms: -

    -

    AllNorms - (.nrm) --> NormsHeader,<Norms> - NumFieldsWithNorms -

    -

    Norms - --> <Byte> - SegSize -

    -

    NormsHeader - --> 'N','R','M',Version -

    -

    Version - --> Byte -

    -

    NormsHeader - has 4 bytes, last of which is the format version for this file, currently -1. -

    -

    Each - byte encodes a floating point value. Bits 0-2 contain the 3-bit - mantissa, and bits 3-8 contain the 5-bit exponent. -

    -

    These - are converted to an IEEE single float value as follows: -

    -
      -
    1. -

      If - the byte is zero, use a zero float. -

      -
    2. -
    3. -

      Otherwise, - set the sign bit of the float to zero; -

      -
    4. -
    5. -

      add - 48 to the exponent and use this as the float's exponent; -

      -
    6. -
    7. -

      map - the mantissa to the high-order 3 bits of the float's mantissa; and - -

      -
    8. -
    9. -

      set - the low-order 21 bits of the float's mantissa to zero. -

      -
    10. -
    -

    A separate norm file is created when the norm values of an existing segment are modified. - When field N is modified, a separate norm file .sN - is created, to maintain the norm values for that field. -

    -

    Separate norm files are created (when adequate) for both compound and non compound segments. -

    - -
    -
    Term Vectors -

    - Term Vector support is an optional on a field by - field basis. It consists of 3 files. -

    -
      -
    1. -

      The Document Index or .tvx file.

      -

      For each document, this stores the offset - into the document data (.tvd) and field - data (.tvf) files. -

      -

      DocumentIndex (.tvx) --> TVXVersion<DocumentPosition,FieldPosition> - NumDocs -

      -

      TVXVersion --> Int (TermVectorsReader.CURRENT)

      -

      DocumentPosition --> UInt64 (offset in - the .tvd file)

      -

      FieldPosition --> UInt64 (offset in the - .tvf file)

      -
    2. -
    3. -

      The Document or .tvd file.

      -

      This contains, for each document, the number of fields, a list of the fields with - term vector info and finally a list of pointers to the field information in the .tvf - (Term Vector Fields) file.

      -

      - Document (.tvd) --> TVDVersion<NumFields, FieldNums, FieldPositions> - NumDocs -

      -

      TVDVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      -

      NumFields --> VInt

      -

      FieldNums --> <FieldNumDelta> - NumFields -

      -

      FieldNumDelta --> VInt

      -

      FieldPositions --> <FieldPositionDelta> - NumFields-1 -

      -

      FieldPositionDelta --> VLong

      -

      The .tvd file is used to map out the fields that have term vectors stored and - where the field information is in the .tvf file.

      -
    4. -
    5. -

      The Field or .tvf file.

      -

      This file contains, for each field that has a term vector stored, a list of - the terms, their frequencies and, optionally, position and offest information.

      -

      Field (.tvf) --> TVFVersion<NumTerms, Position/Offset, TermFreqs> - NumFields -

      -

      TVFVersion --> Int (TermVectorsReader.FORMAT_CURRENT)

      -

      NumTerms --> VInt

      -

      Position/Offset --> Byte

      -

      TermFreqs --> <TermText, TermFreq, Positions?, Offsets?> - NumTerms -

      -

      TermText --> <PrefixLength, Suffix>

      -

      PrefixLength --> VInt

      -

      Suffix --> String

      -

      TermFreq --> VInt

      -

      Positions --> <VInt>TermFreq

      -

      Offsets --> <VInt, VInt>TermFreq

      -
      -

      Notes:

      -
        -
      • Position/Offset byte stores whether this term vector has position or offset information stored.
      • -
      • Term - text prefixes are shared. The PrefixLength is the number of initial - characters from the previous term which must be pre-pended to a - term's suffix in order to form the term's text. Thus, if the - previous term's text was "bone" and the term is "boy", - the PrefixLength is two and the suffix is "y". -
      • -
      • Positions are stored as delta encoded VInts. This means we only store the difference of the current position from the last position
      • -
      • Offsets are stored as delta encoded VInts. The first VInt is the startOffset, the second is the endOffset.
      • -
      - - -
    6. -
    -
    - -
    Deleted Documents - -

    The .del file is - optional, and only exists when a segment contains deletions. -

    - -

    Although per-segment, this file is maintained exterior to compound segment files. -

    -

    - Deletions - (.del) --> [Format],ByteCount,BitCount, Bits | DGaps (depending on Format) -

    - -

    Format,ByteSize,BitCount --> - Uint32 -

    - -

    Bits --> - <Byte> - ByteCount -

    - -

    DGaps --> - <DGap,NonzeroByte> - NonzeroBytesCount -

    - -

    DGap --> - VInt -

    - -

    NonzeroByte --> - Byte -

    - -

    Format - is Optional. -1 indicates DGaps. Non-negative value indicates Bits, and that Format is excluded. -

    - -

    ByteCount - indicates the number of bytes in Bits. It is typically - (SegSize/8)+1. -

    - -

    - BitCount - indicates the number of bits that are currently set in Bits. -

    - -

    Bits - contains one bit for each document indexed. When the bit - corresponding to a document number is set, that document is marked as - deleted. Bit ordering is from least to most significant. Thus, if - Bits contains two bytes, 0x00 and 0x02, then document 9 is marked as - deleted. -

    - -

    DGaps - represents sparse bit-vectors more efficiently than Bits. - It is made of DGaps on indexes of nonzero bytes in Bits, - and the nonzero bytes themselves. The number of nonzero bytes - in Bits (NonzeroBytesCount) is not stored. -

    -

    For example, - if there are 8000 bits and only bits 10,12,32 are set, - DGaps would be used: -

    -

    - (VInt) 1 , (byte) 20 , (VInt) 3 , (Byte) 1 -

    -
    -
    - -
    Limitations - -

    - When referring to term numbers, Lucene's current - implementation uses a Java int to hold the - term index, which means the maximum number of unique - terms in any single index segment is ~2.1 billion times - the term index interval (default 128) = ~274 billion. - This is technically not a limitation of the index file - format, just of Lucene's current implementation. -

    -

    - Similarly, Lucene uses a Java int to refer - to document numbers, and the index file format uses an - Int32 on-disk to store document numbers. - This is a limitation of both the index file format and - the current implementation. Eventually these should be - replaced with either UInt64 values, or - better yet, VInt values which have no - limit. -

    - -
    - - - -
    Index: lucene/site/src/documentation/content/xdocs/gettingstarted.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/gettingstarted.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/gettingstarted.xml (working copy) @@ -1,41 +0,0 @@ - - -
    - - Apache Lucene - Getting Started Guide - -
    - -Andrew C. Oliver - - - -
    - Getting Started -

    -This document is intended as a "getting started" guide. It has three audiences: first-time users -looking to install Apache Lucene in their application; developers looking to modify or base -the applications they develop on Lucene; and developers looking to become involved in and contribute -to the development of Lucene. This document is written in tutorial and walk-through format. The -goal is to help you "get started". It does not go into great depth on some of the conceptual or -inner details of Lucene. -

    - -

    -Each section listed below builds on one another. More advanced users -may wish to skip sections. -

    - -
    -
    - - - - Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_100.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/page.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_200.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_300.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_150.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_250.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/current.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/chapter.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/favicon.ico =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_100.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_200.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_300.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_150.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_250.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lia_3d.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/asf-logo.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/larm_architecture.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/larm_crawling-process.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/instruction_arrow.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/src/documentation/content/xdocs/images/asf-logo.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/chapter.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/current.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/favicon.ico =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/instruction_arrow.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = image/png Index: lucene/site/src/documentation/content/xdocs/images/larm_architecture.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/larm_crawling-process.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lia_3d.jpg =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_100.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_150.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_200.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_250.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_green_300.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_100.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_150.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_200.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_250.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/lucene_outline_300.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/images/page.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/content/xdocs/index.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/index.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/index.xml (working copy) @@ -1,16 +0,0 @@ - - -
    - Lucene Java Documentation -
    - - -

    - This is the official documentation for Lucene Java
    - Please use the menu on the left to access the Javadocs and different documents. -

    -

    - Additional documentation is available in the Wiki. -

    - -
    Index: lucene/site/src/documentation/content/xdocs/queryparsersyntax.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/queryparsersyntax.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/queryparsersyntax.xml (working copy) @@ -1,239 +0,0 @@ - - -
    - - Apache Lucene - Query Parser Syntax - -
    - - Peter Carlson - - -
    - Overview -

    Although Lucene provides the ability to create your own - queries through its API, it also provides a rich query - language through the Query Parser, a lexer which - interprets a string into a Lucene Query using JavaCC. -

    - -

    Generally, the query parser syntax may change from - release to release. This page describes the syntax as of - the current release. If you are using a different - version of Lucene, please consult the copy of - docs/queryparsersyntax.html that was distributed - with the version you are using. -

    - -

    - Before choosing to use the provided Query Parser, please consider the following: -

      -
    1. If you are programmatically generating a query string and then - parsing it with the query parser then you should seriously consider building - your queries directly with the query API. In other words, the query - parser is designed for human-entered text, not for program-generated - text.
    2. - -
    3. Untokenized fields are best added directly to queries, and not - through the query parser. If a field's values are generated programmatically - by the application, then so should query clauses for this field. - An analyzer, which the query parser uses, is designed to convert human-entered - text to terms. Program-generated values, like dates, keywords, etc., - should be consistently program-generated.
    4. - -
    5. In a query form, fields which are general text should use the query - parser. All others, such as date ranges, keywords, etc. are better added - directly through the query API. A field with a limit set of values, - that can be specified with a pull-down menu should not be added to a - query string which is subsequently parsed, but rather added as a - TermQuery clause.
    6. -
    -

    -
    - -
    - Terms -

    A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.

    -

    A Single Term is a single word such as "test" or "hello".

    -

    A Phrase is a group of words surrounded by double quotes such as "hello dolly".

    -

    Multiple terms can be combined together with Boolean operators to form a more complex query (see below).

    -

    Note: The analyzer used to create the index will be used on the terms and phrases in the query string. - So it is important to choose an analyzer that will not interfere with the terms used in the query string.

    -
    - -
    - Fields -

    Lucene supports fielded data. When performing a search you can either specify a field, or use the default field. The field names and default field is implementation specific.

    -

    You can search any field by typing the field name followed by a colon ":" and then the term you are looking for.

    -

    As an example, let's assume a Lucene index contains two fields, title and text and text is the default field. - If you want to find the document entitled "The Right Way" which contains the text "don't go this way", you can enter:

    - - title:"The Right Way" AND text:go -

    or

    - title:"Do it right" AND right -

    Since text is the default field, the field indicator is not required.

    - -

    Note: The field is only valid for the term that it directly precedes, so the query

    - title:Do it right -

    Will only find "Do" in the title field. It will find "it" and "right" in the default field (in this case the text field).

    -
    - -
    - Term Modifiers -

    Lucene supports modifying query terms to provide a wide range of searching options.

    - -
    - Wildcard Searches -

    Lucene supports single and multiple character wildcard searches within single terms - (not within phrase queries).

    -

    To perform a single character wildcard search use the "?" symbol.

    -

    To perform a multiple character wildcard search use the "*" symbol.

    -

    The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

    - - te?t - -

    Multiple character wildcard searches looks for 0 or more characters. For example, to search for test, tests or tester, you can use the search:

    - test* -

    You can also use the wildcard searches in the middle of a term.

    - te*t -

    Note: You cannot use a * or ? symbol as the first character of a search.

    -
    - - -
    - Fuzzy Searches -

    Lucene supports fuzzy searches based on the Levenshtein Distance, or Edit Distance algorithm. To do a fuzzy search use the tilde, "~", symbol at the end of a Single word Term. For example to search for a term similar in spelling to "roam" use the fuzzy search:

    - - roam~ -

    This search will find terms like foam and roams.

    - -

    Starting with Lucene 1.9 an additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:

    - roam~0.8 -

    The default that is used if the parameter is not given is 0.5.

    -
    - - -
    - Proximity Searches -

    Lucene supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "apache" and "jakarta" within 10 words of each other in a document use the search:

    - - "jakarta apache"~10 -
    - - -
    - Range Searches -

    Range Queries allow one to match documents whose field(s) values - are between the lower and upper bound specified by the Range Query. - Range Queries can be inclusive or exclusive of the upper and lower bounds. - Sorting is done lexicographically.

    - mod_date:[20020101 TO 20030101] -

    This will find documents whose mod_date fields have values between 20020101 and 20030101, inclusive. - Note that Range Queries are not reserved for date fields. You could also use range queries with non-date fields:

    - title:{Aida TO Carmen} -

    This will find all documents whose titles are between Aida and Carmen, but not including Aida and Carmen.

    -

    Inclusive range queries are denoted by square brackets. Exclusive range queries are denoted by - curly brackets.

    -
    - - -
    - Boosting a Term -

    Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

    -

    Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for

    - - jakarta apache -

    and you want the term "jakarta" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. - You would type:

    - jakarta^4 apache -

    This will make documents with the term jakarta appear more relevant. You can also boost Phrase Terms as in the example:

    - - "jakarta apache"^4 "Apache Lucene" -

    By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)

    -
    - -
    - - -
    - Boolean Operators -

    Boolean operators allow terms to be combined through logic operators. - Lucene supports AND, "+", OR, NOT and "-" as Boolean operators(Note: Boolean operators must be ALL CAPS).

    - -
    -

    The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. - The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. - The symbol || can be used in place of the word OR.

    -

    To search for documents that contain either "jakarta apache" or just "jakarta" use the query:

    - - "jakarta apache" jakarta - -

    or

    - - "jakarta apache" OR jakarta - -
    -
    - AND -

    The AND operator matches documents where both terms exist anywhere in the text of a single document. - This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

    -

    To search for documents that contain "jakarta apache" and "Apache Lucene" use the query:

    - - "jakarta apache" AND "Apache Lucene" -
    - -
    - + -

    The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.

    -

    To search for documents that must contain "jakarta" and may contain "lucene" use the query:

    - - +jakarta lucene -
    - -
    - NOT -

    The NOT operator excludes documents that contain the term after NOT. - This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.

    -

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    - - "jakarta apache" NOT "Apache Lucene" -

    Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:

    - - NOT "jakarta apache" -
    - -
    - - -

    The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.

    -

    To search for documents that contain "jakarta apache" but not "Apache Lucene" use the query:

    - - "jakarta apache" -"Apache Lucene" -
    - -
    - -
    - Grouping -

    Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

    -

    To search for either "jakarta" or "apache" and "website" use the query:

    - (jakarta OR apache) AND website -

    This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.

    -
    - -
    - Field Grouping -

    Lucene supports using parentheses to group multiple clauses to a single field.

    -

    To search for a title that contains both the word "return" and the phrase "pink panther" use the query:

    - title:(+return +"pink panther") -
    - -
    - Escaping Special Characters -

    Lucene supports escaping special characters that are part of the query syntax. The current list special characters are

    -

    + - && || ! ( ) { } [ ] ^ " ~ * ? : \

    -

    To escape these character use the \ before the character. For example to search for (1+1):2 use the query:

    - \(1\+1\)\:2 -
    - - -
    Index: lucene/site/src/documentation/content/xdocs/scoring.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/scoring.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/scoring.xml (working copy) @@ -1,277 +0,0 @@ - - - -
    - - Apache Lucene - Scoring - -
    - - Grant Ingersoll - - - - -
    Introduction -

    Lucene scoring is the heart of why we all love Lucene. It is blazingly fast and it hides almost all of the complexity from the user. - In a nutshell, it works. At least, that is, until it doesn't work, or doesn't work as one would expect it to - work. Then we are left digging into Lucene internals or asking for help on java-user@lucene.apache.org to figure out why a document with five of our query terms - scores lower than a different document with only one of the query terms.

    -

    While this document won't answer your specific scoring issues, it will, hopefully, point you to the places that can - help you figure out the what and why of Lucene scoring.

    -

    Lucene scoring uses a combination of the - Vector Space Model (VSM) of Information - Retrieval and the Boolean model - to determine - how relevant a given Document is to a User's query. In general, the idea behind the VSM is the more - times a query term appears in a document relative to - the number of times the term appears in all the documents in the collection, the more relevant that - document is to the query. It uses the Boolean model to first narrow down the documents that need to - be scored based on the use of boolean logic in the Query specification. Lucene also adds some - capabilities and refinements onto this model to support boolean and fuzzy searching, but it - essentially remains a VSM based system at the heart. - For some valuable references on VSM and IR in general refer to the - Lucene Wiki IR references. -

    -

    The rest of this document will cover Scoring basics and how to change your - Similarity. Next it will cover ways you can - customize the Lucene internals in Changing your Scoring - -- Expert Level which gives details on implementing your own - Query class and related functionality. Finally, we - will finish up with some reference material in the Appendix. -

    -
    -
    Scoring -

    Scoring is very much dependent on the way documents are indexed, - so it is important to understand indexing (see - Apache Lucene - Getting Started Guide - and the Lucene - file formats - before continuing on with this section.) It is also assumed that readers know how to use the - Searcher.explain(Query query, int doc) functionality, - which can go a long way in informing why a score is returned. -

    -
    Fields and Documents -

    In Lucene, the objects we are scoring are - Documents. A Document is a collection - of - Fields. Each Field has semantics about how - it is created and stored (i.e. tokenized, untokenized, raw data, compressed, etc.) It is important to - note that Lucene scoring works on Fields and then combines the results to return Documents. This is - important because two Documents with the exact same content, but one having the content in two Fields - and the other in one Field will return different scores for the same query due to length normalization - (assumming the - DefaultSimilarity - on the Fields). -

    -
    -
    Score Boosting -

    Lucene allows influencing search results by "boosting" in more than one level: -

      -
    • Document level boosting - - while indexing - by calling - document.setBoost() - before a document is added to the index. -
    • -
    • Document's Field level boosting - - while indexing - by calling - field.setBoost() - before adding a field to the document (and before adding the document to the index). -
    • -
    • Query level boosting - - during search, by setting a boost on a query clause, calling - Query.setBoost(). -
    • -
    -

    -

    Indexing time boosts are preprocessed for storage efficiency and written to - the directory (when writing the document) in a single byte (!) as follows: - For each field of a document, all boosts of that field - (i.e. all boosts under the same field name in that doc) are multiplied. - The result is multiplied by the boost of the document, - and also multiplied by a "field length norm" value - that represents the length of that field in that doc - (so shorter fields are automatically boosted up). - The result is decoded as a single byte - (with some precision loss of course) and stored in the directory. - The similarity object in effect at indexing computes the length-norm of the field. -

    -

    This composition of 1-byte representation of norms - (that is, indexing time multiplication of field boosts & doc boost & field-length-norm) - is nicely described in - Fieldable.setBoost(). -

    -

    Encoding and decoding of the resulted float norm in a single byte are done by the - static methods of the class Similarity: - encodeNorm() and - decodeNorm(). - Due to loss of precision, it is not guaranteed that decode(encode(x)) = x, - e.g. decode(encode(0.89)) = 0.75. - At scoring (search) time, this norm is brought into the score of document - as norm(t, d), as shown by the formula in - Similarity. -

    -
    -
    Understanding the Scoring Formula - -

    - This scoring formula is described in the - Similarity class. Please take the time to study this formula, as it contains much of the information about how the - basics of Lucene scoring work, especially the - TermQuery. -

    -
    -
    The Big Picture -

    OK, so the tf-idf formula and the - Similarity - is great for understanding the basics of Lucene scoring, but what really drives Lucene scoring are - the use and interactions between the - Query classes, as created by each application in - response to a user's information need. -

    -

    In this regard, Lucene offers a wide variety of Query implementations, most of which are in the - org.apache.lucene.search package. - These implementations can be combined in a wide variety of ways to provide complex querying - capabilities along with - information about where matches took place in the document collection. The Query - section below - highlights some of the more important Query classes. For information on the other ones, see the - package summary. For details on implementing - your own Query class, see Changing your Scoring -- - Expert Level below. -

    -

    Once a Query has been created and submitted to the - IndexSearcher, the scoring process - begins. (See the Appendix Algorithm section for more notes on the process.) After some infrastructure setup, - control finally passes to the Weight implementation and its - Scorer instance. In the case of any type of - BooleanQuery, scoring is handled by the - BooleanWeight2 - (link goes to ViewVC BooleanQuery java code which contains the BooleanWeight2 inner class) or - BooleanWeight - (link goes to ViewVC BooleanQuery java code, which contains the BooleanWeight inner class). -

    -

    - Assuming the use of the BooleanWeight2, a - BooleanScorer2 is created by bringing together - all of the - Scorers from the sub-clauses of the BooleanQuery. - When the BooleanScorer2 is asked to score it delegates its work to an internal Scorer based on the type - of clauses in the Query. This internal Scorer essentially loops over the sub scorers and sums the scores - provided by each scorer while factoring in the coord() score. - -

    -
    -
    Query Classes -

    For information on the Query Classes, refer to the - search package javadocs -

    -
    -
    Changing Similarity -

    One of the ways of changing the scoring characteristics of Lucene is to change the similarity factors. For information on - how to do this, see the - search package javadocs

    -
    - -
    -
    Changing your Scoring -- Expert Level -

    At a much deeper level, one can affect scoring by implementing their own Query classes (and related scoring classes.) To learn more - about how to do this, refer to the - search package javadocs -

    -
    - -
    Appendix -
    Algorithm -

    This section is mostly notes on stepping through the Scoring process and serves as - fertilizer for the earlier sections.

    -

    In the typical search application, a - Query - is passed to the - Searcher - , beginning the scoring process. -

    -

    Once inside the Searcher, a - Collector - is used for the scoring and sorting of the search results. - These important objects are involved in a search: -

      -
    1. The - Weight - object of the Query. The Weight object is an internal representation of the Query that - allows the Query to be reused by the Searcher. -
    2. -
    3. The Searcher that initiated the call.
    4. -
    5. A - Filter - for limiting the result set. Note, the Filter may be null. -
    6. -
    7. A - Sort - object for specifying how to sort the results if the standard score based sort method is not - desired. -
    8. -
    -

    -

    Assuming we are not sorting (since sorting doesn't - effect the raw Lucene score), - we call one of the search methods of the Searcher, passing in the - Weight - object created by Searcher.createWeight(Query), - Filter - and the number of results we want. This method - returns a - TopDocs - object, which is an internal collection of search results. - The Searcher creates a - TopScoreDocCollector - and passes it along with the Weight, Filter to another expert search method (for more on the - Collector - mechanism, see - Searcher - .) The TopDocCollector uses a - PriorityQueue - to collect the top results for the search. -

    -

    If a Filter is being used, some initial setup is done to determine which docs to include. Otherwise, - we ask the Weight for - a - Scorer - for the - IndexReader - of the current searcher and we proceed by - calling the score method on the - Scorer - . -

    -

    At last, we are actually going to score some documents. The score method takes in the Collector - (most likely the TopScoreDocCollector or TopFieldCollector) and does its business. - Of course, here is where things get involved. The - Scorer - that is returned by the - Weight - object depends on what type of Query was submitted. In most real world applications with multiple - query terms, - the - Scorer - is going to be a - BooleanScorer2 - (see the section on customizing your scoring for info on changing this.) - -

    -

    Assuming a BooleanScorer2 scorer, we first initialize the Coordinator, which is used to apply the - coord() factor. We then - get a internal Scorer based on the required, optional and prohibited parts of the query. - Using this internal Scorer, the BooleanScorer2 then proceeds - into a while loop based on the Scorer#next() method. The next() method advances to the next document - matching the query. This is an - abstract method in the Scorer class and is thus overriden by all derived - implementations. If you have a simple OR query - your internal Scorer is most likely a DisjunctionSumScorer, which essentially combines the scorers - from the sub scorers of the OR'd terms.

    -
    -
    - -
    Index: lucene/site/src/documentation/content/xdocs/site.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/site.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/site.xml (working copy) @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/content/xdocs/systemrequirements.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/systemrequirements.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/systemrequirements.xml (working copy) @@ -1,27 +0,0 @@ - - -
    Apache Lucene - System Requirements
    - -Grant Ingersoll, Uwe Schindler - - - -
    System Requirements -

    - Lucene Core has the following minimum requirements: -

      -
    • Java 1.6.x or greater.
    • -
    • ANT 1.7.0 or greater.
    • -
    • CPU, Disk and Memory requirements are based on the many choices made in implementing Lucene (document size, number of documents, and number of hits retrieved to name a few.)
    • -
    -

    -

    Some modules may have other requirements, refer to their documentation and build files for information.

    - -
    - - - -
    Index: lucene/site/src/documentation/content/xdocs/tabs.xml =================================================================== --- lucene/site/src/documentation/content/xdocs/tabs.xml (revision 1328746) +++ lucene/site/src/documentation/content/xdocs/tabs.xml (working copy) @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skinconf.xml =================================================================== --- lucene/site/src/documentation/skinconf.xml (revision 1328746) +++ lucene/site/src/documentation/skinconf.xml (working copy) @@ -1,404 +0,0 @@ - - - - - - - - - - - - true - - true - - true - - true - - - true - - - true - - - true - - - false - ... - - - true - - - Lucene - Apache Lucene is a high-performance, full-featured text search engine library written entirely in - Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform. - http://lucene.apache.org/java/ - http://lucene.apache.org/images/lucene_green_300.gif - - - - - - Lucene - Apache Lucene - http://lucene.apache.org/ - http://www.apache.org/images/asf_logo_simple.png - - - - - - - - - images/favicon.ico - - - 2006 - The Apache Software Foundation. - http://www.apache.org/licenses/ - - - - - - - - - - - - - - - - - - - - - - - - p.quote { - margin-left: 2em; - padding: .5em; - background-color: #f0f0f0; - font-family: monospace; - } - img.float-right { - float: right; - margin-left: 2em; - padding: .5em; - } - - #footer a { color: #0F3660; } - #footer a:visited { color: #009999; } - - pre.code { - margin-left: 2em; - margin-right: 2em; - padding: 0.5em; - background-color: #f0f0f0; - } - - - - - - - - - - - - - - - - - - - - - - - Built with Apache Forrest - http://forrest.apache.org/ - images/built-with-forrest-button.png - 88 - 31 - - - - - - Index: lucene/site/src/documentation/skins/common/skinconf.xsl =================================================================== --- lucene/site/src/documentation/skins/common/skinconf.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/skinconf.xsl (working copy) @@ -1,238 +0,0 @@ - - - - - - - true - - - true - - - true - - - true - - - true - - - false - - - false - - - true - - - .at. - - - true - - - - - - - - - - - - - - - Page 1 - - - - - true - - - - - - - - - - Built with Apache Forrest - http://forrest.apache.org/ - images/built-with-forrest-button.png - 88 - 31 - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/css/forrest.css.xslt =================================================================== --- lucene/site/src/documentation/skins/common/css/forrest.css.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/css/forrest.css.xslt (working copy) @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - -/* ==================== aural ============================ */ - -@media aural { - h1, h2, h3, h4, h5, h6 { voice-family: paul, male; stress: 20; richness: 90 } - h1 { pitch: x-low; pitch-range: 90 } - h2 { pitch: x-low; pitch-range: 80 } - h3 { pitch: low; pitch-range: 70 } - h4 { pitch: medium; pitch-range: 60 } - h5 { pitch: medium; pitch-range: 50 } - h6 { pitch: medium; pitch-range: 40 } - li, dt, dd { pitch: medium; richness: 60 } - dt { stress: 80 } - pre, code, tt { pitch: medium; pitch-range: 0; stress: 0; richness: 80 } - em { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } - strong { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } - dfn { pitch: high; pitch-range: 60; stress: 60 } - s, strike { richness: 0 } - i { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } - b { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } - u { richness: 0 } - - :link { voice-family: harry, male } - :visited { voice-family: betty, female } - :active { voice-family: betty, female; pitch-range: 80; pitch: x-high } -} - - -a.external { - padding: 0 20px 0px 0px; - display:inline; - background-repeat: no-repeat; - background-position: center right; - background-image: url(images/external-link.gif); -} - - -/* extra-css */ - - - - - Index: lucene/site/src/documentation/skins/common/css/forrest.css.xslt =================================================================== --- lucene/site/src/documentation/skins/common/css/forrest.css.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/css/forrest.css.xslt (working copy) @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - -/* ==================== aural ============================ */ - -@media aural { - h1, h2, h3, h4, h5, h6 { voice-family: paul, male; stress: 20; richness: 90 } - h1 { pitch: x-low; pitch-range: 90 } - h2 { pitch: x-low; pitch-range: 80 } - h3 { pitch: low; pitch-range: 70 } - h4 { pitch: medium; pitch-range: 60 } - h5 { pitch: medium; pitch-range: 50 } - h6 { pitch: medium; pitch-range: 40 } - li, dt, dd { pitch: medium; richness: 60 } - dt { stress: 80 } - pre, code, tt { pitch: medium; pitch-range: 0; stress: 0; richness: 80 } - em { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } - strong { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } - dfn { pitch: high; pitch-range: 60; stress: 60 } - s, strike { richness: 0 } - i { pitch: medium; pitch-range: 60; stress: 60; richness: 50 } - b { pitch: medium; pitch-range: 60; stress: 90; richness: 90 } - u { richness: 0 } - - :link { voice-family: harry, male } - :visited { voice-family: betty, female } - :active { voice-family: betty, female; pitch-range: 80; pitch: x-high } -} - - -a.external { - padding: 0 20px 0px 0px; - display:inline; - background-repeat: no-repeat; - background-position: center right; - background-image: url(images/external-link.gif); -} - - -/* extra-css */ - - - - - Index: lucene/site/src/documentation/skins/common/images/poddoc.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/poddoc.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/poddoc.svg.xslt (working copy) @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - POD - - - Index: lucene/site/src/documentation/skins/common/images/page.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/skins/common/images/current.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/skins/common/images/corner-imports.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/corner-imports.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/corner-imports.svg.xslt (working copy) @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - 0 - - - - - - fill:; - - - fill:; - - - stroke:; - - - - - - - - - 1 - -1 - - - - - 1 - -1 - - - - - 0 - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/images/chapter.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/skins/common/images/rc.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/rc.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/rc.svg.xslt (working copy) @@ -1,27 +0,0 @@ - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/images/README.txt =================================================================== --- lucene/site/src/documentation/skins/common/images/README.txt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/README.txt (working copy) @@ -1 +0,0 @@ -The images in this directory are used if the current skin lacks them. Index: lucene/site/src/documentation/skins/common/images/txtdoc.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/txtdoc.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/txtdoc.svg.xslt (working copy) @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - TXT - - - Index: lucene/site/src/documentation/skins/common/images/dc.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/dc.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/dc.svg.xslt (working copy) @@ -1,28 +0,0 @@ - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/images/chapter.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/skins/common/images/corner-imports.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/corner-imports.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/corner-imports.svg.xslt (working copy) @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - 0 - - - - - - fill:; - - - fill:; - - - stroke:; - - - - - - - - - 1 - -1 - - - - - 1 - -1 - - - - - 0 - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/images/current.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/skins/common/images/dc.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/dc.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/dc.svg.xslt (working copy) @@ -1,28 +0,0 @@ - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/images/page.gif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: lucene/site/src/documentation/skins/common/images/poddoc.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/poddoc.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/poddoc.svg.xslt (working copy) @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - POD - - - Index: lucene/site/src/documentation/skins/common/images/rc.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/rc.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/rc.svg.xslt (working copy) @@ -1,27 +0,0 @@ - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/images/README.txt =================================================================== --- lucene/site/src/documentation/skins/common/images/README.txt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/README.txt (working copy) @@ -1 +0,0 @@ -The images in this directory are used if the current skin lacks them. Index: lucene/site/src/documentation/skins/common/images/txtdoc.svg.xslt =================================================================== --- lucene/site/src/documentation/skins/common/images/txtdoc.svg.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/common/images/txtdoc.svg.xslt (working copy) @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - TXT - - - Index: lucene/site/src/documentation/skins/common/scripts/menu.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/menu.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/menu.js (working copy) @@ -1,48 +0,0 @@ -/* -* 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 script, when included in a html file, can be used to make collapsible menus - * - * Typical usage: - * - */ - -if (document.getElementById){ - document.write('') -} - -function SwitchMenu(obj) -{ - if(document.getElementById) { - var el = document.getElementById(obj); - var title = document.getElementById(obj+'Title'); - - if(obj.indexOf("_selected_")==0&&el.style.display == ""){ - el.style.display = "block"; - title.className = "pagegroupselected"; - } - - if(el.style.display != "block"){ - el.style.display = "block"; - title.className = "pagegroupopen"; - } - else{ - el.style.display = "none"; - title.className = "pagegroup"; - } - }// end - if(document.getElementById) -}//end - function SwitchMenu(obj) Index: lucene/site/src/documentation/skins/common/scripts/getMenu.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/getMenu.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/getMenu.js (working copy) @@ -1,45 +0,0 @@ -/* -* 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 script, when included in a html file, can be used to make collapsible menus - * - * Typical usage: - * - */ - -if (document.getElementById){ - document.write('') -} - - -function SwitchMenu(obj, thePath) -{ -var open = 'url("'+thePath + 'images/chapter_open.gif")'; -var close = 'url("'+thePath + 'images/chapter.gif")'; - if(document.getElementById) { - var el = document.getElementById(obj); - var title = document.getElementById(obj+'Title'); - - if(el.style.display != "block"){ - title.style.backgroundImage = open; - el.style.display = "block"; - }else{ - title.style.backgroundImage = close; - el.style.display = "none"; - } - }// end - if(document.getElementById) -}//end - function SwitchMenu(obj) Index: lucene/site/src/documentation/skins/common/scripts/prototype.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/prototype.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/prototype.js (working copy) @@ -1,1257 +0,0 @@ -/* Prototype JavaScript framework, version 1.4.0_pre4 - * (c) 2005 Sam Stephenson - * - * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff - * against the source tree, available from the Prototype darcs repository. - * - * Prototype is freely distributable under the terms of an MIT-style license. - * - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.4.0_pre4', - - emptyFunction: function() {}, - K: function(x) {return x} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Function.prototype.bind = function(object) { - var __method = this; - return function() { - return __method.apply(object, arguments); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -} - -Number.prototype.toColorPart = function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; -} - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} - -if (!Array.prototype.push) { - Array.prototype.push = function() { - var startLength = this.length; - for (var i = 0; i < arguments.length; i++) - this[startLength + i] = arguments[i]; - return this.length; - } -} - -if (!Function.prototype.apply) { - // Based on code from http://www.youngpup.net/ - Function.prototype.apply = function(object, parameters) { - var parameterStrings = new Array(); - if (!object) object = window; - if (!parameters) parameters = new Array(); - - for (var i = 0; i < parameters.length; i++) - parameterStrings[i] = 'parameters[' + i + ']'; - - object.__apply__ = this; - var result = eval('object.__apply__(' + - parameterStrings.join(', ') + ')'); - object.__apply__ = null; - - return result; - } -} - -Object.extend(String.prototype, { - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0].nodeValue; - }, - - parseQuery: function() { - var str = this; - if (str.substring(0,1) == '?') { - str = this.substring(1); - } - var result = {}; - var pairs = str.split('&'); - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i].split('='); - result[pair[0]] = pair[1]; - } - return result; - } -}); - - -var _break = new Object(); -var _continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != _continue) throw e; - } - }); - } catch (e) { - if (e != _break) throw e; - } - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - if (!(result &= (iterator || Prototype.K)(value, index))) - throw _break; - }); - return result; - }, - - any: function(iterator) { - var result = true; - this.each(function(value, index) { - if (result &= (iterator || Prototype.K)(value, index)) - throw _break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function (iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw _break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw _break; - } - }); - return found; - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.collect(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.collect(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.collect(Prototype.K); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; - }); - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); - -$A = Array.from = function(iterable) { - var results = []; - for (var i = 0; i < iterable.length; i++) - results.push(iterable[i]); - return results; -} - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0; i < this.length; i++) - iterator(this[i]); - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - } -}); - -Object.extend(Array.prototype, Enumerable); - - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - } -} - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - Object.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - if (this.options.method == 'get') - url += '?' + parameters; - - this.transport.open(this.options.method, url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - - if (event == 'Complete') - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(this.transport); - - (this.options['on' + event] || Prototype.emptyFunction)(this.transport); - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = Prototype.emptyFunction; - } -}); - -Ajax.Updater = Class.create(); -Ajax.Updater.ScriptFragment = '(?:)((\n|.)*?)(?:<\/script>)'; - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function() { - this.updateContent(); - onComplete(this.transport); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - - var match = new RegExp(Ajax.Updater.ScriptFragment, 'img'); - var response = this.transport.responseText.replace(match, ''); - var scripts = this.transport.responseText.match(match); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - receiver.innerHTML = response; - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout((function() {this.onComplete( - this.transport)}).bind(this), 10); - } - - if (this.options.evalScripts && scripts) { - match = new RegExp(Ajax.Updater.ScriptFragment, 'im'); - setTimeout((function() { - for (var i = 0; i < scripts.length; i++) - eval(scripts[i].match(match)[1]); - }).bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = 1; - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Ajax.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); - -document.getElementsByClassName = function(className) { - var children = document.getElementsByTagName('*') || document.all; - var elements = new Array(); - - for (var i = 0; i < children.length; i++) { - var child = children[i]; - var classNames = child.className.split(' '); - for (var j = 0; j < classNames.length; j++) { - if (classNames[j] == className) { - elements.push(child); - break; - } - } - } - - return elements; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = - (element.style.display == 'none' ? '' : 'none'); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - hasClassName: function(element, className) { - element = $(element); - if (!element) - return; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] == className) - return true; - } - return false; - }, - - addClassName: function(element, className) { - element = $(element); - Element.removeClassName(element, className); - element.className += ' ' + className; - }, - - removeClassName: function(element, className) { - element = $(element); - if (!element) - return; - var newClassName = ''; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] != className) { - if (i > 0) - newClassName += ' '; - newClassName += a[i]; - } - } - element.className = newClassName; - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - var element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content; - - if (this.adjacency && this.element.insertAdjacentHTML) { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.fragment = this.range.createContextualFragment(this.content); - this.insertContent(); - } - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, this.element); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function() { - this.element.insertBefore(this.fragment, this.element.firstChild); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function() { - this.element.appendChild(this.fragment); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, - this.element.nextSibling); - } -}); - -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - $(element).focus(); - $(element).select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - var form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - var form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - focusFirstElement: function(form) { - var form = $(form); - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (element.type != 'hidden' && !element.disabled) { - Field.activate(element); - break; - } - } - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return encodeURIComponent(parameter[0]) + '=' + - encodeURIComponent(parameter[1]); - }, - - getValue: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - var value = ''; - if (element.type == 'select-one') { - var index = element.selectedIndex; - if (index >= 0) - value = element.options[index].value || element.options[index].text; - } else { - value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) - value.push(opt.value || opt.text); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - element.target = this; - element.prev_onclick = element.onclick || Prototype.emptyFunction; - element.onclick = function() { - this.prev_onclick(); - this.target.onElementEvent(); - } - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - element.target = this; - element.prev_onchange = element.onchange || Prototype.emptyFunction; - element.onchange = function() { - this.prev_onchange(); - this.target.onElementEvent(); - } - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - - -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - || element.attachEvent)) - name = 'keydown'; - - this._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } -}); - -/* prevent memory leaks in IE */ -Event.observe(window, 'unload', Event.unloadCache, false); - -var Position = { - - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - } -} Index: lucene/site/src/documentation/skins/common/scripts/getBlank.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/getBlank.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/getBlank.js (working copy) @@ -1,40 +0,0 @@ -/* -* 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. -*/ -/** - * getBlank script - when included in a html file and called from a form text field, will set the value of this field to "" - * if the text value is still the standard value. - * getPrompt script - when included in a html file and called from a form text field, will set the value of this field to the prompt - * if the text value is empty. - * - * Typical usage: - * - * - */ - Index: lucene/site/src/documentation/skins/common/scripts/breadcrumbs.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/breadcrumbs.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/breadcrumbs.js (working copy) @@ -1,237 +0,0 @@ -/* -* 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 script, when included in a html file, builds a neat breadcrumb trail - * based on its url. That is, if it doesn't contains bugs (I'm relatively - * sure it does). - * - * Typical usage: - * - */ - -/** - * IE 5 on Mac doesn't know Array.push. - * - * Implement it - courtesy to fritz. - */ -var abc = new Array(); -if (!abc.push) { - Array.prototype.push = function(what){this[this.length]=what} -} - -/* ======================================================================== - CONSTANTS - ======================================================================== */ - -/** - * Two-dimensional array containing extra crumbs to place at the front of - * the trail. Specify first the name of the crumb, then the URI that belongs - * to it. You'll need to modify this for every domain or subdomain where - * you use this script (you can leave it as an empty array if you wish) - */ -var PREPREND_CRUMBS = new Array(); - -var link1 = "@skinconfig.trail.link1.name@"; -var link2 = "@skinconfig.trail.link2.name@"; -var link3 = "@skinconfig.trail.link3.name@"; - -var href1 = "@skinconfig.trail.link1.href@"; -var href2 = "@skinconfig.trail.link2.href@"; -var href3 = "@skinconfig.trail.link3.href@"; - - if(!(link1=="")&&!link1.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link1, href1 ) ); - } - if(!(link2=="")&&!link2.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link2, href2 ) ); - } - if(!(link3=="")&&!link3.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link3, href3 ) ); - } - -/** - * String to include between crumbs: - */ -var DISPLAY_SEPARATOR = " > "; -/** - * String to include at the beginning of the trail - */ -var DISPLAY_PREPREND = " > "; -/** - * String to include at the end of the trail - */ -var DISPLAY_POSTPREND = ""; - -/** - * CSS Class to use for a single crumb: - */ -var CSS_CLASS_CRUMB = "breadcrumb"; - -/** - * CSS Class to use for the complete trail: - */ -var CSS_CLASS_TRAIL = "breadcrumbTrail"; - -/** - * CSS Class to use for crumb separator: - */ -var CSS_CLASS_SEPARATOR = "crumbSeparator"; - -/** - * Array of strings containing common file extensions. We use this to - * determine what part of the url to ignore (if it contains one of the - * string specified here, we ignore it). - */ -var FILE_EXTENSIONS = new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" ); - -/** - * String that separates parts of the breadcrumb trail from each other. - * When this is no longer a slash, I'm sure I'll be old and grey. - */ -var PATH_SEPARATOR = "/"; - -/* ======================================================================== - UTILITY FUNCTIONS - ======================================================================== */ -/** - * Capitalize first letter of the provided string and return the modified - * string. - */ -function sentenceCase( string ) -{ return string; - //var lower = string.toLowerCase(); - //return lower.substr(0,1).toUpperCase() + lower.substr(1); -} - -/** - * Returns an array containing the names of all the directories in the - * current document URL - */ -function getDirectoriesInURL() -{ - var trail = document.location.pathname.split( PATH_SEPARATOR ); - - // check whether last section is a file or a directory - var lastcrumb = trail[trail.length-1]; - for( var i = 0; i < FILE_EXTENSIONS.length; i++ ) - { - if( lastcrumb.indexOf( FILE_EXTENSIONS[i] ) ) - { - // it is, remove it and send results - return trail.slice( 1, trail.length-1 ); - } - } - - // it's not; send the trail unmodified - return trail.slice( 1, trail.length ); -} - -/* ======================================================================== - BREADCRUMB FUNCTIONALITY - ======================================================================== */ -/** - * Return a two-dimensional array describing the breadcrumbs based on the - * array of directories passed in. - */ -function getBreadcrumbs( dirs ) -{ - var prefix = "/"; - var postfix = "/"; - - // the array we will return - var crumbs = new Array(); - - if( dirs != null ) - { - for( var i = 0; i < dirs.length; i++ ) - { - prefix += dirs[i] + postfix; - crumbs.push( new Array( dirs[i], prefix ) ); - } - } - - // preprend the PREPREND_CRUMBS - if(PREPREND_CRUMBS.length > 0 ) - { - return PREPREND_CRUMBS.concat( crumbs ); - } - - return crumbs; -} - -/** - * Return a string containing a simple text breadcrumb trail based on the - * two-dimensional array passed in. - */ -function getCrumbTrail( crumbs ) -{ - var xhtml = DISPLAY_PREPREND; - - for( var i = 0; i < crumbs.length; i++ ) - { - xhtml += ''; - xhtml += unescape( crumbs[i][0] ) + ''; - if( i != (crumbs.length-1) ) - { - xhtml += DISPLAY_SEPARATOR; - } - } - - xhtml += DISPLAY_POSTPREND; - - return xhtml; -} - -/** - * Return a string containing an XHTML breadcrumb trail based on the - * two-dimensional array passed in. - */ -function getCrumbTrailXHTML( crumbs ) -{ - var xhtml = ''; - xhtml += DISPLAY_PREPREND; - - for( var i = 0; i < crumbs.length; i++ ) - { - xhtml += ''; - xhtml += unescape( crumbs[i][0] ) + ''; - if( i != (crumbs.length-1) ) - { - xhtml += '' + DISPLAY_SEPARATOR + ''; - } - } - - xhtml += DISPLAY_POSTPREND; - xhtml += ''; - - return xhtml; -} - -/* ======================================================================== - PRINT BREADCRUMB TRAIL - ======================================================================== */ - -// check if we're local; if so, only print the PREPREND_CRUMBS -if( document.location.href.toLowerCase().indexOf( "http://" ) == -1 ) -{ - document.write( getCrumbTrail( getBreadcrumbs() ) ); -} -else -{ - document.write( getCrumbTrail( getBreadcrumbs( getDirectoriesInURL() ) ) ); -} - Index: lucene/site/src/documentation/skins/common/scripts/breadcrumbs-optimized.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/breadcrumbs-optimized.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/breadcrumbs-optimized.js (working copy) @@ -1,90 +0,0 @@ -/* -* 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. -*/ -var PREPREND_CRUMBS=new Array(); -var link1="@skinconfig.trail.link1.name@"; -var link2="@skinconfig.trail.link2.name@"; -var link3="@skinconfig.trail.link3.name@"; -if(!(link1=="")&&!link1.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link1, @skinconfig.trail.link1.href@ ) ); } -if(!(link2=="")&&!link2.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link2, @skinconfig.trail.link2.href@ ) ); } -if(!(link3=="")&&!link3.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link3, @skinconfig.trail.link3.href@ ) ); } -var DISPLAY_SEPARATOR=" > "; -var DISPLAY_PREPREND=" > "; -var DISPLAY_POSTPREND=":"; -var CSS_CLASS_CRUMB="breadcrumb"; -var CSS_CLASS_TRAIL="breadcrumbTrail"; -var CSS_CLASS_SEPARATOR="crumbSeparator"; -var FILE_EXTENSIONS=new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" ); -var PATH_SEPARATOR="/"; - -function sc(s) { - var l=s.toLowerCase(); - return l.substr(0,1).toUpperCase()+l.substr(1); -} -function getdirs() { - var t=document.location.pathname.split(PATH_SEPARATOR); - var lc=t[t.length-1]; - for(var i=0;i < FILE_EXTENSIONS.length;i++) - { - if(lc.indexOf(FILE_EXTENSIONS[i])) - return t.slice(1,t.length-1); } - return t.slice(1,t.length); -} -function getcrumbs( d ) -{ - var pre = "/"; - var post = "/"; - var c = new Array(); - if( d != null ) - { - for(var i=0;i < d.length;i++) { - pre+=d[i]+postfix; - c.push(new Array(d[i],pre)); } - } - if(PREPREND_CRUMBS.length > 0 ) - return PREPREND_CRUMBS.concat( c ); - return c; -} -function gettrail( c ) -{ - var h=DISPLAY_PREPREND; - for(var i=0;i < c.length;i++) - { - h+=''+sc(c[i][0])+''; - if(i!=(c.length-1)) - h+=DISPLAY_SEPARATOR; } - return h+DISPLAY_POSTPREND; -} - -function gettrailXHTML( c ) -{ - var h=''+DISPLAY_PREPREND; - for(var i=0;i < c.length;i++) - { - h+=''+sc(c[i][0])+''; - if(i!=(c.length-1)) - h+=''+DISPLAY_SEPARATOR+''; } - return h+DISPLAY_POSTPREND+''; -} - -if(document.location.href.toLowerCase().indexOf("http://")==-1) - document.write(gettrail(getcrumbs())); -else - document.write(gettrail(getcrumbs(getdirs()))); - Index: lucene/site/src/documentation/skins/common/scripts/fontsize.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/fontsize.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/fontsize.js (working copy) @@ -1,166 +0,0 @@ -/* -* 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. -*/ -function init() -{ //embedded in the doc - //ndeSetTextSize(); -} - -function checkBrowser(){ - if (!document.getElementsByTagName){ - return true; - } - else{ - return false; - } -} - - -function ndeSetTextSize(chgsize,rs) -{ - var startSize; - var newSize; - - if (!checkBrowser) - { - return; - } - - startSize = parseInt(ndeGetDocTextSize()); - - if (!startSize) - { - startSize = 16; - } - - switch (chgsize) - { - case 'incr': - newSize = startSize + 2; - break; - - case 'decr': - newSize = startSize - 2; - break; - - case 'reset': - if (rs) {newSize = rs;} else {newSize = 16;} - break; - - default: - try{ - newSize = parseInt(ndeReadCookie("nde-textsize")); - } - catch(e){ - alert(e); - } - - if (!newSize || newSize == 'NaN') - { - newSize = startSize; - } - break; - - } - - if (newSize < 10) - { - newSize = 10; - } - - newSize += 'px'; - - document.getElementsByTagName('html')[0].style.fontSize = newSize; - document.getElementsByTagName('body')[0].style.fontSize = newSize; - - ndeCreateCookie("nde-textsize", newSize, 365); -} - -function ndeGetDocTextSize() -{ - if (!checkBrowser) - { - return 0; - } - - var size = 0; - var body = document.getElementsByTagName('body')[0]; - - if (body.style && body.style.fontSize) - { - size = body.style.fontSize; - } - else if (typeof(getComputedStyle) != 'undefined') - { - size = getComputedStyle(body,'').getPropertyValue('font-size'); - } - else if (body.currentStyle) - { - size = body.currentStyle.fontSize; - } - - //fix IE bug - if( isNaN(size)){ - if(size.substring(size.length-1)=="%"){ - return - } - - } - - return size; - -} - - - -function ndeCreateCookie(name,value,days) -{ - var cookie = name + "=" + value + ";"; - - if (days) - { - var date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - cookie += " expires=" + date.toGMTString() + ";"; - } - cookie += " path=/"; - - document.cookie = cookie; - -} - -function ndeReadCookie(name) -{ - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - - - for(var i = 0; i < ca.length; i++) - { - var c = ca[i]; - while (c.charAt(0) == ' ') - { - c = c.substring(1, c.length); - } - - ctest = c.substring(0,name.length); - - if(ctest == name){ - return c.substring(nameEQ.length,c.length); - } - } - return null; -} Index: lucene/site/src/documentation/skins/common/scripts/breadcrumbs-optimized.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/breadcrumbs-optimized.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/breadcrumbs-optimized.js (working copy) @@ -1,90 +0,0 @@ -/* -* 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. -*/ -var PREPREND_CRUMBS=new Array(); -var link1="@skinconfig.trail.link1.name@"; -var link2="@skinconfig.trail.link2.name@"; -var link3="@skinconfig.trail.link3.name@"; -if(!(link1=="")&&!link1.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link1, @skinconfig.trail.link1.href@ ) ); } -if(!(link2=="")&&!link2.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link2, @skinconfig.trail.link2.href@ ) ); } -if(!(link3=="")&&!link3.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link3, @skinconfig.trail.link3.href@ ) ); } -var DISPLAY_SEPARATOR=" > "; -var DISPLAY_PREPREND=" > "; -var DISPLAY_POSTPREND=":"; -var CSS_CLASS_CRUMB="breadcrumb"; -var CSS_CLASS_TRAIL="breadcrumbTrail"; -var CSS_CLASS_SEPARATOR="crumbSeparator"; -var FILE_EXTENSIONS=new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" ); -var PATH_SEPARATOR="/"; - -function sc(s) { - var l=s.toLowerCase(); - return l.substr(0,1).toUpperCase()+l.substr(1); -} -function getdirs() { - var t=document.location.pathname.split(PATH_SEPARATOR); - var lc=t[t.length-1]; - for(var i=0;i < FILE_EXTENSIONS.length;i++) - { - if(lc.indexOf(FILE_EXTENSIONS[i])) - return t.slice(1,t.length-1); } - return t.slice(1,t.length); -} -function getcrumbs( d ) -{ - var pre = "/"; - var post = "/"; - var c = new Array(); - if( d != null ) - { - for(var i=0;i < d.length;i++) { - pre+=d[i]+postfix; - c.push(new Array(d[i],pre)); } - } - if(PREPREND_CRUMBS.length > 0 ) - return PREPREND_CRUMBS.concat( c ); - return c; -} -function gettrail( c ) -{ - var h=DISPLAY_PREPREND; - for(var i=0;i < c.length;i++) - { - h+=''+sc(c[i][0])+''; - if(i!=(c.length-1)) - h+=DISPLAY_SEPARATOR; } - return h+DISPLAY_POSTPREND; -} - -function gettrailXHTML( c ) -{ - var h=''+DISPLAY_PREPREND; - for(var i=0;i < c.length;i++) - { - h+=''+sc(c[i][0])+''; - if(i!=(c.length-1)) - h+=''+DISPLAY_SEPARATOR+''; } - return h+DISPLAY_POSTPREND+''; -} - -if(document.location.href.toLowerCase().indexOf("http://")==-1) - document.write(gettrail(getcrumbs())); -else - document.write(gettrail(getcrumbs(getdirs()))); - Index: lucene/site/src/documentation/skins/common/scripts/breadcrumbs.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/breadcrumbs.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/breadcrumbs.js (working copy) @@ -1,237 +0,0 @@ -/* -* 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 script, when included in a html file, builds a neat breadcrumb trail - * based on its url. That is, if it doesn't contains bugs (I'm relatively - * sure it does). - * - * Typical usage: - * - */ - -/** - * IE 5 on Mac doesn't know Array.push. - * - * Implement it - courtesy to fritz. - */ -var abc = new Array(); -if (!abc.push) { - Array.prototype.push = function(what){this[this.length]=what} -} - -/* ======================================================================== - CONSTANTS - ======================================================================== */ - -/** - * Two-dimensional array containing extra crumbs to place at the front of - * the trail. Specify first the name of the crumb, then the URI that belongs - * to it. You'll need to modify this for every domain or subdomain where - * you use this script (you can leave it as an empty array if you wish) - */ -var PREPREND_CRUMBS = new Array(); - -var link1 = "@skinconfig.trail.link1.name@"; -var link2 = "@skinconfig.trail.link2.name@"; -var link3 = "@skinconfig.trail.link3.name@"; - -var href1 = "@skinconfig.trail.link1.href@"; -var href2 = "@skinconfig.trail.link2.href@"; -var href3 = "@skinconfig.trail.link3.href@"; - - if(!(link1=="")&&!link1.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link1, href1 ) ); - } - if(!(link2=="")&&!link2.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link2, href2 ) ); - } - if(!(link3=="")&&!link3.indexOf( "@" ) == 0){ - PREPREND_CRUMBS.push( new Array( link3, href3 ) ); - } - -/** - * String to include between crumbs: - */ -var DISPLAY_SEPARATOR = " > "; -/** - * String to include at the beginning of the trail - */ -var DISPLAY_PREPREND = " > "; -/** - * String to include at the end of the trail - */ -var DISPLAY_POSTPREND = ""; - -/** - * CSS Class to use for a single crumb: - */ -var CSS_CLASS_CRUMB = "breadcrumb"; - -/** - * CSS Class to use for the complete trail: - */ -var CSS_CLASS_TRAIL = "breadcrumbTrail"; - -/** - * CSS Class to use for crumb separator: - */ -var CSS_CLASS_SEPARATOR = "crumbSeparator"; - -/** - * Array of strings containing common file extensions. We use this to - * determine what part of the url to ignore (if it contains one of the - * string specified here, we ignore it). - */ -var FILE_EXTENSIONS = new Array( ".html", ".htm", ".jsp", ".php", ".php3", ".php4" ); - -/** - * String that separates parts of the breadcrumb trail from each other. - * When this is no longer a slash, I'm sure I'll be old and grey. - */ -var PATH_SEPARATOR = "/"; - -/* ======================================================================== - UTILITY FUNCTIONS - ======================================================================== */ -/** - * Capitalize first letter of the provided string and return the modified - * string. - */ -function sentenceCase( string ) -{ return string; - //var lower = string.toLowerCase(); - //return lower.substr(0,1).toUpperCase() + lower.substr(1); -} - -/** - * Returns an array containing the names of all the directories in the - * current document URL - */ -function getDirectoriesInURL() -{ - var trail = document.location.pathname.split( PATH_SEPARATOR ); - - // check whether last section is a file or a directory - var lastcrumb = trail[trail.length-1]; - for( var i = 0; i < FILE_EXTENSIONS.length; i++ ) - { - if( lastcrumb.indexOf( FILE_EXTENSIONS[i] ) ) - { - // it is, remove it and send results - return trail.slice( 1, trail.length-1 ); - } - } - - // it's not; send the trail unmodified - return trail.slice( 1, trail.length ); -} - -/* ======================================================================== - BREADCRUMB FUNCTIONALITY - ======================================================================== */ -/** - * Return a two-dimensional array describing the breadcrumbs based on the - * array of directories passed in. - */ -function getBreadcrumbs( dirs ) -{ - var prefix = "/"; - var postfix = "/"; - - // the array we will return - var crumbs = new Array(); - - if( dirs != null ) - { - for( var i = 0; i < dirs.length; i++ ) - { - prefix += dirs[i] + postfix; - crumbs.push( new Array( dirs[i], prefix ) ); - } - } - - // preprend the PREPREND_CRUMBS - if(PREPREND_CRUMBS.length > 0 ) - { - return PREPREND_CRUMBS.concat( crumbs ); - } - - return crumbs; -} - -/** - * Return a string containing a simple text breadcrumb trail based on the - * two-dimensional array passed in. - */ -function getCrumbTrail( crumbs ) -{ - var xhtml = DISPLAY_PREPREND; - - for( var i = 0; i < crumbs.length; i++ ) - { - xhtml += ''; - xhtml += unescape( crumbs[i][0] ) + ''; - if( i != (crumbs.length-1) ) - { - xhtml += DISPLAY_SEPARATOR; - } - } - - xhtml += DISPLAY_POSTPREND; - - return xhtml; -} - -/** - * Return a string containing an XHTML breadcrumb trail based on the - * two-dimensional array passed in. - */ -function getCrumbTrailXHTML( crumbs ) -{ - var xhtml = ''; - xhtml += DISPLAY_PREPREND; - - for( var i = 0; i < crumbs.length; i++ ) - { - xhtml += ''; - xhtml += unescape( crumbs[i][0] ) + ''; - if( i != (crumbs.length-1) ) - { - xhtml += '' + DISPLAY_SEPARATOR + ''; - } - } - - xhtml += DISPLAY_POSTPREND; - xhtml += ''; - - return xhtml; -} - -/* ======================================================================== - PRINT BREADCRUMB TRAIL - ======================================================================== */ - -// check if we're local; if so, only print the PREPREND_CRUMBS -if( document.location.href.toLowerCase().indexOf( "http://" ) == -1 ) -{ - document.write( getCrumbTrail( getBreadcrumbs() ) ); -} -else -{ - document.write( getCrumbTrail( getBreadcrumbs( getDirectoriesInURL() ) ) ); -} - Index: lucene/site/src/documentation/skins/common/scripts/fontsize.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/fontsize.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/fontsize.js (working copy) @@ -1,166 +0,0 @@ -/* -* 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. -*/ -function init() -{ //embedded in the doc - //ndeSetTextSize(); -} - -function checkBrowser(){ - if (!document.getElementsByTagName){ - return true; - } - else{ - return false; - } -} - - -function ndeSetTextSize(chgsize,rs) -{ - var startSize; - var newSize; - - if (!checkBrowser) - { - return; - } - - startSize = parseInt(ndeGetDocTextSize()); - - if (!startSize) - { - startSize = 16; - } - - switch (chgsize) - { - case 'incr': - newSize = startSize + 2; - break; - - case 'decr': - newSize = startSize - 2; - break; - - case 'reset': - if (rs) {newSize = rs;} else {newSize = 16;} - break; - - default: - try{ - newSize = parseInt(ndeReadCookie("nde-textsize")); - } - catch(e){ - alert(e); - } - - if (!newSize || newSize == 'NaN') - { - newSize = startSize; - } - break; - - } - - if (newSize < 10) - { - newSize = 10; - } - - newSize += 'px'; - - document.getElementsByTagName('html')[0].style.fontSize = newSize; - document.getElementsByTagName('body')[0].style.fontSize = newSize; - - ndeCreateCookie("nde-textsize", newSize, 365); -} - -function ndeGetDocTextSize() -{ - if (!checkBrowser) - { - return 0; - } - - var size = 0; - var body = document.getElementsByTagName('body')[0]; - - if (body.style && body.style.fontSize) - { - size = body.style.fontSize; - } - else if (typeof(getComputedStyle) != 'undefined') - { - size = getComputedStyle(body,'').getPropertyValue('font-size'); - } - else if (body.currentStyle) - { - size = body.currentStyle.fontSize; - } - - //fix IE bug - if( isNaN(size)){ - if(size.substring(size.length-1)=="%"){ - return - } - - } - - return size; - -} - - - -function ndeCreateCookie(name,value,days) -{ - var cookie = name + "=" + value + ";"; - - if (days) - { - var date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - cookie += " expires=" + date.toGMTString() + ";"; - } - cookie += " path=/"; - - document.cookie = cookie; - -} - -function ndeReadCookie(name) -{ - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - - - for(var i = 0; i < ca.length; i++) - { - var c = ca[i]; - while (c.charAt(0) == ' ') - { - c = c.substring(1, c.length); - } - - ctest = c.substring(0,name.length); - - if(ctest == name){ - return c.substring(nameEQ.length,c.length); - } - } - return null; -} Index: lucene/site/src/documentation/skins/common/scripts/getBlank.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/getBlank.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/getBlank.js (working copy) @@ -1,40 +0,0 @@ -/* -* 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. -*/ -/** - * getBlank script - when included in a html file and called from a form text field, will set the value of this field to "" - * if the text value is still the standard value. - * getPrompt script - when included in a html file and called from a form text field, will set the value of this field to the prompt - * if the text value is empty. - * - * Typical usage: - * - * - */ - Index: lucene/site/src/documentation/skins/common/scripts/getMenu.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/getMenu.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/getMenu.js (working copy) @@ -1,45 +0,0 @@ -/* -* 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 script, when included in a html file, can be used to make collapsible menus - * - * Typical usage: - * - */ - -if (document.getElementById){ - document.write('') -} - - -function SwitchMenu(obj, thePath) -{ -var open = 'url("'+thePath + 'images/chapter_open.gif")'; -var close = 'url("'+thePath + 'images/chapter.gif")'; - if(document.getElementById) { - var el = document.getElementById(obj); - var title = document.getElementById(obj+'Title'); - - if(el.style.display != "block"){ - title.style.backgroundImage = open; - el.style.display = "block"; - }else{ - title.style.backgroundImage = close; - el.style.display = "none"; - } - }// end - if(document.getElementById) -}//end - function SwitchMenu(obj) Index: lucene/site/src/documentation/skins/common/scripts/menu.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/menu.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/menu.js (working copy) @@ -1,48 +0,0 @@ -/* -* 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 script, when included in a html file, can be used to make collapsible menus - * - * Typical usage: - * - */ - -if (document.getElementById){ - document.write('') -} - -function SwitchMenu(obj) -{ - if(document.getElementById) { - var el = document.getElementById(obj); - var title = document.getElementById(obj+'Title'); - - if(obj.indexOf("_selected_")==0&&el.style.display == ""){ - el.style.display = "block"; - title.className = "pagegroupselected"; - } - - if(el.style.display != "block"){ - el.style.display = "block"; - title.className = "pagegroupopen"; - } - else{ - el.style.display = "none"; - title.className = "pagegroup"; - } - }// end - if(document.getElementById) -}//end - function SwitchMenu(obj) Index: lucene/site/src/documentation/skins/common/scripts/prototype.js =================================================================== --- lucene/site/src/documentation/skins/common/scripts/prototype.js (revision 1328746) +++ lucene/site/src/documentation/skins/common/scripts/prototype.js (working copy) @@ -1,1257 +0,0 @@ -/* Prototype JavaScript framework, version 1.4.0_pre4 - * (c) 2005 Sam Stephenson - * - * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff - * against the source tree, available from the Prototype darcs repository. - * - * Prototype is freely distributable under the terms of an MIT-style license. - * - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.4.0_pre4', - - emptyFunction: function() {}, - K: function(x) {return x} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Function.prototype.bind = function(object) { - var __method = this; - return function() { - return __method.apply(object, arguments); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -} - -Number.prototype.toColorPart = function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; -} - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} - -if (!Array.prototype.push) { - Array.prototype.push = function() { - var startLength = this.length; - for (var i = 0; i < arguments.length; i++) - this[startLength + i] = arguments[i]; - return this.length; - } -} - -if (!Function.prototype.apply) { - // Based on code from http://www.youngpup.net/ - Function.prototype.apply = function(object, parameters) { - var parameterStrings = new Array(); - if (!object) object = window; - if (!parameters) parameters = new Array(); - - for (var i = 0; i < parameters.length; i++) - parameterStrings[i] = 'parameters[' + i + ']'; - - object.__apply__ = this; - var result = eval('object.__apply__(' + - parameterStrings.join(', ') + ')'); - object.__apply__ = null; - - return result; - } -} - -Object.extend(String.prototype, { - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0].nodeValue; - }, - - parseQuery: function() { - var str = this; - if (str.substring(0,1) == '?') { - str = this.substring(1); - } - var result = {}; - var pairs = str.split('&'); - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i].split('='); - result[pair[0]] = pair[1]; - } - return result; - } -}); - - -var _break = new Object(); -var _continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != _continue) throw e; - } - }); - } catch (e) { - if (e != _break) throw e; - } - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - if (!(result &= (iterator || Prototype.K)(value, index))) - throw _break; - }); - return result; - }, - - any: function(iterator) { - var result = true; - this.each(function(value, index) { - if (result &= (iterator || Prototype.K)(value, index)) - throw _break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function (iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw _break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw _break; - } - }); - return found; - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.collect(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.collect(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.collect(Prototype.K); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; - }); - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); - -$A = Array.from = function(iterable) { - var results = []; - for (var i = 0; i < iterable.length; i++) - results.push(iterable[i]); - return results; -} - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0; i < this.length; i++) - iterator(this[i]); - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - } -}); - -Object.extend(Array.prototype, Enumerable); - - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - } -} - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - Object.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - if (this.options.method == 'get') - url += '?' + parameters; - - this.transport.open(this.options.method, url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - - if (event == 'Complete') - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(this.transport); - - (this.options['on' + event] || Prototype.emptyFunction)(this.transport); - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = Prototype.emptyFunction; - } -}); - -Ajax.Updater = Class.create(); -Ajax.Updater.ScriptFragment = '(?:)((\n|.)*?)(?:<\/script>)'; - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function() { - this.updateContent(); - onComplete(this.transport); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - - var match = new RegExp(Ajax.Updater.ScriptFragment, 'img'); - var response = this.transport.responseText.replace(match, ''); - var scripts = this.transport.responseText.match(match); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - receiver.innerHTML = response; - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout((function() {this.onComplete( - this.transport)}).bind(this), 10); - } - - if (this.options.evalScripts && scripts) { - match = new RegExp(Ajax.Updater.ScriptFragment, 'im'); - setTimeout((function() { - for (var i = 0; i < scripts.length; i++) - eval(scripts[i].match(match)[1]); - }).bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = 1; - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Ajax.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); - -document.getElementsByClassName = function(className) { - var children = document.getElementsByTagName('*') || document.all; - var elements = new Array(); - - for (var i = 0; i < children.length; i++) { - var child = children[i]; - var classNames = child.className.split(' '); - for (var j = 0; j < classNames.length; j++) { - if (classNames[j] == className) { - elements.push(child); - break; - } - } - } - - return elements; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = - (element.style.display == 'none' ? '' : 'none'); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - hasClassName: function(element, className) { - element = $(element); - if (!element) - return; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] == className) - return true; - } - return false; - }, - - addClassName: function(element, className) { - element = $(element); - Element.removeClassName(element, className); - element.className += ' ' + className; - }, - - removeClassName: function(element, className) { - element = $(element); - if (!element) - return; - var newClassName = ''; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] != className) { - if (i > 0) - newClassName += ' '; - newClassName += a[i]; - } - } - element.className = newClassName; - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - var element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content; - - if (this.adjacency && this.element.insertAdjacentHTML) { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.fragment = this.range.createContextualFragment(this.content); - this.insertContent(); - } - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, this.element); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function() { - this.element.insertBefore(this.fragment, this.element.firstChild); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function() { - this.element.appendChild(this.fragment); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, - this.element.nextSibling); - } -}); - -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - $(element).focus(); - $(element).select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - var form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - var form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - focusFirstElement: function(form) { - var form = $(form); - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (element.type != 'hidden' && !element.disabled) { - Field.activate(element); - break; - } - } - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return encodeURIComponent(parameter[0]) + '=' + - encodeURIComponent(parameter[1]); - }, - - getValue: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - var value = ''; - if (element.type == 'select-one') { - var index = element.selectedIndex; - if (index >= 0) - value = element.options[index].value || element.options[index].text; - } else { - value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) - value.push(opt.value || opt.text); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - element.target = this; - element.prev_onclick = element.onclick || Prototype.emptyFunction; - element.onclick = function() { - this.prev_onclick(); - this.target.onElementEvent(); - } - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - element.target = this; - element.prev_onchange = element.onchange || Prototype.emptyFunction; - element.onchange = function() { - this.prev_onchange(); - this.target.onElementEvent(); - } - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - - -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - || element.attachEvent)) - name = 'keydown'; - - this._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - ((/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } -}); - -/* prevent memory leaks in IE */ -Event.observe(window, 'unload', Event.unloadCache, false); - -var Position = { - - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - } -} Index: lucene/site/src/documentation/skins/common/skinconf.xsl =================================================================== --- lucene/site/src/documentation/skins/common/skinconf.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/skinconf.xsl (working copy) @@ -1,238 +0,0 @@ - - - - - - - true - - - true - - - true - - - true - - - true - - - false - - - false - - - true - - - .at. - - - true - - - - - - - - - - - - - - - Page 1 - - - - - true - - - - - - - - - - Built with Apache Forrest - http://forrest.apache.org/ - images/built-with-forrest-button.png - 88 - 31 - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/translations/CommonMessages_fr.xml =================================================================== --- lucene/site/src/documentation/skins/common/translations/CommonMessages_fr.xml (revision 1328746) +++ lucene/site/src/documentation/skins/common/translations/CommonMessages_fr.xml (working copy) @@ -1,23 +0,0 @@ - - - - Taille : - Dernière publication : - Rechercher - Rechercher sur le site avec - Index: lucene/site/src/documentation/skins/common/translations/CommonMessages_es.xml =================================================================== --- lucene/site/src/documentation/skins/common/translations/CommonMessages_es.xml (revision 1328746) +++ lucene/site/src/documentation/skins/common/translations/CommonMessages_es.xml (working copy) @@ -1,23 +0,0 @@ - - - - Tamaño del texto: - Fecha de publicación: - Buscar - Buscar en - Index: lucene/site/src/documentation/skins/common/translations/CommonMessages_de.xml =================================================================== --- lucene/site/src/documentation/skins/common/translations/CommonMessages_de.xml (revision 1328746) +++ lucene/site/src/documentation/skins/common/translations/CommonMessages_de.xml (working copy) @@ -1,23 +0,0 @@ - - - - Schriftgrösse: - Zuletzt veröffentlicht: - Suche: - Suche auf der Seite mit - Index: lucene/site/src/documentation/skins/common/translations/CommonMessages_en_US.xml =================================================================== --- lucene/site/src/documentation/skins/common/translations/CommonMessages_en_US.xml (revision 1328746) +++ lucene/site/src/documentation/skins/common/translations/CommonMessages_en_US.xml (working copy) @@ -1,23 +0,0 @@ - - - - Font size: - Last Published: - Search - Search site with - Index: lucene/site/src/documentation/skins/common/translations/CommonMessages_de.xml =================================================================== --- lucene/site/src/documentation/skins/common/translations/CommonMessages_de.xml (revision 1328746) +++ lucene/site/src/documentation/skins/common/translations/CommonMessages_de.xml (working copy) @@ -1,23 +0,0 @@ - - - - Schriftgrösse: - Zuletzt veröffentlicht: - Suche: - Suche auf der Seite mit - Index: lucene/site/src/documentation/skins/common/translations/CommonMessages_en_US.xml =================================================================== --- lucene/site/src/documentation/skins/common/translations/CommonMessages_en_US.xml (revision 1328746) +++ lucene/site/src/documentation/skins/common/translations/CommonMessages_en_US.xml (working copy) @@ -1,23 +0,0 @@ - - - - Font size: - Last Published: - Search - Search site with - Index: lucene/site/src/documentation/skins/common/translations/CommonMessages_es.xml =================================================================== --- lucene/site/src/documentation/skins/common/translations/CommonMessages_es.xml (revision 1328746) +++ lucene/site/src/documentation/skins/common/translations/CommonMessages_es.xml (working copy) @@ -1,23 +0,0 @@ - - - - Tamaño del texto: - Fecha de publicación: - Buscar - Buscar en - Index: lucene/site/src/documentation/skins/common/translations/CommonMessages_fr.xml =================================================================== --- lucene/site/src/documentation/skins/common/translations/CommonMessages_fr.xml (revision 1328746) +++ lucene/site/src/documentation/skins/common/translations/CommonMessages_fr.xml (working copy) @@ -1,23 +0,0 @@ - - - - Taille : - Dernière publication : - Rechercher - Rechercher sur le site avec - Index: lucene/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl (working copy) @@ -1,70 +0,0 @@ - - - - - - - - - - - - -Copyright © -   - All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/fo/document-to-fo.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/fo/document-to-fo.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/fo/document-to-fo.xsl (working copy) @@ -1,1014 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 841mm - 594mm - 420mm - 297mm - 210mm - 148mm - 7.25in - 8.5in - 11in - 8.5in - 8.5in - 8.5in - 11in - 8.5in - - - - - 1189mm - 841mm - 594mm - 420mm - 297mm - 210mm - 10.5in - 13in - 17in - 14in - 10.83in - 17in - 11in - - - - - - - - - - 1189mm - 841mm - 594mm - 420mm - 297mm - 210mm - 10.5in - 13in - 17in - 14in - 10.83in - 17in - 11in - - - - - 841mm - 594mm - 420mm - 297mm - 210mm - 148mm - 7.25in - 8.5in - 11in - 8.5in - 8.5in - 8.5in - 11in - 8.5in - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - start - - - - - - - - - - - - - - - end - - - - - - - - - - - - - - start - - - - - - - - - - - - - - - - - - - - - - - - - NOTICE: - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - -. - - - - - -pt - - - - - - -   - - - - - - - - - - - - 0 - - - - - - - - - - - by - - - , - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6pt" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6pt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Warning: - - - - - - - - - - - - - - - - - Note: - - - - - - - - - - - - - FIXME (): - - - - - - - - - - - - - - - - - - - () - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - in - - - - - - - - - - - - - - - - - - - - Table - - -: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Table of contents - - - - page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] - - - - - - - - - - - - page - - - - page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl (working copy) @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/fo/document-to-fo.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/fo/document-to-fo.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/fo/document-to-fo.xsl (working copy) @@ -1,1014 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 841mm - 594mm - 420mm - 297mm - 210mm - 148mm - 7.25in - 8.5in - 11in - 8.5in - 8.5in - 8.5in - 11in - 8.5in - - - - - 1189mm - 841mm - 594mm - 420mm - 297mm - 210mm - 10.5in - 13in - 17in - 14in - 10.83in - 17in - 11in - - - - - - - - - - 1189mm - 841mm - 594mm - 420mm - 297mm - 210mm - 10.5in - 13in - 17in - 14in - 10.83in - 17in - 11in - - - - - 841mm - 594mm - 420mm - 297mm - 210mm - 148mm - 7.25in - 8.5in - 11in - 8.5in - 8.5in - 8.5in - 11in - 8.5in - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - start - - - - - - - - - - - - - - - end - - - - - - - - - - - - - - start - - - - - - - - - - - - - - - - - - - - - - - - - NOTICE: - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - -. - - - - - -pt - - - - - - -   - - - - - - - - - - - - 0 - - - - - - - - - - - by - - - , - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6pt" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6pt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Warning: - - - - - - - - - - - - - - - - - Note: - - - - - - - - - - - - - FIXME (): - - - - - - - - - - - - - - - - - - - () - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - in - - - - - - - - - - - - - - - - - - - - Table - - -: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Table of contents - - - - page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] - - - - - - - - - - - - page - - - - page - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/fo/footerinfo.xsl (working copy) @@ -1,70 +0,0 @@ - - - - - - - - - - - - -Copyright © -   - All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/fo/pdfoutline.xsl (working copy) @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/split.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/split.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/split.xsl (working copy) @@ -1,124 +0,0 @@ - - - - - - - - - 40 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl (working copy) @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - -
  • -
    - - - - - -
    Index: lucene/site/src/documentation/skins/common/xslt/html/pathutils.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/pathutils.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/pathutils.xsl (working copy) @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl (working copy) @@ -1,388 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - > - - - - - - - - - - - - - - - - - - - - - - - - Valid HTML 4.01! - - - - - - - Valid HTML 4.01! - Valid CSS! - - - - - - - PDF -
    - PDF
    - -
    -
    - - - - - TXT -
    - TXT
    - -
    -
    - - - - - POD -
    - POD
    - -
    -
    - - - - - XML -
    - XML
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
    • - - - - - -
    • -
      -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - -
    -
    - - - - - - - - - - 2005 - yyyy - - - - - - - - - - - - - - -
    Index: lucene/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl (working copy) @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/renderlogo.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/renderlogo.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/renderlogo.xsl (working copy) @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - {$name} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/dotdots.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/dotdots.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/dotdots.xsl (working copy) @@ -1,73 +0,0 @@ - - - - - - - - - - -../ - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/document-to-html.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/document-to-html.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/document-to-html.xsl (working copy) @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - -

    - -

    -
    -
    - -

    - -

    -
    - - - - -
    - - -; - - -
    -
    -
    - -
    - - - - - - - - - - - - - - - - ^ - - - - - - - -15 - - -0 - - - -
    - -
    - - - -
    - - - - - -
    - - - - - - Note - Warning - Fixme () - -
    -
    - -
    -
    -
    - -
    - -Notice: - -
    -
    - - - - _top - - - _blank - - - - - - - - - - - - - - -
    - - -
    -
    - - -
    -
    -      
    -      
    -
    -    
    -
    - - - - - - - - - - - - - - codefrag - - - - - - - -
    - - - - -
    -
    - - - - - - - - -
    -
    - - - - - - - -
    - -
    - - - - - - - - - by - , - - - - - - - - - - - - - - version - - - - - - - - - v - - - - - - - - -

    - -Type: - -

    -
    - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/tabutils.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/tabutils.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/tabutils.xsl (working copy) @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -/ - - - -/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl (working copy) @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - | - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Index: lucene/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/book-to-menu.xsl (working copy) @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - -
  • -
    - - - - - -
    Index: lucene/site/src/documentation/skins/common/xslt/html/document-to-html.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/document-to-html.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/document-to-html.xsl (working copy) @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - -

    - -

    -
    -
    - -

    - -

    -
    - - - - -
    - - -; - - -
    -
    -
    - -
    - - - - - - - - - - - - - - - - ^ - - - - - - - -15 - - -0 - - - -
    - -
    - - - -
    - - - - - -
    - - - - - - Note - Warning - Fixme () - -
    -
    - -
    -
    -
    - -
    - -Notice: - -
    -
    - - - - _top - - - _blank - - - - - - - - - - - - - - -
    - - -
    -
    - - -
    -
    -      
    -      
    -
    -    
    -
    - - - - - - - - - - - - - - codefrag - - - - - - - -
    - - - - -
    -
    - - - - - - - - -
    -
    - - - - - - - -
    - -
    - - - - - - - - - by - , - - - - - - - - - - - - - - version - - - - - - - - - v - - - - - - - - -

    - -Type: - -

    -
    - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/dotdots.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/dotdots.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/dotdots.xsl (working copy) @@ -1,73 +0,0 @@ - - - - - - - - - - -../ - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/pathutils.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/pathutils.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/pathutils.xsl (working copy) @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/renderlogo.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/renderlogo.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/renderlogo.xsl (working copy) @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - {$name} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/site-to-xhtml.xsl (working copy) @@ -1,388 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - > - - - - - - - - - - - - - - - - - - - - - - - - Valid HTML 4.01! - - - - - - - Valid HTML 4.01! - Valid CSS! - - - - - - - PDF -
    - PDF
    - -
    -
    - - - - - TXT -
    - TXT
    - -
    -
    - - - - - POD -
    - POD
    - -
    -
    - - - - - XML -
    - XML
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
    • - - - - - -
    • -
      -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - -
    -
    - - - - - - - - - - 2005 - yyyy - - - - - - - - - - - - - - -
    Index: lucene/site/src/documentation/skins/common/xslt/html/split.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/split.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/split.xsl (working copy) @@ -1,124 +0,0 @@ - - - - - - - - - 40 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/strip_namespaces.xsl (working copy) @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/tab-to-menu.xsl (working copy) @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - | - - - - - - - - | - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Index: lucene/site/src/documentation/skins/common/xslt/html/tabutils.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/html/tabutils.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/html/tabutils.xsl (working copy) @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -/ - - - -/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl (working copy) @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl =================================================================== --- lucene/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/common/xslt/svg/document-to-svg.xsl (working copy) @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/lucene/skinconf.xsl =================================================================== --- lucene/site/src/documentation/skins/lucene/skinconf.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/skinconf.xsl (working copy) @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/lucene/note.txt =================================================================== --- lucene/site/src/documentation/skins/lucene/note.txt (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/note.txt (working copy) @@ -1,50 +0,0 @@ -Notes for developer: - ---Legend------------------- -TODO -> blocker -DONE -> blocker -ToDo -> enhancement bug -done -> enhancement bug - ---Issues------------------- -- the corner images should be rendered through svg with the header color. --> DONE --> ToDo: get rid of the images and use only divs! - -- the menu points should be displayed "better". --> DONE --- Use the krysalis-site menu approach for the overall menu display. --> DONE --- Use the old lenya innermenu approch to further enhance the menu . --> DONE - -- the content area needs some attention. --> DONE --- introduce the heading scheme from krysalis () --> DONE --> ToDo: make box with round corners --> done: make underlined with variable border height --> ToDo: make underline with bottom round corner --- introduce the toc for each html-page --> DONE --- introduce the external-link-images. --> DONE - -- the publish note should be where now only a border is. -Like
    --> DONE -, but make it configurable. --> DONE -- footer needs some attention --> DONE --- the footer do not have the color profile! Enable it! --> DONE --- the footer should as well contain a feedback link. -See http://issues.apache.org/eyebrowse/ReadMsg?listName=forrest-user@xml.apache.org&msgNo=71 --> DONE - -- introduce credits alternativ location --> DONE - -- border for published / breadtrail / menu /tab divs --> ToDo \ No newline at end of file Index: lucene/site/src/documentation/skins/lucene/css/profile.css.xslt =================================================================== --- lucene/site/src/documentation/skins/lucene/css/profile.css.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/css/profile.css.xslt (working copy) @@ -1,182 +0,0 @@ - - - - - - - - -#top { background-color: ;} - - -#top .header .current { background-color: ;} -#top .header .current a:link { color: ; } -#top .header .current a:visited { color: ; } -#top .header .current a:hover { color: ; } - - -#tabs li { background-color: ;} -#tabs li a:link { color: ; } -#tabs li a:visited { color: ; } -#tabs li a:hover { color: ; } - - -#level2tabs a.selected { background-color: ;} -#level2tabs a:link { color: ; } -#level2tabs a:visited { color: ; } -#level2tabs a:hover { color: ; } - - -#level2tabs { background-color: ;} -#level2tabs a.unselected:link { color: ; } -#level2tabs a.unselected:visited { color: ; } -#level2tabs a.unselected:hover { color: ; } - - -.heading { background-color: ;} - - -.boxed { background-color: ;} -.underlined_5 {border-bottom: solid 5px ;} -.underlined_10 {border-bottom: solid 10px ;} -table caption { -background-color: ; -color: ; -} - - -#feedback { -color: ; -background: ; -text-align: ; -} -#feedback #feedbackto { -color: ; -} - - -#main .breadtrail { -background: ; -color: ; -} -#main .breadtrail a:link { color: ; } -#main .breadtrail a:visited { color: ; } -#main .breadtrail a:hover { color: ; } -#top .breadtrail { -background: ; -color: ; -} -#top .breadtrail a:link { color: ; } -#top .breadtrail a:visited { color: ; } -#top .breadtrail a:hover { color: ; } - - - -#publishedStrip { -color: ; -background: ; -} - - - -#publishedStrip { -color: ; -background: ; -} - - -#menu .menupagetitle { background-color: ; - color: ;} - - -#menu { border-color: ;} -#menu .menupagetitle { border-color: ;} -#menu .menupageitemgroup { border-color: ;} - - -#menu { background-color: ;} -#menu { color: ;} -#menu a:link { color: ;} -#menu a:visited { color: ;} -#menu a:hover { -background-color: ; -color: ;} - - -#menu .menupageitemgroup { -background-color: ; -} -#menu .menupageitem { -color: ; -} -#menu .menupageitem a:link { color: ;} -#menu .menupageitem a:visited { color: ;} -#menu .menupageitem a:hover { -background-color: ; -color: ; -} - - -#menu h1 { -color: ; -background-color: ; -} - - -#top .searchbox { -background-color: ; -color: ; -} - - -body{ -background-color: ; -color: ; -} -a:link { color:} -a:visited { color:} -a:hover { color:} - - - -#footer { background-color: ;} - - - -.highlight { background-color: ;} - - -.fixme { border-color: ;} - - -.note { border-color: ;} - - -.warning { border-color: ;} - - -.code { border-color: ;} - - -.ForrestTable { background-color: ;} - - -.ForrestTable td { background-color: ;} - - Index: lucene/site/src/documentation/skins/lucene/css/print.css =================================================================== --- lucene/site/src/documentation/skins/lucene/css/print.css (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/css/print.css (working copy) @@ -1,54 +0,0 @@ -/* -* 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. -*/ -body { - font-family: Georgia, Palatino, serif; - font-size: 12pt; - background: white; -} - -#tabs, -#menu, -#content .toc { - display: none; -} - -#content { - width: auto; - padding: 0; - float: none !important; - color: black; - background: inherit; -} - -a:link, a:visited { - color: #336699; - background: inherit; - text-decoration: underline; -} - -#top .logo { - padding: 0; - margin: 0 0 2em 0; -} - -#footer { - margin-top: 4em; -} - -acronym { - border: 0; -} Index: lucene/site/src/documentation/skins/lucene/css/screen.css =================================================================== --- lucene/site/src/documentation/skins/lucene/css/screen.css (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/css/screen.css (working copy) @@ -1,587 +0,0 @@ -/* -* 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. -*/ -body { margin: 0px 0px 0px 0px; font-family: Verdana, Helvetica, sans-serif; } - -h1 { font-size : 160%; margin: 0px 0px 0px 0px; padding: 0px; } -h2 { font-size : 140%; margin: 1em 0px 0.8em 0px; padding: 0px; font-weight : bold;} -h3 { font-size : 130%; margin: 0.8em 0px 0px 0px; padding: 0px; font-weight : bold; } -.h3 { margin: 22px 0px 3px 0px; } -h4 { font-size : 120%; margin: 0.7em 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } -.h4 { margin: 18px 0px 0px 0px; } -h4.faq { font-size : 120%; margin: 18px 0px 0px 0px; padding: 0px; font-weight : bold; text-align: left; } -h5 { font-size : 100%; margin: 14px 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } - -/** -* table -*/ -table .title { background-color: #000000; } -.ForrestTable { - color: #ffffff; - background-color: #7099C5; - width: 100%; - font-size : 100%; - empty-cells: show; -} -table caption { - padding-left: 5px; - color: white; - text-align: left; - font-weight: bold; - background-color: #000000; -} -.ForrestTable td { - color: black; - background-color: #f0f0ff; -} -.ForrestTable th { text-align: center; } -/** - * Page Header - */ - -#top { - position: relative; - float: left; - width: 100%; - background: #294563; /* if you want a background in the header, put it here */ -} - -#top .breadtrail { - background: #CFDCED; - color: black; - border-bottom: solid 1px white; - padding: 3px 10px; - font-size: 75%; -} -#top .breadtrail a { color: black; } - -#top .header { - float: left; - width: 100%; - background: url("images/header_white_line.gif") repeat-x bottom; -} - -#top .grouplogo { - padding: 7px 0 10px 10px; - float: left; - text-align: left; -} -#top .projectlogo { - padding: 7px 0 10px 10px; - float: left; - width: 33%; - text-align: right; -} -#top .projectlogoA1 { - padding: 7px 0 10px 10px; - float: right; -} -html>body #top .searchbox { - bottom: 0px; -} -#top .searchbox { - position: absolute; - right: 10px; - height: 42px; - font-size: 70%; - white-space: nowrap; - text-align: right; - color: white; - background-color: #000000; - z-index:0; - background-image: url(images/rc-t-l-5-1header-2searchbox-3searchbox.png); - background-repeat: no-repeat; - background-position: top left; - bottom: -1px; /* compensate for IE rendering issue */ -} - -#top .searchbox form { - padding: 5px 10px; - margin: 0; -} -#top .searchbox p { - padding: 0 0 2px 0; - margin: 0; -} -#top .searchbox input { - font-size: 100%; -} - -#tabs { - clear: both; - padding-left: 10px; - margin: 0; - list-style: none; -} -/* background: #CFDCED url("images/tab-right.gif") no-repeat right top;*/ -#tabs li { - float: left; - background-image: url(images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png); - background-repeat: no-repeat; - background-position: top right; - background-color: #000000; - margin: 0 3px 0 0; - padding: 0; -} - -/*background: url("images/tab-left.gif") no-repeat left top;*/ -#tabs li a { - float: left; - display: block; - font-family: verdana, arial, sans-serif; - text-decoration: none; - color: black; - white-space: nowrap; - background-image: url(images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png); - background-repeat: no-repeat; - background-position: top left; - padding: 5px 15px 4px; - width: .1em; /* IE/Win fix */ -} - -#tabs li a:hover { - - cursor: pointer; - text-decoration:underline; -} - -#tabs > li a { width: auto; } /* Rest of IE/Win fix */ - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -#tabs a { float: none; } -/* End IE5-Mac hack */ - -#top .header .current { - background-color: #4C6C8F; - background-image: url(images/rc-t-r-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top right; -} -#top .header .current a { - font-weight: bold; - padding-bottom: 5px; - color: white; - background-image: url(images/rc-t-l-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top left; -} -#publishedStrip { - padding-right: 10px; - padding-left: 20px; - padding-top: 3px; - padding-bottom:3px; - color: #ffffff; - font-size : 60%; - font-weight: bold; - background-color: #4C6C8F; - text-align:right; -} - -#level2tabs { -margin: 0; -float:left; -position:relative; - -} - - - -#level2tabs a:hover { - - cursor: pointer; - text-decoration:underline; - -} - -#level2tabs a{ - - cursor: pointer; - text-decoration:none; - background-image: url('images/chapter.gif'); - background-repeat: no-repeat; - background-position: center left; - padding-left: 6px; - margin-left: 6px; -} - -/* -* border-top: solid #4C6C8F 15px; -*/ -#main { - position: relative; - background: white; - clear:both; -} -#main .breadtrail { - clear:both; - position: relative; - background: #CFDCED; - color: black; - border-bottom: solid 1px black; - border-top: solid 1px black; - padding: 0px 180px; - font-size: 75%; - z-index:10; -} -/** -* Round corner -*/ -#roundtop { - background-image: url(images/rc-t-r-15-1body-2menu-3menu.png); - background-repeat: no-repeat; - background-position: top right; -} - -#roundbottom { - background-image: url(images/rc-b-r-15-1body-2menu-3menu.png); - background-repeat: no-repeat; - background-position: top right; -} - -img.corner { - width: 15px; - height: 15px; - border: none; - display: block !important; -} - -.roundtopsmall { - background-image: url(images/rc-t-r-5-1header-2searchbox-3searchbox.png); - background-repeat: no-repeat; - background-position: top right; -} - -#roundbottomsmall { - background-image: url(images/rc-b-r-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top right; -} - -img.cornersmall { - width: 5px; - height: 5px; - border: none; - display: block !important; -} -/** - * Side menu - */ -#menu a { font-weight: normal; text-decoration: none;} -#menu a:visited { font-weight: normal; } -#menu a:active { font-weight: normal; } -#menu a:hover { font-weight: normal; text-decoration:underline;} - -#menuarea { width:10em;} -#menu { - position: relative; - float: left; - width: 160px; - padding-top: 0px; - top:-18px; - left:10px; - z-index: 20; - background-color: #f90; - font-size : 70%; - -} - -.menutitle { - cursor:pointer; - padding: 3px 12px; - margin-left: 10px; - background-image: url('images/chapter.gif'); - background-repeat: no-repeat; - background-position: center left; - font-weight : bold; - - -} - -.menutitle:hover{text-decoration:underline;cursor: pointer;} - -#menu .menuitemgroup { - margin: 0px 0px 6px 8px; - padding: 0px; - font-weight : bold; } - -#menu .selectedmenuitemgroup{ - margin: 0px 0px 0px 8px; - padding: 0px; - font-weight : normal; - - } - -#menu .menuitem { - padding: 2px 0px 1px 13px; - background-image: url('images/page.gif'); - background-repeat: no-repeat; - background-position: center left; - font-weight : normal; - margin-left: 10px; -} - -#menu .menupage { - margin: 2px 0px 1px 10px; - padding: 0px 3px 0px 12px; - background-image: url('images/page.gif'); - background-repeat: no-repeat; - background-position: center left; - font-style : normal; -} -#menu .menupagetitle { - padding: 0px 0px 0px 1px; - font-style : normal; - border-style: solid; - border-width: 1px; - margin-right: 10px; - -} -#menu .menupageitemgroup { - padding: 3px 0px 4px 6px; - font-style : normal; - border-bottom: 1px solid ; - border-left: 1px solid ; - border-right: 1px solid ; - margin-right: 10px; -} -#menu .menupageitem { - font-style : normal; - font-weight : normal; - border-width: 0px; - font-size : 90%; -} -#menu #credit { - text-align: center; -} -#menu #credit2 { - text-align: center; - padding: 3px 3px 3px 3px; - background-color: #ffffff; -} -#menu .searchbox { - text-align: center; -} -#menu .searchbox form { - padding: 3px 3px; - margin: 0; -} -#menu .searchbox input { - font-size: 100%; -} - -#content { - padding: 20px 20px 20px 180px; - margin: 0; - font : small Verdana, Helvetica, sans-serif; - font-size : 80%; -} - -#content ul { - margin: 0; - padding: 0 25px; -} -#content li { - padding: 0 5px; -} -#feedback { - color: black; - background: #CFDCED; - text-align:center; - margin-top: 5px; -} -#feedback #feedbackto { - font-size: 90%; - color: black; -} -#footer { - clear: both; - position: relative; /* IE bugfix (http://www.dracos.co.uk/web/css/ie6floatbug/) */ - width: 100%; - background: #CFDCED; - border-top: solid 1px #4C6C8F; - color: black; -} -#footer .copyright { - position: relative; /* IE bugfix cont'd */ - padding: 5px; - margin: 0; - width: 45%; -} -#footer .lastmodified { - position: relative; /* IE bugfix cont'd */ - float: right; - width: 45%; - padding: 5px; - margin: 0; - text-align: right; -} -#footer a { color: white; } - -#footer #logos { - text-align: left; -} - - -/** - * Misc Styles - */ - -acronym { cursor: help; } -.boxed { background-color: #a5b6c6;} -.underlined_5 {border-bottom: solid 5px #4C6C8F;} -.underlined_10 {border-bottom: solid 10px #4C6C8F;} -/* ==================== snail trail ============================ */ - -.trail { - position: relative; /* IE bugfix cont'd */ - font-size: 70%; - text-align: right; - float: right; - margin: -10px 5px 0px 5px; - padding: 0; -} - -#motd-area { - position: relative; /* IE bugfix cont'd */ - float: right; - width: 35%; - background-color: #f0f0ff; - border-top: solid 1px #4C6C8F; - border-bottom: solid 1px #4C6C8F; - margin-bottom: 15px; - margin-left: 15px; - margin-right: 10%; - padding-bottom: 5px; - padding-top: 5px; -} - -#minitoc-area { - border-top: solid 1px #4C6C8F; - border-bottom: solid 1px #4C6C8F; - margin: 15px 10% 5px 15px; - /* margin-bottom: 15px; - margin-left: 15px; - margin-right: 10%;*/ - padding-bottom: 7px; - padding-top: 5px; -} -.minitoc { - list-style-image: url('images/current.gif'); - font-weight: normal; -} - -li p { - margin: 0; - padding: 0; -} - -.pdflink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.pdflink br { - margin-top: -10px; - padding-left: 1px; -} -.pdflink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.pdflink img { - display: block; - height: 16px; - width: 16px; -} -.xmllink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.xmllink br { - margin-top: -10px; - padding-left: 1px; -} -.xmllink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.xmllink img { - display: block; - height: 16px; - width: 16px; -} -.podlink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.podlink br { - margin-top: -10px; - padding-left: 1px; -} -.podlink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.podlink img { - display: block; - height: 16px; - width: 16px; -} - -.printlink { - position: relative; /* IE bugfix cont'd */ - float: right; -} -.printlink br { - margin-top: -10px; - padding-left: 1px; -} -.printlink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} -.printlink img { - display: block; - height: 16px; - width: 16px; -} - -p.instruction { - display: list-item; - list-style-image: url('../images/instruction_arrow.png'); - list-style-position: outside; - margin-left: 2em; -} Index: lucene/site/src/documentation/skins/lucene/css/basic.css =================================================================== --- lucene/site/src/documentation/skins/lucene/css/basic.css (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/css/basic.css (working copy) @@ -1,166 +0,0 @@ -/* -* 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. -*/ -/** - * General - */ - -img { border: 0; } - -#content table { - border: 0; - width: 100%; -} -/*Hack to get IE to render the table at 100%*/ -* html #content table { margin-left: -3px; } - -#content th, -#content td { - margin: 0; - padding: 0; - vertical-align: top; -} - -.clearboth { - clear: both; -} - -.note, .warning, .fixme { - border: solid black 1px; - margin: 1em 3em; -} - -.note .label { - background: #369; - color: white; - font-weight: bold; - padding: 5px 10px; -} -.note .content { - background: #F0F0FF; - color: black; - line-height: 120%; - font-size: 90%; - padding: 5px 10px; -} -.warning .label { - background: #C00; - color: white; - font-weight: bold; - padding: 5px 10px; -} -.warning .content { - background: #FFF0F0; - color: black; - line-height: 120%; - font-size: 90%; - padding: 5px 10px; -} -.fixme .label { - background: #C6C600; - color: black; - font-weight: bold; - padding: 5px 10px; -} -.fixme .content { - padding: 5px 10px; -} - -/** - * Typography - */ - -body { - font-family: verdana, "Trebuchet MS", arial, helvetica, sans-serif; - font-size: 100%; -} - -#content { - font-family: Georgia, Palatino, Times, serif; - font-size: 95%; -} -#tabs { - font-size: 70%; -} -#menu { - font-size: 80%; -} -#footer { - font-size: 70%; -} - -h1, h2, h3, h4, h5, h6 { - font-family: "Trebuchet MS", verdana, arial, helvetica, sans-serif; - font-weight: bold; - margin-top: 1em; - margin-bottom: .5em; -} - -h1 { - margin-top: 0; - margin-bottom: 1em; - font-size: 1.4em; -} -#content h1 { - font-size: 160%; - margin-bottom: .5em; -} -#menu h1 { - margin: 0; - padding: 10px; - background: #336699; - color: white; -} -h2 { font-size: 120%; } -h3 { font-size: 100%; } -h4 { font-size: 90%; } -h5 { font-size: 80%; } -h6 { font-size: 75%; } - -p { - line-height: 120%; - text-align: left; - margin-top: .5em; - margin-bottom: 1em; -} - -#content li, -#content th, -#content td, -#content li ul, -#content li ol{ - margin-top: .5em; - margin-bottom: .5em; -} - - -#content li li, -#minitoc-area li{ - margin-top: 0em; - margin-bottom: 0em; -} - -#content .attribution { - text-align: right; - font-style: italic; - font-size: 85%; - margin-top: 1em; -} - -.codefrag { - font-family: "Courier New", Courier, monospace; - font-size: 110%; -} Index: lucene/site/src/documentation/skins/lucene/css/basic.css =================================================================== --- lucene/site/src/documentation/skins/lucene/css/basic.css (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/css/basic.css (working copy) @@ -1,166 +0,0 @@ -/* -* 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. -*/ -/** - * General - */ - -img { border: 0; } - -#content table { - border: 0; - width: 100%; -} -/*Hack to get IE to render the table at 100%*/ -* html #content table { margin-left: -3px; } - -#content th, -#content td { - margin: 0; - padding: 0; - vertical-align: top; -} - -.clearboth { - clear: both; -} - -.note, .warning, .fixme { - border: solid black 1px; - margin: 1em 3em; -} - -.note .label { - background: #369; - color: white; - font-weight: bold; - padding: 5px 10px; -} -.note .content { - background: #F0F0FF; - color: black; - line-height: 120%; - font-size: 90%; - padding: 5px 10px; -} -.warning .label { - background: #C00; - color: white; - font-weight: bold; - padding: 5px 10px; -} -.warning .content { - background: #FFF0F0; - color: black; - line-height: 120%; - font-size: 90%; - padding: 5px 10px; -} -.fixme .label { - background: #C6C600; - color: black; - font-weight: bold; - padding: 5px 10px; -} -.fixme .content { - padding: 5px 10px; -} - -/** - * Typography - */ - -body { - font-family: verdana, "Trebuchet MS", arial, helvetica, sans-serif; - font-size: 100%; -} - -#content { - font-family: Georgia, Palatino, Times, serif; - font-size: 95%; -} -#tabs { - font-size: 70%; -} -#menu { - font-size: 80%; -} -#footer { - font-size: 70%; -} - -h1, h2, h3, h4, h5, h6 { - font-family: "Trebuchet MS", verdana, arial, helvetica, sans-serif; - font-weight: bold; - margin-top: 1em; - margin-bottom: .5em; -} - -h1 { - margin-top: 0; - margin-bottom: 1em; - font-size: 1.4em; -} -#content h1 { - font-size: 160%; - margin-bottom: .5em; -} -#menu h1 { - margin: 0; - padding: 10px; - background: #336699; - color: white; -} -h2 { font-size: 120%; } -h3 { font-size: 100%; } -h4 { font-size: 90%; } -h5 { font-size: 80%; } -h6 { font-size: 75%; } - -p { - line-height: 120%; - text-align: left; - margin-top: .5em; - margin-bottom: 1em; -} - -#content li, -#content th, -#content td, -#content li ul, -#content li ol{ - margin-top: .5em; - margin-bottom: .5em; -} - - -#content li li, -#minitoc-area li{ - margin-top: 0em; - margin-bottom: 0em; -} - -#content .attribution { - text-align: right; - font-style: italic; - font-size: 85%; - margin-top: 1em; -} - -.codefrag { - font-family: "Courier New", Courier, monospace; - font-size: 110%; -} Index: lucene/site/src/documentation/skins/lucene/css/print.css =================================================================== --- lucene/site/src/documentation/skins/lucene/css/print.css (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/css/print.css (working copy) @@ -1,54 +0,0 @@ -/* -* 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. -*/ -body { - font-family: Georgia, Palatino, serif; - font-size: 12pt; - background: white; -} - -#tabs, -#menu, -#content .toc { - display: none; -} - -#content { - width: auto; - padding: 0; - float: none !important; - color: black; - background: inherit; -} - -a:link, a:visited { - color: #336699; - background: inherit; - text-decoration: underline; -} - -#top .logo { - padding: 0; - margin: 0 0 2em 0; -} - -#footer { - margin-top: 4em; -} - -acronym { - border: 0; -} Index: lucene/site/src/documentation/skins/lucene/css/profile.css.xslt =================================================================== --- lucene/site/src/documentation/skins/lucene/css/profile.css.xslt (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/css/profile.css.xslt (working copy) @@ -1,182 +0,0 @@ - - - - - - - - -#top { background-color: ;} - - -#top .header .current { background-color: ;} -#top .header .current a:link { color: ; } -#top .header .current a:visited { color: ; } -#top .header .current a:hover { color: ; } - - -#tabs li { background-color: ;} -#tabs li a:link { color: ; } -#tabs li a:visited { color: ; } -#tabs li a:hover { color: ; } - - -#level2tabs a.selected { background-color: ;} -#level2tabs a:link { color: ; } -#level2tabs a:visited { color: ; } -#level2tabs a:hover { color: ; } - - -#level2tabs { background-color: ;} -#level2tabs a.unselected:link { color: ; } -#level2tabs a.unselected:visited { color: ; } -#level2tabs a.unselected:hover { color: ; } - - -.heading { background-color: ;} - - -.boxed { background-color: ;} -.underlined_5 {border-bottom: solid 5px ;} -.underlined_10 {border-bottom: solid 10px ;} -table caption { -background-color: ; -color: ; -} - - -#feedback { -color: ; -background: ; -text-align: ; -} -#feedback #feedbackto { -color: ; -} - - -#main .breadtrail { -background: ; -color: ; -} -#main .breadtrail a:link { color: ; } -#main .breadtrail a:visited { color: ; } -#main .breadtrail a:hover { color: ; } -#top .breadtrail { -background: ; -color: ; -} -#top .breadtrail a:link { color: ; } -#top .breadtrail a:visited { color: ; } -#top .breadtrail a:hover { color: ; } - - - -#publishedStrip { -color: ; -background: ; -} - - - -#publishedStrip { -color: ; -background: ; -} - - -#menu .menupagetitle { background-color: ; - color: ;} - - -#menu { border-color: ;} -#menu .menupagetitle { border-color: ;} -#menu .menupageitemgroup { border-color: ;} - - -#menu { background-color: ;} -#menu { color: ;} -#menu a:link { color: ;} -#menu a:visited { color: ;} -#menu a:hover { -background-color: ; -color: ;} - - -#menu .menupageitemgroup { -background-color: ; -} -#menu .menupageitem { -color: ; -} -#menu .menupageitem a:link { color: ;} -#menu .menupageitem a:visited { color: ;} -#menu .menupageitem a:hover { -background-color: ; -color: ; -} - - -#menu h1 { -color: ; -background-color: ; -} - - -#top .searchbox { -background-color: ; -color: ; -} - - -body{ -background-color: ; -color: ; -} -a:link { color:} -a:visited { color:} -a:hover { color:} - - - -#footer { background-color: ;} - - - -.highlight { background-color: ;} - - -.fixme { border-color: ;} - - -.note { border-color: ;} - - -.warning { border-color: ;} - - -.code { border-color: ;} - - -.ForrestTable { background-color: ;} - - -.ForrestTable td { background-color: ;} - - Index: lucene/site/src/documentation/skins/lucene/css/screen.css =================================================================== --- lucene/site/src/documentation/skins/lucene/css/screen.css (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/css/screen.css (working copy) @@ -1,587 +0,0 @@ -/* -* 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. -*/ -body { margin: 0px 0px 0px 0px; font-family: Verdana, Helvetica, sans-serif; } - -h1 { font-size : 160%; margin: 0px 0px 0px 0px; padding: 0px; } -h2 { font-size : 140%; margin: 1em 0px 0.8em 0px; padding: 0px; font-weight : bold;} -h3 { font-size : 130%; margin: 0.8em 0px 0px 0px; padding: 0px; font-weight : bold; } -.h3 { margin: 22px 0px 3px 0px; } -h4 { font-size : 120%; margin: 0.7em 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } -.h4 { margin: 18px 0px 0px 0px; } -h4.faq { font-size : 120%; margin: 18px 0px 0px 0px; padding: 0px; font-weight : bold; text-align: left; } -h5 { font-size : 100%; margin: 14px 0px 0px 0px; padding: 0px; font-weight : normal; text-align: left; } - -/** -* table -*/ -table .title { background-color: #000000; } -.ForrestTable { - color: #ffffff; - background-color: #7099C5; - width: 100%; - font-size : 100%; - empty-cells: show; -} -table caption { - padding-left: 5px; - color: white; - text-align: left; - font-weight: bold; - background-color: #000000; -} -.ForrestTable td { - color: black; - background-color: #f0f0ff; -} -.ForrestTable th { text-align: center; } -/** - * Page Header - */ - -#top { - position: relative; - float: left; - width: 100%; - background: #294563; /* if you want a background in the header, put it here */ -} - -#top .breadtrail { - background: #CFDCED; - color: black; - border-bottom: solid 1px white; - padding: 3px 10px; - font-size: 75%; -} -#top .breadtrail a { color: black; } - -#top .header { - float: left; - width: 100%; - background: url("images/header_white_line.gif") repeat-x bottom; -} - -#top .grouplogo { - padding: 7px 0 10px 10px; - float: left; - text-align: left; -} -#top .projectlogo { - padding: 7px 0 10px 10px; - float: left; - width: 33%; - text-align: right; -} -#top .projectlogoA1 { - padding: 7px 0 10px 10px; - float: right; -} -html>body #top .searchbox { - bottom: 0px; -} -#top .searchbox { - position: absolute; - right: 10px; - height: 42px; - font-size: 70%; - white-space: nowrap; - text-align: right; - color: white; - background-color: #000000; - z-index:0; - background-image: url(images/rc-t-l-5-1header-2searchbox-3searchbox.png); - background-repeat: no-repeat; - background-position: top left; - bottom: -1px; /* compensate for IE rendering issue */ -} - -#top .searchbox form { - padding: 5px 10px; - margin: 0; -} -#top .searchbox p { - padding: 0 0 2px 0; - margin: 0; -} -#top .searchbox input { - font-size: 100%; -} - -#tabs { - clear: both; - padding-left: 10px; - margin: 0; - list-style: none; -} -/* background: #CFDCED url("images/tab-right.gif") no-repeat right top;*/ -#tabs li { - float: left; - background-image: url(images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png); - background-repeat: no-repeat; - background-position: top right; - background-color: #000000; - margin: 0 3px 0 0; - padding: 0; -} - -/*background: url("images/tab-left.gif") no-repeat left top;*/ -#tabs li a { - float: left; - display: block; - font-family: verdana, arial, sans-serif; - text-decoration: none; - color: black; - white-space: nowrap; - background-image: url(images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png); - background-repeat: no-repeat; - background-position: top left; - padding: 5px 15px 4px; - width: .1em; /* IE/Win fix */ -} - -#tabs li a:hover { - - cursor: pointer; - text-decoration:underline; -} - -#tabs > li a { width: auto; } /* Rest of IE/Win fix */ - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -#tabs a { float: none; } -/* End IE5-Mac hack */ - -#top .header .current { - background-color: #4C6C8F; - background-image: url(images/rc-t-r-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top right; -} -#top .header .current a { - font-weight: bold; - padding-bottom: 5px; - color: white; - background-image: url(images/rc-t-l-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top left; -} -#publishedStrip { - padding-right: 10px; - padding-left: 20px; - padding-top: 3px; - padding-bottom:3px; - color: #ffffff; - font-size : 60%; - font-weight: bold; - background-color: #4C6C8F; - text-align:right; -} - -#level2tabs { -margin: 0; -float:left; -position:relative; - -} - - - -#level2tabs a:hover { - - cursor: pointer; - text-decoration:underline; - -} - -#level2tabs a{ - - cursor: pointer; - text-decoration:none; - background-image: url('images/chapter.gif'); - background-repeat: no-repeat; - background-position: center left; - padding-left: 6px; - margin-left: 6px; -} - -/* -* border-top: solid #4C6C8F 15px; -*/ -#main { - position: relative; - background: white; - clear:both; -} -#main .breadtrail { - clear:both; - position: relative; - background: #CFDCED; - color: black; - border-bottom: solid 1px black; - border-top: solid 1px black; - padding: 0px 180px; - font-size: 75%; - z-index:10; -} -/** -* Round corner -*/ -#roundtop { - background-image: url(images/rc-t-r-15-1body-2menu-3menu.png); - background-repeat: no-repeat; - background-position: top right; -} - -#roundbottom { - background-image: url(images/rc-b-r-15-1body-2menu-3menu.png); - background-repeat: no-repeat; - background-position: top right; -} - -img.corner { - width: 15px; - height: 15px; - border: none; - display: block !important; -} - -.roundtopsmall { - background-image: url(images/rc-t-r-5-1header-2searchbox-3searchbox.png); - background-repeat: no-repeat; - background-position: top right; -} - -#roundbottomsmall { - background-image: url(images/rc-b-r-5-1header-2tab-selected-3tab-selected.png); - background-repeat: no-repeat; - background-position: top right; -} - -img.cornersmall { - width: 5px; - height: 5px; - border: none; - display: block !important; -} -/** - * Side menu - */ -#menu a { font-weight: normal; text-decoration: none;} -#menu a:visited { font-weight: normal; } -#menu a:active { font-weight: normal; } -#menu a:hover { font-weight: normal; text-decoration:underline;} - -#menuarea { width:10em;} -#menu { - position: relative; - float: left; - width: 160px; - padding-top: 0px; - top:-18px; - left:10px; - z-index: 20; - background-color: #f90; - font-size : 70%; - -} - -.menutitle { - cursor:pointer; - padding: 3px 12px; - margin-left: 10px; - background-image: url('images/chapter.gif'); - background-repeat: no-repeat; - background-position: center left; - font-weight : bold; - - -} - -.menutitle:hover{text-decoration:underline;cursor: pointer;} - -#menu .menuitemgroup { - margin: 0px 0px 6px 8px; - padding: 0px; - font-weight : bold; } - -#menu .selectedmenuitemgroup{ - margin: 0px 0px 0px 8px; - padding: 0px; - font-weight : normal; - - } - -#menu .menuitem { - padding: 2px 0px 1px 13px; - background-image: url('images/page.gif'); - background-repeat: no-repeat; - background-position: center left; - font-weight : normal; - margin-left: 10px; -} - -#menu .menupage { - margin: 2px 0px 1px 10px; - padding: 0px 3px 0px 12px; - background-image: url('images/page.gif'); - background-repeat: no-repeat; - background-position: center left; - font-style : normal; -} -#menu .menupagetitle { - padding: 0px 0px 0px 1px; - font-style : normal; - border-style: solid; - border-width: 1px; - margin-right: 10px; - -} -#menu .menupageitemgroup { - padding: 3px 0px 4px 6px; - font-style : normal; - border-bottom: 1px solid ; - border-left: 1px solid ; - border-right: 1px solid ; - margin-right: 10px; -} -#menu .menupageitem { - font-style : normal; - font-weight : normal; - border-width: 0px; - font-size : 90%; -} -#menu #credit { - text-align: center; -} -#menu #credit2 { - text-align: center; - padding: 3px 3px 3px 3px; - background-color: #ffffff; -} -#menu .searchbox { - text-align: center; -} -#menu .searchbox form { - padding: 3px 3px; - margin: 0; -} -#menu .searchbox input { - font-size: 100%; -} - -#content { - padding: 20px 20px 20px 180px; - margin: 0; - font : small Verdana, Helvetica, sans-serif; - font-size : 80%; -} - -#content ul { - margin: 0; - padding: 0 25px; -} -#content li { - padding: 0 5px; -} -#feedback { - color: black; - background: #CFDCED; - text-align:center; - margin-top: 5px; -} -#feedback #feedbackto { - font-size: 90%; - color: black; -} -#footer { - clear: both; - position: relative; /* IE bugfix (http://www.dracos.co.uk/web/css/ie6floatbug/) */ - width: 100%; - background: #CFDCED; - border-top: solid 1px #4C6C8F; - color: black; -} -#footer .copyright { - position: relative; /* IE bugfix cont'd */ - padding: 5px; - margin: 0; - width: 45%; -} -#footer .lastmodified { - position: relative; /* IE bugfix cont'd */ - float: right; - width: 45%; - padding: 5px; - margin: 0; - text-align: right; -} -#footer a { color: white; } - -#footer #logos { - text-align: left; -} - - -/** - * Misc Styles - */ - -acronym { cursor: help; } -.boxed { background-color: #a5b6c6;} -.underlined_5 {border-bottom: solid 5px #4C6C8F;} -.underlined_10 {border-bottom: solid 10px #4C6C8F;} -/* ==================== snail trail ============================ */ - -.trail { - position: relative; /* IE bugfix cont'd */ - font-size: 70%; - text-align: right; - float: right; - margin: -10px 5px 0px 5px; - padding: 0; -} - -#motd-area { - position: relative; /* IE bugfix cont'd */ - float: right; - width: 35%; - background-color: #f0f0ff; - border-top: solid 1px #4C6C8F; - border-bottom: solid 1px #4C6C8F; - margin-bottom: 15px; - margin-left: 15px; - margin-right: 10%; - padding-bottom: 5px; - padding-top: 5px; -} - -#minitoc-area { - border-top: solid 1px #4C6C8F; - border-bottom: solid 1px #4C6C8F; - margin: 15px 10% 5px 15px; - /* margin-bottom: 15px; - margin-left: 15px; - margin-right: 10%;*/ - padding-bottom: 7px; - padding-top: 5px; -} -.minitoc { - list-style-image: url('images/current.gif'); - font-weight: normal; -} - -li p { - margin: 0; - padding: 0; -} - -.pdflink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.pdflink br { - margin-top: -10px; - padding-left: 1px; -} -.pdflink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.pdflink img { - display: block; - height: 16px; - width: 16px; -} -.xmllink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.xmllink br { - margin-top: -10px; - padding-left: 1px; -} -.xmllink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.xmllink img { - display: block; - height: 16px; - width: 16px; -} -.podlink { - position: relative; /* IE bugfix cont'd */ - float: right; - margin: 0px 5px; - padding: 0; -} -.podlink br { - margin-top: -10px; - padding-left: 1px; -} -.podlink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} - -.podlink img { - display: block; - height: 16px; - width: 16px; -} - -.printlink { - position: relative; /* IE bugfix cont'd */ - float: right; -} -.printlink br { - margin-top: -10px; - padding-left: 1px; -} -.printlink a { - display: block; - font-size: 70%; - text-align: center; - margin: 0; - padding: 0; -} -.printlink img { - display: block; - height: 16px; - width: 16px; -} - -p.instruction { - display: list-item; - list-style-image: url('../images/instruction_arrow.png'); - list-style-position: outside; - margin-left: 2em; -} Index: lucene/site/src/documentation/skins/lucene/note.txt =================================================================== --- lucene/site/src/documentation/skins/lucene/note.txt (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/note.txt (working copy) @@ -1,50 +0,0 @@ -Notes for developer: - ---Legend------------------- -TODO -> blocker -DONE -> blocker -ToDo -> enhancement bug -done -> enhancement bug - ---Issues------------------- -- the corner images should be rendered through svg with the header color. --> DONE --> ToDo: get rid of the images and use only divs! - -- the menu points should be displayed "better". --> DONE --- Use the krysalis-site menu approach for the overall menu display. --> DONE --- Use the old lenya innermenu approch to further enhance the menu . --> DONE - -- the content area needs some attention. --> DONE --- introduce the heading scheme from krysalis () --> DONE --> ToDo: make box with round corners --> done: make underlined with variable border height --> ToDo: make underline with bottom round corner --- introduce the toc for each html-page --> DONE --- introduce the external-link-images. --> DONE - -- the publish note should be where now only a border is. -Like
    --> DONE -, but make it configurable. --> DONE -- footer needs some attention --> DONE --- the footer do not have the color profile! Enable it! --> DONE --- the footer should as well contain a feedback link. -See http://issues.apache.org/eyebrowse/ReadMsg?listName=forrest-user@xml.apache.org&msgNo=71 --> DONE - -- introduce credits alternativ location --> DONE - -- border for published / breadtrail / menu /tab divs --> ToDo \ No newline at end of file Index: lucene/site/src/documentation/skins/lucene/skinconf.xsl =================================================================== --- lucene/site/src/documentation/skins/lucene/skinconf.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/skinconf.xsl (working copy) @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: lucene/site/src/documentation/skins/lucene/xslt/fo/document-to-fo.xsl =================================================================== --- lucene/site/src/documentation/skins/lucene/xslt/fo/document-to-fo.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/xslt/fo/document-to-fo.xsl (working copy) @@ -1,22 +0,0 @@ - - - - - Index: lucene/site/src/documentation/skins/lucene/xslt/fo/document-to-fo.xsl =================================================================== --- lucene/site/src/documentation/skins/lucene/xslt/fo/document-to-fo.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/xslt/fo/document-to-fo.xsl (working copy) @@ -1,22 +0,0 @@ - - - - - Index: lucene/site/src/documentation/skins/lucene/xslt/html/book-to-menu.xsl =================================================================== --- lucene/site/src/documentation/skins/lucene/xslt/html/book-to-menu.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/xslt/html/book-to-menu.xsl (working copy) @@ -1,53 +0,0 @@ - - - - - - - - - -
  • - -

    -
      - -
  • -
    - - -
  • -
    - -
    - -
    -
    - - - - - -
    Index: lucene/site/src/documentation/skins/lucene/xslt/html/site-to-xhtml.xsl =================================================================== --- lucene/site/src/documentation/skins/lucene/xslt/html/site-to-xhtml.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/xslt/html/site-to-xhtml.xsl (working copy) @@ -1,821 +0,0 @@ - - - - - - - - - - - - - - - - - - <xsl:value-of select="div[@id='content']/h1"/> - <xsl:if test="$config/motd"> - <xsl:for-each select="$config/motd/motd-option"> - <xsl:choose> - <xsl:when test="@starts-with='true'"> - <xsl:if test="starts-with($path, @pattern)"> - <xsl:if test="normalize-space(motd-title) != ''"> -<xsl:text> (</xsl:text> - <xsl:value-of select="motd-title"/> -<xsl:text>)</xsl:text> - </xsl:if> - </xsl:if> - </xsl:when> - <xsl:otherwise> - <xsl:if test="contains($path, @pattern)"> - <xsl:if test="normalize-space(motd-title) != ''"> -<xsl:text> (</xsl:text> - <xsl:value-of select="motd-title"/> -<xsl:text>)</xsl:text> - </xsl:if> - </xsl:if> - </xsl:otherwise> - </xsl:choose> - </xsl:for-each> - </xsl:if> - - - - - - - - - - - - - - - - - -
    - - - + - |breadtrail - + -
    - -
    -
    - + - |header - + -
    - + - |start group logo - + - - - - + - |end group logo - + - + - |start Project Logo - + - - - -true - - -false - - - - - + - |end Project Logo - + - - + - |start Search - + - - + - |end search - + - - + - |start Tabs - + - - + - |end Tabs - + -
    -
    - -
    -
    - + - |start Subtabs - + -
    - -
    - + - |end Endtabs - + - -
    - + - |breadtrail - + -
    - - - - - - - -   - - -
    - + - |start Menu, mainarea - + - - - - + - |start content - + - - + - |end content - + -
     
    -
    - - - - - -
    - - - - - - - -

    - -

    -
    - -

    - -

    -
    - -

    - -

    -
    -
    -
    - - - -

    - -

    -
    - -

    - -

    -
    - -

    - -

    -
    -
    -
    - - - - Valid HTML 4.01! - Valid CSS! - - - - + - |start Menu - + - - + - |end Menu - + - - - - - - - - - - - - - - - - selectedmenuitemgroup - menuitemgroup - - - -
    - - -display: block; - - - - - - - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Font size: -   -   -   -
    -
    -
    - - - - - - - - -
    - - - ( - - - -More -) - -
    -
    -
    -
    - - - -
    - - - ( - - - -More -) - -
    -
    -
    -
    -
    -
    -
    - - - - -
    - - - -
    -
    -
    -
    -
    -
    Index: lucene/site/src/documentation/skins/lucene/xslt/html/document-to-html.xsl =================================================================== --- lucene/site/src/documentation/skins/lucene/xslt/html/document-to-html.xsl (revision 1328746) +++ lucene/site/src/documentation/skins/lucene/xslt/html/document-to-html.xsl (working copy) @@ -1,154 +0,0 @@ - - - - - - - - - -
    -