blob: ab4317065eed814bd3c81465513b092f52934a17 [file] [log] [blame]
{
"Lucene.Net.Demo.Facet.AssociationsFacetsExample.html": {
"href": "Lucene.Net.Demo.Facet.AssociationsFacetsExample.html",
"title": "Class AssociationsFacetsExample | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class AssociationsFacetsExample Shows example usage of category associations. Inheritance System.Object AssociationsFacetsExample Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo.Facet Assembly : Lucene.Net.Demo.dll Syntax public class AssociationsFacetsExample Constructors | Improve this Doc View Source AssociationsFacetsExample() Empty constructor Declaration public AssociationsFacetsExample() Methods | Improve this Doc View Source Main(String[]) Runs the sum int/float associations examples and prints the results. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args | Improve this Doc View Source RunDrillDown() Runs the drill-down example. Declaration public FacetResult RunDrillDown() Returns Type Description Lucene.Net.Facet.FacetResult | Improve this Doc View Source RunSumAssociations() Runs summing association example. Declaration public IList<FacetResult> RunSumAssociations() Returns Type Description System.Collections.Generic.IList < Lucene.Net.Facet.FacetResult >"
},
"Lucene.Net.Demo.Facet.DistanceFacetsExample.html": {
"href": "Lucene.Net.Demo.Facet.DistanceFacetsExample.html",
"title": "Class DistanceFacetsExample | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class DistanceFacetsExample Shows simple usage of dynamic range faceting, using the expressions module to calculate distance. Inheritance System.Object DistanceFacetsExample Implements System.IDisposable Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo.Facet Assembly : Lucene.Net.Demo.dll Syntax public class DistanceFacetsExample : IDisposable Fields | Improve this Doc View Source EARTH_RADIUS_KM Radius of the Earth in KM NOTE: this is approximate, because the earth is a bit wider at the equator than the poles. See http://en.wikipedia.org/wiki/Earth_radius Declaration public static readonly double EARTH_RADIUS_KM Field Value Type Description System.Double | Improve this Doc View Source ORIGIN_LATITUDE The \"home\" latitude. Declaration public static readonly double ORIGIN_LATITUDE Field Value Type Description System.Double | Improve this Doc View Source ORIGIN_LONGITUDE The \"home\" longitude. Declaration public static readonly double ORIGIN_LONGITUDE Field Value Type Description System.Double Methods | Improve this Doc View Source Dispose() Declaration public void Dispose() | Improve this Doc View Source DrillDown(DoubleRange) User drills down on the specified range. Declaration public TopDocs DrillDown(DoubleRange range) Parameters Type Name Description Lucene.Net.Facet.Range.DoubleRange range Returns Type Description Lucene.Net.Search.TopDocs | Improve this Doc View Source GetBoundingBoxFilter(Double, Double, Double) Given a latitude and longitude (in degrees) and the maximum great circle (surface of the earth) distance, returns a simple Filter bounding box to \"fast match\" candidates. Declaration public static Filter GetBoundingBoxFilter(double originLat, double originLng, double maxDistanceKM) Parameters Type Name Description System.Double originLat System.Double originLng System.Double maxDistanceKM Returns Type Description Lucene.Net.Search.Filter | Improve this Doc View Source Index() Build the example index. Declaration public void Index() | Improve this Doc View Source Main(String[]) Runs the search and drill-down examples and prints the results. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args | Improve this Doc View Source Search() User runs a query and counts facets. Declaration public FacetResult Search() Returns Type Description Lucene.Net.Facet.FacetResult Implements System.IDisposable"
},
"Lucene.Net.Demo.Facet.ExpressionAggregationFacetsExample.html": {
"href": "Lucene.Net.Demo.Facet.ExpressionAggregationFacetsExample.html",
"title": "Class ExpressionAggregationFacetsExample | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class ExpressionAggregationFacetsExample Shows facets aggregation by an expression. Inheritance System.Object ExpressionAggregationFacetsExample Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo.Facet Assembly : Lucene.Net.Demo.dll Syntax public class ExpressionAggregationFacetsExample Methods | Improve this Doc View Source Main(String[]) Runs the search and drill-down examples and prints the results. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args | Improve this Doc View Source RunSearch() Runs the search example. Declaration public FacetResult RunSearch() Returns Type Description Lucene.Net.Facet.FacetResult"
},
"Lucene.Net.Demo.Facet.html": {
"href": "Lucene.Net.Demo.Facet.html",
"title": "Namespace Lucene.Net.Demo.Facet | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Namespace Lucene.Net.Demo.Facet <!-- 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. --> Facets example code. Classes AssociationsFacetsExample Shows example usage of category associations. DistanceFacetsExample Shows simple usage of dynamic range faceting, using the expressions module to calculate distance. ExpressionAggregationFacetsExample Shows facets aggregation by an expression. MultiCategoryListsFacetsExample Demonstrates indexing categories into different indexed fields. RangeFacetsExample Shows simple usage of dynamic range faceting. SimpleFacetsExample Shows simple usage of faceted indexing and search. SimpleSortedSetFacetsExample Shows simple usage of faceted indexing and search using Lucene.Net.Facet.SortedSet.SortedSetDocValuesFacetField and Lucene.Net.Facet.SortedSet.SortedSetDocValuesFacetCounts ."
},
"Lucene.Net.Demo.Facet.MultiCategoryListsFacetsExample.html": {
"href": "Lucene.Net.Demo.Facet.MultiCategoryListsFacetsExample.html",
"title": "Class MultiCategoryListsFacetsExample | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class MultiCategoryListsFacetsExample Demonstrates indexing categories into different indexed fields. Inheritance System.Object MultiCategoryListsFacetsExample Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo.Facet Assembly : Lucene.Net.Demo.dll Syntax public class MultiCategoryListsFacetsExample Constructors | Improve this Doc View Source MultiCategoryListsFacetsExample() Creates a new instance and populates the catetory list params mapping. Declaration public MultiCategoryListsFacetsExample() Methods | Improve this Doc View Source Main(String[]) Runs the search example and prints the results. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args | Improve this Doc View Source RunSearch() Runs the search example. Declaration public IList<FacetResult> RunSearch() Returns Type Description System.Collections.Generic.IList < Lucene.Net.Facet.FacetResult >"
},
"Lucene.Net.Demo.Facet.RangeFacetsExample.html": {
"href": "Lucene.Net.Demo.Facet.RangeFacetsExample.html",
"title": "Class RangeFacetsExample | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class RangeFacetsExample Shows simple usage of dynamic range faceting. Inheritance System.Object RangeFacetsExample Implements System.IDisposable Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo.Facet Assembly : Lucene.Net.Demo.dll Syntax public class RangeFacetsExample : IDisposable Constructors | Improve this Doc View Source RangeFacetsExample() Constructor Declaration public RangeFacetsExample() Methods | Improve this Doc View Source Dispose() Declaration public void Dispose() | Improve this Doc View Source DrillDown(Int64Range) User drills down on the specified range. Declaration public TopDocs DrillDown(Int64Range range) Parameters Type Name Description Lucene.Net.Facet.Range.Int64Range range Returns Type Description Lucene.Net.Search.TopDocs | Improve this Doc View Source Index() Build the example index. Declaration public void Index() | Improve this Doc View Source Main(String[]) Runs the search and drill-down examples and prints the results. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args | Improve this Doc View Source Search() User runs a query and counts facets. Declaration public FacetResult Search() Returns Type Description Lucene.Net.Facet.FacetResult Implements System.IDisposable"
},
"Lucene.Net.Demo.Facet.SimpleFacetsExample.html": {
"href": "Lucene.Net.Demo.Facet.SimpleFacetsExample.html",
"title": "Class SimpleFacetsExample | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class SimpleFacetsExample Shows simple usage of faceted indexing and search. Inheritance System.Object SimpleFacetsExample Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo.Facet Assembly : Lucene.Net.Demo.dll Syntax public class SimpleFacetsExample Constructors | Improve this Doc View Source SimpleFacetsExample() Constructor Declaration public SimpleFacetsExample() Methods | Improve this Doc View Source Main(String[]) Runs the search and drill-down examples and prints the results. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args | Improve this Doc View Source RunDrillDown() Runs the drill-down example. Declaration public FacetResult RunDrillDown() Returns Type Description Lucene.Net.Facet.FacetResult | Improve this Doc View Source RunDrillSideways() Runs the drill-sideways example. Declaration public IList<FacetResult> RunDrillSideways() Returns Type Description System.Collections.Generic.IList < Lucene.Net.Facet.FacetResult > | Improve this Doc View Source RunFacetOnly() Runs the search example. Declaration public IList<FacetResult> RunFacetOnly() Returns Type Description System.Collections.Generic.IList < Lucene.Net.Facet.FacetResult > | Improve this Doc View Source RunSearch() Runs the search example. Declaration public IList<FacetResult> RunSearch() Returns Type Description System.Collections.Generic.IList < Lucene.Net.Facet.FacetResult >"
},
"Lucene.Net.Demo.Facet.SimpleSortedSetFacetsExample.html": {
"href": "Lucene.Net.Demo.Facet.SimpleSortedSetFacetsExample.html",
"title": "Class SimpleSortedSetFacetsExample | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class SimpleSortedSetFacetsExample Shows simple usage of faceted indexing and search using Lucene.Net.Facet.SortedSet.SortedSetDocValuesFacetField and Lucene.Net.Facet.SortedSet.SortedSetDocValuesFacetCounts . Inheritance System.Object SimpleSortedSetFacetsExample Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo.Facet Assembly : Lucene.Net.Demo.dll Syntax public class SimpleSortedSetFacetsExample Methods | Improve this Doc View Source Main(String[]) Runs the search and drill-down examples and prints the results. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args | Improve this Doc View Source RunDrillDown() Runs the drill-down example. Declaration public FacetResult RunDrillDown() Returns Type Description Lucene.Net.Facet.FacetResult | Improve this Doc View Source RunSearch() Runs the search example. Declaration public IList<FacetResult> RunSearch() Returns Type Description System.Collections.Generic.IList < Lucene.Net.Facet.FacetResult >"
},
"Lucene.Net.Demo.html": {
"href": "Lucene.Net.Demo.html",
"title": "Namespace Lucene.Net.Demo | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Namespace Lucene.Net.Demo <!-- 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. --> The demo module offers simple example code to show the features of Lucene. Apache Lucene - Building and Installing the Basic Demo About this Document About the Demo Indexing Files About the code Location of the source IndexFiles Searching Files 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. 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 gibberish or made up word (for example: \"supercalifragilisticexpialidocious\"). You'll see that there are no maching results in the lucene source code. 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 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 The files discussed here are linked into this documentation directly: * IndexFiles : code to create a Lucene index. * SearchFiles : code to search a Lucene index. 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 Directory s 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 Analyzer s 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 IndexWriterConfig 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 <xref:Lucene.Net.Search.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 <xref:Lucene.Net.Search.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 method that returns TopDocs with max n hits. The results are printed in pages, sorted by score (i.e. relevance). Classes IndexFiles Index all text files under a directory. This is a command-line application demonstrating simple Lucene indexing. Run it with no command-line arguments for usage information. SearchFiles Simple command-line based search demo."
},
"Lucene.Net.Demo.IndexFiles.html": {
"href": "Lucene.Net.Demo.IndexFiles.html",
"title": "Class IndexFiles | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class IndexFiles Index all text files under a directory. This is a command-line application demonstrating simple Lucene indexing. Run it with no command-line arguments for usage information. Inheritance System.Object IndexFiles Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo Assembly : Lucene.Net.Demo.dll Syntax public class IndexFiles Methods | Improve this Doc View Source Main(String[]) Index all text files under a directory. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args"
},
"Lucene.Net.Demo.SearchFiles.html": {
"href": "Lucene.Net.Demo.SearchFiles.html",
"title": "Class SearchFiles | Apache Lucene.NET 4.8.0-beta00011 Documentation",
"keywords": "Class SearchFiles Simple command-line based search demo. Inheritance System.Object SearchFiles Inherited Members System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ToString() Namespace : Lucene.Net.Demo Assembly : Lucene.Net.Demo.dll Syntax public class SearchFiles Methods | Improve this Doc View Source DoPagingSearch(IndexSearcher, Query, Int32, Boolean, Boolean) This demonstrates a typical paging search scenario, where the search engine presents pages of size n to the user. The user can then go to the next page if interested in the next hits. When the query is executed for the first time, then only enough results are collected to fill 5 result pages. If the user wants to page beyond this limit, then the query is executed another time and all hits are collected. Declaration public static void DoPagingSearch(IndexSearcher searcher, Query query, int hitsPerPage, bool raw, bool interactive) Parameters Type Name Description Lucene.Net.Search.IndexSearcher searcher Lucene.Net.Search.Query query System.Int32 hitsPerPage System.Boolean raw System.Boolean interactive | Improve this Doc View Source Main(String[]) Simple command-line based search demo. Declaration public static void Main(string[] args) Parameters Type Name Description System.String [] args"
}
}