diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index e797fb43..3cea47fd 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -52,18 +52,18 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.8.0) + mini_portile2 (2.8.4) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - nokogiri (1.13.9) - mini_portile2 (~> 2.8.0) + nokogiri (1.15.4) + mini_portile2 (~> 2.8.2) racc (~> 1.4) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (4.0.7) - racc (1.6.0) + racc (1.7.1) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) diff --git a/docs/indexing.md b/docs/indexing.md index ce669b11..7e271f54 100644 --- a/docs/indexing.md +++ b/docs/indexing.md @@ -8,7 +8,7 @@ order: 0 Indexing === -_**Tip**: There are many examples of indexing in the [`LuceneIndexTests` source code](https://github.com/Shazwazza/Examine/blob/dev/src/Examine.Test/Index/LuceneIndexTests.cs) to use as examples/reference._ +_**Tip**: There are many examples of indexing in the [`LuceneIndexTests` source code](https://github.com/Shazwazza/Examine/blob/dev/src/Examine.Test/Examine.Lucene/Index/LuceneIndexTests.cs) to use as examples/reference._ Examine will index any data you give it within a `ValueSet`. You can index one or multiple items at once and there's a few different ways to do that. Each field in a `ValueSet` can also contain one or more values. @@ -312,4 +312,4 @@ private void IndexCommited(object sender, EventArgs e) - \ No newline at end of file + diff --git a/docs/searching.md b/docs/searching.md index 496cecd1..219fef42 100644 --- a/docs/searching.md +++ b/docs/searching.md @@ -8,7 +8,7 @@ order: 2 Searching === -_**Tip**: There are many examples of searching in the [`FluentApiTests` source code](https://github.com/Shazwazza/Examine/blob/master/src/Examine.Test/Search/FluentApiTests.cs) to use as examples/reference._ +_**Tip**: There are many examples of searching in the [`FluentApiTests` source code](https://github.com/Shazwazza/Examine/blob/dev/src/Examine.Test/Examine.Lucene/Search/FluentApiTests.cs) to use as examples/reference._ ## All fields (managed queries) @@ -33,8 +33,8 @@ be searched. In most cases the field value type will be 'Full Text', others may ```csharp var searcher = myIndex.Searcher; // Get a searcher var results = searcher.CreateQuery() // Create a query - .Field("Address", "Hills") // Look for any "Hills" addresses - .Execute(); // Execute the search + .Field("Address", "Hills") // Look for any "Hills" addresses + .Execute(); // Execute the search ``` ### Terms and Phrases @@ -125,7 +125,7 @@ query.Field("nodeTypeAlias", "CWS_Home".Boost(20)); var results = query.Execute(); ``` -This will boost the term `CWS_Home` and make enteries with `nodeTypeAlias:CWS_Home` score higher in the results. +This will boost the term `CWS_Home` and make entries with `nodeTypeAlias:CWS_Home` score higher in the results. ## Proximity @@ -141,7 +141,6 @@ var query = searcher.CreateQuery("content"); query.Field("metaKeywords", "Warren creative".Proximity(5)); var results = query.Execute(); ``` - ## Fuzzy Fuzzy searching is the practice of finding spellings that are similar to each other. Examine searches based on the [Damerau-Levenshtein Distance](https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance). The parameter given in the `.Fuzzy()` method is the edit distance allowed by default this value is `0.5` if not specified. @@ -195,13 +194,11 @@ var query = searcher.CreateQuery() ``` This will match for example: `test`, `tests` , `tester`, `testers` - ### Lucene native query (Multiple characters) The multiple wildcard character is `*`. It will match 0 or more characters. Example - ```csharp var query = searcher.CreateQuery() .NativeQuery("equipment:t*pad"); @@ -451,3 +448,25 @@ var createdFacetResults = results.GetFacet("Created"); // Returns the facets for var firstRangeValue = createdFacetResults.Facet("first"); // Gets the IFacetValue for the facet "first" ``` + +### Lucene Searches + +Sometimes you need access to the underlying Lucene.NET APIs to perform a manual Lucene search. + +An example of Spatial Search with the Lucene APIs is in the [Examine source code](https://github.com/Shazwazza/Examine/blob/dev/src/Examine.Test/Examine.Lucene/Extensions/SpatialSearch.cs). + +```csharp +var searcher = (LuceneSearcher)indexer.Searcher; +var searchContext = searcher.GetSearchContext(); + +using (ISearcherReference searchRef = searchContext.GetSearcher()) +{ + // Access the instance of the underlying Lucene + // IndexSearcher instance. + var indexSearcher = searchRef.IndexSearcher; + + // You can then call indexSearcher.Search(...) + // which is a Lucene API, customize the parameters + // accordingly and handle the Lucene response. +} +``` \ No newline at end of file diff --git a/docs/v2/docfx.json b/docs/v2/docfx.json index 0004bd67..a239d953 100644 --- a/docs/v2/docfx.json +++ b/docs/v2/docfx.json @@ -57,7 +57,7 @@ ] } ], - "dest": "_site/v2", + "dest": "_site", "globalMetadataFiles": [], "fileMetadataFiles": [], "template": [