- Namespace
- Statiq
.Lunr - Interfaces
- Base Types
-
- object
- Module
graph BT
Type-->Base0["Module"]
click Base0 "/api/Statiq.Common/Module"
Base0-->Base1["object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Statiq.Common/IModule"
Type["GenerateLunrIndex"]
class Type type-node
Syntax
public class GenerateLunrIndex : Module, IModule
Fields
Name | Field Type | Constant Value | Summary |
---|---|---|---|
DefaultClientName | string |
static
|
|
DefaultFields | IReadOnlyDictionary |
static
|
|
DefaultReferenceKey | string |
static
|
|
DefaultScriptPath | NormalizedPath |
static
|
Methods
Name | Return Value | Summary |
---|---|---|
AfterExecution |
void |
Called after each module execution.
Inherited from Module
|
AfterExecutionAsync |
Task |
Called after each module execution.
Inherited from Module
|
Allow |
GenerateLunrIndex |
Adds the "position" metadata to the metadata allowlist in the search index, which
enables position information for each search term in the search results at the expense of index size.
|
BeforeExecution |
void |
Called before each module execution.
Inherited from Module
|
BeforeExecutionAsync |
Task |
Called before each module execution.
Inherited from Module
|
CustomizeScript |
GenerateLunrIndex |
This allows you to customize the JavaScript file that this module creates.
|
ExecuteAsync |
Task |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
Inherited from Module
|
ExecuteContextAsync |
Task |
|
ExecuteInputAsync |
Task |
Executes the module.
Inherited from Module
|
Finally |
void |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
FinallyAsync |
Task |
Called after each module execution, even if an exception is thrown during execution.
Inherited from Module
|
IncludeHostInLinks |
GenerateLunrIndex |
Indicates whether the host should be automatically included
in generated links (the default is
false ).
|
RemoveHtml |
GenerateLunrIndex |
Indicates whether HTML should be removed from document content when the input document media
type indicates the content is HTML (the default is
true ).
|
WithClientName |
GenerateLunrIndex |
Changes the name of the client object in the generated JavaScript file.
|
WithField |
GenerateLunrIndex |
Defines a search field and whether to include it in results.
|
WithFields |
GenerateLunrIndex |
Defines search fields and whether to include them in results.
|
WithIndexPath |
GenerateLunrIndex |
Controls the output path of the search index file (by default the destination of the
search index file is the same as the script file with a ".index.gz" extension, or
".index.json" extension if
ZipIndexFile(bool) is false ).
or ).
|
WithoutAnyFields |
GenerateLunrIndex |
Clears all fields from the search index.
|
WithoutField |
GenerateLunrIndex |
Removes a field from the search index.
|
WithReferenceKey |
GenerateLunrIndex |
Sets an alternate reference key that will be used to get a unique identifier for each search metadata item.
|
WithResultsPath |
GenerateLunrIndex |
Controls the output path of the results file that holds search field values as defined by
Result
(by default the destination of the search index file is the same as the script file with a ".results.json" extension).
|
WithScriptPath |
GenerateLunrIndex |
Controls the output path of the script file (by default the
destination of the script file is "search.js").
|
WithSearchItems |
GenerateLunrIndex |
Use a custom delegate to get search items for each input document. Only the reference and search field keys
will be retrieved from the returned item(s), all other values will be ignored (I.e. they won't be added to
the search automatically).
|
WithSearchItemsKey |
GenerateLunrIndex |
Sets a custom metadata key to use to get search items from each document if the document provides search items via metadata.
|
WithStemming |
GenerateLunrIndex |
Turns on stemming, which reduces words to their base form, using a default
English stemmer. You can customize stemming and supply a stemming delegate
using
WithStemming(Func<string, string>) . Note that turning
on stemming reduces the effectiveness of wildcard searches and disables the
default client-side typeahead search behavior in the generated JavaScript file.
|
WithStemming |
GenerateLunrIndex |
Turns on stemming, which reduces words to their base form,
using a custom stemming delegate. Note that turning
on stemming reduces the effectiveness of wildcard searches and disables the
default client-side typeahead search behavior in the generated JavaScript file.
|
WithStopWords |
GenerateLunrIndex |
Specifies stops words to use for the search index. By default a pre-defined set of English stop words are used.
|
With |
GenerateLunrIndex |
Specifies an input file that contains stop words to use. The file should contain
one stop word per line.
|
ZipIndexFile |
GenerateLunrIndex |
Indicates whether to gzip the index file (the default is
true ).
|
ZipResultsFile |
GenerateLunrIndex |
Indicates whether to gzip the results file (the default is
true ).
|